diff --git a/AUTHORS b/AUTHORS index 2be1c01068..4d820da895 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1107,6 +1107,7 @@ Developers: milos1290 Added Lerp for Vec3 + Added ActionFloat perminovVS Optimize Vec3 and Vec2 @@ -1117,6 +1118,11 @@ Developers: HueyPark Fixed memory leak in HttpClient on iOS + + Dimon4eg + Fixed crash on AssetsManager + Fixed memory leak of WebView on iOS + Fixed crahed that if url contains illegal characters on Android Retired Core Developers: WenSheng Yang diff --git a/CHANGELOG b/CHANGELOG index c2235f421a..fb9d6fca76 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,13 +1,22 @@ cocos2d-x-3.7 ?? + [NEW] 3d: added physics3d support + [NEW] C++: added ActionFloat + [NEW] C++: support physical keyboard on WinRT [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 [FIX] 3rd: fix PIE link error on iOS caused by libpng and libtiff + [FIX] AssetsManager: crashed issue [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)` [FIX] Label: shadow effect cause OpenGL error on iOS + [FIX] Label: outline effect doesn't match characters well + [FIX] Sprite3D: setGLProgram() does not work + [FIX] Terrain: terrain is on top of particles, particles can not be seen + [FIX] WebView: memory leak on iOS + [FIX] WebView: crashed if url contains illegal characters on Android 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 3b0fb1e207..d1c40c3b19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,7 @@ endif() option(USE_CHIPMUNK "Use chipmunk for physics library" ON) option(USE_BOX2D "Use box2d for physics library" OFF) +option(USE_BULLET "Use bullet for physics3d library" ON) option(USE_WEBP "Use WebP codec" ${USE_WEBP_DEFAULT}) option(BUILD_SHARED_LIBS "Build shared libraries" OFF) option(DEBUG_MODE "Debug or release?" ON) @@ -248,6 +249,24 @@ else() add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=0) endif(USE_BOX2D) +# Bullet (not prebuilded, exists as source) +if(USE_BULLET) + if(USE_PREBUILT_LIBS) + add_subdirectory(external/bullet) + set(BULLET_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/bullet) + set(BULLET_LIBRARIES bullet) + else() + cocos_find_package(bullet BULLET REQUIRED) + set(BULLET_LIBRARIES bullet) + endif() + message(STATUS "Bullet include dirs: ${BULLET_INCLUDE_DIRS}") + add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=1) + add_definitions(-DCC_USE_PHYSICS=1) +else() + add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=0) + add_definitions(-DCC_USE_3D_PHYSICS=0) +endif(USE_BULLET) + # Tinyxml2 (not prebuilded, exists as source) if(USE_PREBUILT_LIBS) add_subdirectory(external/tinyxml2) diff --git a/README.md b/README.md index 672ca3f4af..de6121afb0 100644 --- a/README.md +++ b/README.md @@ -135,10 +135,10 @@ Build Requirements * Mac OS X 10.7+, Xcode 5.1+ * or Ubuntu 12.10+, CMake 2.6+ -* or Windows 7+, VS 2012+ +* or Windows 7+, VS 2013+ * Python 2.7.5 * NDK r10c+ is required to build Android games -* Windows Phone/Store 8.0 VS 2012+ +* Windows Phone/Store 8.0 VS 2013+ * Windows Phone/Store 8.1 VS 2013 Update 3+ @@ -186,7 +186,7 @@ $ bin/lua-empty-test/lua-empty-test * For Windows -Open the `cocos2d-x/build/cocos2d-win32.vc2012.sln` +Open the `cocos2d-x/build/cocos2d-win32.vc2013.sln` * For Windows 8.1 Universal Apps (Phone and Store) diff --git a/build/cocos2d-js-win32.vc2012.sln b/build/cocos2d-js-win32.vc2013.sln similarity index 85% rename from build/cocos2d-js-win32.vc2012.sln rename to build/cocos2d-js-win32.vc2013.sln index 6a83fb188a..d07005a164 100644 --- a/build/cocos2d-js-win32.vc2012.sln +++ b/build/cocos2d-js-win32.vc2013.sln @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 +MinimumVisualStudioVersion = 12.0.21005.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{92D54E36-7916-48EF-A951-224DD3B25442}" @@ -14,6 +14,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d", "..\cocos\sc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "js-tests", "..\tests\js-tests\project\proj.win32\js-tests.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM @@ -52,6 +54,12 @@ Global {D0F06A44-A245-4D13-A498-0120C203B539}.Release|ARM.ActiveCfg = Release|Win32 {D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.ActiveCfg = Release|Win32 {D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.Build.0 = Release|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|ARM.ActiveCfg = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.ActiveCfg = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.Build.0 = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|ARM.ActiveCfg = Release|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -59,6 +67,7 @@ Global GlobalSection(NestedProjects) = preSolution {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {92D54E36-7916-48EF-A951-224DD3B25442} {929480E7-23C0-4DF6-8456-096D71547116} = {92D54E36-7916-48EF-A951-224DD3B25442} + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} = {92D54E36-7916-48EF-A951-224DD3B25442} EndGlobalSection GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} diff --git a/build/cocos2d-js-win8.1-universal.sln b/build/cocos2d-js-win8.1-universal.sln index 60f8817bf9..c7e811fd33 100644 --- a/build/cocos2d-js-win8.1-universal.sln +++ b/build/cocos2d-js-win8.1-universal.sln @@ -1,8 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 12.0.21005.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libcocos2d", "libcocos2d", "{B3F299D4-B4CA-4F0B-8BE2-FB328483BC13}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.Shared", "..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems", "{5D6F020F-7E72-4494-90A0-2DF11D235DF9}" @@ -11,14 +11,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.Windows", ". EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.WindowsPhone", "..\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}") = "cpp-tests", "cpp-tests", "{572742C5-9322-4548-AB8B-96C3750A1B5D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests.Shared", "..\tests\cpp-tests\proj.win8.1-universal\cpp-tests.Shared\cpp-tests.Shared.vcxitems", "{BE3A1791-5BCE-4CEA-92CD-0E2D86DDE27A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests.Windows", "..\tests\cpp-tests\proj.win8.1-universal\cpp-tests.Windows\cpp-tests.Windows.vcxproj", "{F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests.WindowsPhone", "..\tests\cpp-tests\proj.win8.1-universal\cpp-tests.WindowsPhone\cpp-tests.WindowsPhone.vcxproj", "{15247C71-5289-4913-B88F-E253CC353720}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{85630454-74EA-4B5B-9B62-0E459B4476CB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libbox2d", "libbox2d", "{B3D1A3D5-9F54-43AF-9322-230B53242B78}" @@ -37,14 +29,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine.Windows", "..\coco EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine.WindowsPhone", "..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.WindowsPhone\libSpine.WindowsPhone.vcxproj", "{CC1DA216-A80D-4BE4-B309-ACB6AF313AFF}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cpp-empty-test", "cpp-empty-test", "{B70EF25E-E352-4020-BCDF-388973E44637}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp.Shared", "..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Shared\HelloCpp.Shared.vcxitems", "{A3AD93E4-0B2F-4C58-9181-69BED2E42E3E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp.Windows", "..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Windows\HelloCpp.Windows.vcxproj", "{79A8FCDA-4B12-4DD1-B676-FF148D651638}" -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}") = "js-tests", "js-tests", "{8E24A044-D83D-476D-886D-F40E3CC621DF}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "js-tests.Shared", "..\tests\js-tests\project\proj.win8.1-universal\App.Shared\js-tests.Shared.vcxitems", "{AE6763F6-1549-441E-AFB5-377BE1C776DC}" @@ -66,14 +50,10 @@ Global ..\tests\js-tests\project\proj.win8.1-universal\App.Shared\js-tests.Shared.vcxitems*{ae6763f6-1549-441e-afb5-377be1c776dc}*SharedItemsImports = 9 ..\tests\js-tests\project\proj.win8.1-universal\App.Shared\js-tests.Shared.vcxitems*{94874b5b-398f-448a-a366-35a35dc1db9c}*SharedItemsImports = 4 ..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{9335005f-678e-4e8e-9b84-50037216aec8}*SharedItemsImports = 4 - ..\tests\cpp-tests\proj.win8.1-universal\cpp-tests.Shared\cpp-tests.Shared.vcxitems*{15247c71-5289-4913-b88f-e253cc353720}*SharedItemsImports = 4 - ..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Shared\HelloCpp.Shared.vcxitems*{a3ad93e4-0b2f-4c58-9181-69bed2e42e3e}*SharedItemsImports = 9 ..\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 - ..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Shared\HelloCpp.Shared.vcxitems*{79a8fcda-4b12-4dd1-b676-ff148d651638}*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 ..\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 @@ -82,8 +62,6 @@ Global ..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{22f3b9df-1209-4574-8331-003966f562bf}*SharedItemsImports = 4 ..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{22f798d8-bfff-4754-996f-a5395343d5ec}*SharedItemsImports = 4 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{f3550fe0-c795-44f6-8feb-093eb68143ae}*SharedItemsImports = 4 - ..\tests\cpp-tests\proj.win8.1-universal\cpp-tests.Shared\cpp-tests.Shared.vcxitems*{f2bae06b-caae-43ee-b21b-57fa48db04fa}*SharedItemsImports = 4 - ..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Shared\HelloCpp.Shared.vcxitems*{396fe85e-bb05-4b92-bccb-f89aed4ea41a}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM @@ -116,38 +94,6 @@ 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 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Debug|ARM.ActiveCfg = Debug|ARM - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Debug|ARM.Build.0 = Debug|ARM - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Debug|ARM.Deploy.0 = Debug|ARM - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Debug|Win32.ActiveCfg = Debug|Win32 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Debug|Win32.Build.0 = Debug|Win32 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Debug|Win32.Deploy.0 = Debug|Win32 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Debug|x64.ActiveCfg = Debug|x64 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Debug|x64.Build.0 = Debug|x64 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Debug|x64.Deploy.0 = Debug|x64 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Release|ARM.ActiveCfg = Release|ARM - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Release|ARM.Build.0 = Release|ARM - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Release|ARM.Deploy.0 = Release|ARM - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Release|Win32.ActiveCfg = Release|Win32 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Release|Win32.Build.0 = Release|Win32 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Release|Win32.Deploy.0 = Release|Win32 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Release|x64.ActiveCfg = Release|x64 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Release|x64.Build.0 = Release|x64 - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA}.Release|x64.Deploy.0 = Release|x64 - {15247C71-5289-4913-B88F-E253CC353720}.Debug|ARM.ActiveCfg = Debug|ARM - {15247C71-5289-4913-B88F-E253CC353720}.Debug|ARM.Build.0 = Debug|ARM - {15247C71-5289-4913-B88F-E253CC353720}.Debug|ARM.Deploy.0 = Debug|ARM - {15247C71-5289-4913-B88F-E253CC353720}.Debug|Win32.ActiveCfg = Debug|Win32 - {15247C71-5289-4913-B88F-E253CC353720}.Debug|Win32.Build.0 = Debug|Win32 - {15247C71-5289-4913-B88F-E253CC353720}.Debug|Win32.Deploy.0 = Debug|Win32 - {15247C71-5289-4913-B88F-E253CC353720}.Debug|x64.ActiveCfg = Debug|Win32 - {15247C71-5289-4913-B88F-E253CC353720}.Release|ARM.ActiveCfg = Release|ARM - {15247C71-5289-4913-B88F-E253CC353720}.Release|ARM.Build.0 = Release|ARM - {15247C71-5289-4913-B88F-E253CC353720}.Release|ARM.Deploy.0 = Release|ARM - {15247C71-5289-4913-B88F-E253CC353720}.Release|Win32.ActiveCfg = Release|Win32 - {15247C71-5289-4913-B88F-E253CC353720}.Release|Win32.Build.0 = Release|Win32 - {15247C71-5289-4913-B88F-E253CC353720}.Release|Win32.Deploy.0 = Release|Win32 - {15247C71-5289-4913-B88F-E253CC353720}.Release|x64.ActiveCfg = Release|Win32 {3B26A12D-3A44-47EA-82D2-282660FC844D}.Debug|ARM.ActiveCfg = Debug|ARM {3B26A12D-3A44-47EA-82D2-282660FC844D}.Debug|ARM.Build.0 = Debug|ARM {3B26A12D-3A44-47EA-82D2-282660FC844D}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -192,38 +138,6 @@ Global {CC1DA216-A80D-4BE4-B309-ACB6AF313AFF}.Release|Win32.ActiveCfg = Release|Win32 {CC1DA216-A80D-4BE4-B309-ACB6AF313AFF}.Release|Win32.Build.0 = Release|Win32 {CC1DA216-A80D-4BE4-B309-ACB6AF313AFF}.Release|x64.ActiveCfg = Release|Win32 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Debug|ARM.ActiveCfg = Debug|ARM - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Debug|ARM.Build.0 = Debug|ARM - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Debug|ARM.Deploy.0 = Debug|ARM - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Debug|Win32.ActiveCfg = Debug|Win32 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Debug|Win32.Build.0 = Debug|Win32 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Debug|Win32.Deploy.0 = Debug|Win32 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Debug|x64.ActiveCfg = Debug|x64 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Debug|x64.Build.0 = Debug|x64 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Debug|x64.Deploy.0 = Debug|x64 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Release|ARM.ActiveCfg = Release|ARM - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Release|ARM.Build.0 = Release|ARM - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Release|ARM.Deploy.0 = Release|ARM - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Release|Win32.ActiveCfg = Release|Win32 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Release|Win32.Build.0 = Release|Win32 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Release|Win32.Deploy.0 = Release|Win32 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Release|x64.ActiveCfg = Release|x64 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Release|x64.Build.0 = Release|x64 - {79A8FCDA-4B12-4DD1-B676-FF148D651638}.Release|x64.Deploy.0 = Release|x64 - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Debug|ARM.ActiveCfg = Debug|ARM - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Debug|ARM.Build.0 = Debug|ARM - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Debug|ARM.Deploy.0 = Debug|ARM - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Debug|Win32.ActiveCfg = Debug|Win32 - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Debug|Win32.Build.0 = Debug|Win32 - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Debug|Win32.Deploy.0 = Debug|Win32 - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Debug|x64.ActiveCfg = Debug|Win32 - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Release|ARM.ActiveCfg = Release|ARM - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Release|ARM.Build.0 = Release|ARM - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Release|ARM.Deploy.0 = Release|ARM - {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Release|Win32.ActiveCfg = Release|Win32 - {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 {70914FC8-7709-4CD6-B86B-C63FDE5478DB}.Debug|ARM.ActiveCfg = Debug|ARM {70914FC8-7709-4CD6-B86B-C63FDE5478DB}.Debug|ARM.Build.0 = Debug|ARM {70914FC8-7709-4CD6-B86B-C63FDE5478DB}.Debug|ARM.Deploy.0 = Debug|ARM @@ -286,9 +200,6 @@ Global {5D6F020F-7E72-4494-90A0-2DF11D235DF9} = {B3F299D4-B4CA-4F0B-8BE2-FB328483BC13} {9335005F-678E-4E8E-9B84-50037216AEC8} = {B3F299D4-B4CA-4F0B-8BE2-FB328483BC13} {22F3B9DF-1209-4574-8331-003966F562BF} = {B3F299D4-B4CA-4F0B-8BE2-FB328483BC13} - {BE3A1791-5BCE-4CEA-92CD-0E2D86DDE27A} = {572742C5-9322-4548-AB8B-96C3750A1B5D} - {F2BAE06B-CAAE-43EE-B21B-57FA48DB04FA} = {572742C5-9322-4548-AB8B-96C3750A1B5D} - {15247C71-5289-4913-B88F-E253CC353720} = {572742C5-9322-4548-AB8B-96C3750A1B5D} {B3D1A3D5-9F54-43AF-9322-230B53242B78} = {85630454-74EA-4B5B-9B62-0E459B4476CB} {4A3C6BA8-C227-498B-AA21-40BDA27B461F} = {B3D1A3D5-9F54-43AF-9322-230B53242B78} {3B26A12D-3A44-47EA-82D2-282660FC844D} = {B3D1A3D5-9F54-43AF-9322-230B53242B78} @@ -297,9 +208,6 @@ Global {ADAFD00D-A0D6-46EF-9F0B-EA2880BFE1DE} = {6FEB795C-C98C-4C8C-A88B-A35DEE205348} {F3550FE0-C795-44F6-8FEB-093EB68143AE} = {6FEB795C-C98C-4C8C-A88B-A35DEE205348} {CC1DA216-A80D-4BE4-B309-ACB6AF313AFF} = {6FEB795C-C98C-4C8C-A88B-A35DEE205348} - {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} {AE6763F6-1549-441E-AFB5-377BE1C776DC} = {8E24A044-D83D-476D-886D-F40E3CC621DF} {70914FC8-7709-4CD6-B86B-C63FDE5478DB} = {8E24A044-D83D-476D-886D-F40E3CC621DF} {94874B5B-398F-448A-A366-35A35DC1DB9C} = {8E24A044-D83D-476D-886D-F40E3CC621DF} diff --git a/build/cocos2d-win32.vc2012.sln b/build/cocos2d-win32.vc2013.sln similarity index 87% rename from build/cocos2d-win32.vc2012.sln rename to build/cocos2d-win32.vc2013.sln index 2b6824c9ef..bf1f8bb66a 100644 --- a/build/cocos2d-win32.vc2012.sln +++ b/build/cocos2d-win32.vc2013.sln @@ -1,8 +1,8 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 # Visual Studio 2013 VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 +MinimumVisualStudioVersion = 12.0.21005.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-tests", "..\tests\lua-tests\project\proj.win32\lua-tests.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}" @@ -12,6 +12,9 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-empty-test", "..\tests\lua-empty-test\project\proj.win32\lua-empty-test.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" + ProjectSection(ProjectDependencies) = postProject + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} = {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluacocos2d", "..\cocos\scripting\lua-bindings\proj.win32\libluacocos2d.vcxproj", "{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}" EndProject @@ -21,6 +24,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM @@ -77,6 +82,12 @@ Global {929480E7-23C0-4DF6-8456-096D71547116}.Release|ARM.ActiveCfg = Release|Win32 {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32 {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|ARM.ActiveCfg = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.ActiveCfg = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.Build.0 = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|ARM.ActiveCfg = Release|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -84,6 +95,7 @@ Global GlobalSection(NestedProjects) = preSolution {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {92D54E36-7916-48EF-A951-224DD3B25442} {929480E7-23C0-4DF6-8456-096D71547116} = {92D54E36-7916-48EF-A951-224DD3B25442} + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} = {92D54E36-7916-48EF-A951-224DD3B25442} EndGlobalSection GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} diff --git a/build/cocos2d-win8.1-universal.sln b/build/cocos2d-win8.1-universal.sln index 697e7a7721..4ef61407d8 100644 --- a/build/cocos2d-win8.1-universal.sln +++ b/build/cocos2d-win8.1-universal.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 +MinimumVisualStudioVersion = 12.0.21005.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libcocos2d", "libcocos2d", "{B3F299D4-B4CA-4F0B-8BE2-FB328483BC13}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.Shared", "..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems", "{5D6F020F-7E72-4494-90A0-2DF11D235DF9}" diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 4e13f59f7b..4a0e9db403 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1452,6 +1452,14 @@ 503DD8F81926B0DB00CD74DD /* CCIMEDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8F31926B0DB00CD74DD /* CCIMEDispatcher.cpp */; }; 503DD8F91926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8F41926B0DB00CD74DD /* CCIMEDispatcher.h */; }; 503DD8FA1926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8F41926B0DB00CD74DD /* CCIMEDispatcher.h */; }; + 505385021B01887A00793096 /* CCProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 505385001B01887A00793096 /* CCProperties.h */; }; + 505385031B01887A00793096 /* CCProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 505385001B01887A00793096 /* CCProperties.h */; }; + 505385041B01887A00793096 /* CCProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 505385011B01887A00793096 /* CCProperties.cpp */; }; + 505385051B01887A00793096 /* CCProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 505385011B01887A00793096 /* CCProperties.cpp */; }; + 5053850C1B02819E00793096 /* CCVertexAttribBinding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5053850A1B02819E00793096 /* CCVertexAttribBinding.cpp */; }; + 5053850D1B02819E00793096 /* CCVertexAttribBinding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5053850A1B02819E00793096 /* CCVertexAttribBinding.cpp */; }; + 5053850E1B02819E00793096 /* CCVertexAttribBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = 5053850B1B02819E00793096 /* CCVertexAttribBinding.h */; }; + 5053850F1B02819E00793096 /* CCVertexAttribBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = 5053850B1B02819E00793096 /* CCVertexAttribBinding.h */; }; 50643BD419BFAECF00EF68ED /* CCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD319BFAECF00EF68ED /* CCGL.h */; }; 50643BD519BFAECF00EF68ED /* CCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD319BFAECF00EF68ED /* CCGL.h */; }; 50643BD619BFAEDA00EF68ED /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */; }; @@ -2613,6 +2621,832 @@ B68779051A8CA82E00643ABF /* CCParticleSystem3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F61A8CA82E00643ABF /* CCParticleSystem3D.cpp */; }; B68779061A8CA82E00643ABF /* CCParticleSystem3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F71A8CA82E00643ABF /* CCParticleSystem3D.h */; }; B68779071A8CA82E00643ABF /* CCParticleSystem3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F71A8CA82E00643ABF /* CCParticleSystem3D.h */; }; + B6CAAFE21AF9A9E100B9B856 /* CCPhysics3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD21AF9A9E100B9B856 /* CCPhysics3D.cpp */; }; + B6CAAFE31AF9A9E100B9B856 /* CCPhysics3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD21AF9A9E100B9B856 /* CCPhysics3D.cpp */; }; + B6CAAFE41AF9A9E100B9B856 /* CCPhysics3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD31AF9A9E100B9B856 /* CCPhysics3D.h */; }; + B6CAAFE51AF9A9E100B9B856 /* CCPhysics3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD31AF9A9E100B9B856 /* CCPhysics3D.h */; }; + B6CAAFE61AF9A9E100B9B856 /* CCPhysics3DComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD41AF9A9E100B9B856 /* CCPhysics3DComponent.cpp */; }; + B6CAAFE71AF9A9E100B9B856 /* CCPhysics3DComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD41AF9A9E100B9B856 /* CCPhysics3DComponent.cpp */; }; + B6CAAFE81AF9A9E100B9B856 /* CCPhysics3DComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD51AF9A9E100B9B856 /* CCPhysics3DComponent.h */; }; + B6CAAFE91AF9A9E100B9B856 /* CCPhysics3DComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD51AF9A9E100B9B856 /* CCPhysics3DComponent.h */; }; + B6CAAFEA1AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD61AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp */; }; + B6CAAFEB1AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD61AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp */; }; + B6CAAFEC1AF9A9E100B9B856 /* CCPhysics3DConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD71AF9A9E100B9B856 /* CCPhysics3DConstraint.h */; }; + B6CAAFED1AF9A9E100B9B856 /* CCPhysics3DConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD71AF9A9E100B9B856 /* CCPhysics3DConstraint.h */; }; + B6CAAFEE1AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD81AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp */; }; + B6CAAFEF1AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFD81AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp */; }; + B6CAAFF01AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD91AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h */; }; + B6CAAFF11AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFD91AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h */; }; + B6CAAFF21AF9A9E100B9B856 /* CCPhysics3DObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDA1AF9A9E100B9B856 /* CCPhysics3DObject.cpp */; }; + B6CAAFF31AF9A9E100B9B856 /* CCPhysics3DObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDA1AF9A9E100B9B856 /* CCPhysics3DObject.cpp */; }; + B6CAAFF41AF9A9E100B9B856 /* CCPhysics3DObject.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDB1AF9A9E100B9B856 /* CCPhysics3DObject.h */; }; + B6CAAFF51AF9A9E100B9B856 /* CCPhysics3DObject.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDB1AF9A9E100B9B856 /* CCPhysics3DObject.h */; }; + B6CAAFF61AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDC1AF9A9E100B9B856 /* CCPhysics3DShape.cpp */; }; + B6CAAFF71AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDC1AF9A9E100B9B856 /* CCPhysics3DShape.cpp */; }; + B6CAAFF81AF9A9E100B9B856 /* CCPhysics3DShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDD1AF9A9E100B9B856 /* CCPhysics3DShape.h */; }; + B6CAAFF91AF9A9E100B9B856 /* CCPhysics3DShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDD1AF9A9E100B9B856 /* CCPhysics3DShape.h */; }; + B6CAAFFA1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDE1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp */; }; + B6CAAFFB1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFDE1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp */; }; + B6CAAFFC1AF9A9E100B9B856 /* CCPhysics3DWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDF1AF9A9E100B9B856 /* CCPhysics3DWorld.h */; }; + B6CAAFFD1AF9A9E100B9B856 /* CCPhysics3DWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFDF1AF9A9E100B9B856 /* CCPhysics3DWorld.h */; }; + B6CAAFFE1AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFE01AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp */; }; + B6CAAFFF1AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAAFE01AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp */; }; + B6CAB0001AF9A9E100B9B856 /* CCPhysicsSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFE11AF9A9E100B9B856 /* CCPhysicsSprite3D.h */; }; + B6CAB0011AF9A9E100B9B856 /* CCPhysicsSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAAFE11AF9A9E100B9B856 /* CCPhysicsSprite3D.h */; }; + B6CAB1E11AF9AA1A00B9B856 /* btBulletCollisionCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0031AF9AA1900B9B856 /* btBulletCollisionCommon.h */; }; + B6CAB1E21AF9AA1A00B9B856 /* btBulletCollisionCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0031AF9AA1900B9B856 /* btBulletCollisionCommon.h */; }; + B6CAB1E31AF9AA1A00B9B856 /* btBulletDynamicsCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0041AF9AA1900B9B856 /* btBulletDynamicsCommon.h */; }; + B6CAB1E41AF9AA1A00B9B856 /* btBulletDynamicsCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0041AF9AA1900B9B856 /* btBulletDynamicsCommon.h */; }; + B6CAB1E51AF9AA1A00B9B856 /* Bullet-C-Api.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0051AF9AA1900B9B856 /* Bullet-C-Api.h */; }; + B6CAB1E61AF9AA1A00B9B856 /* Bullet-C-Api.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0051AF9AA1900B9B856 /* Bullet-C-Api.h */; }; + B6CAB1E71AF9AA1A00B9B856 /* btAxisSweep3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0081AF9AA1900B9B856 /* btAxisSweep3.cpp */; }; + B6CAB1E81AF9AA1A00B9B856 /* btAxisSweep3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0081AF9AA1900B9B856 /* btAxisSweep3.cpp */; }; + B6CAB1E91AF9AA1A00B9B856 /* btAxisSweep3.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0091AF9AA1900B9B856 /* btAxisSweep3.h */; }; + B6CAB1EA1AF9AA1A00B9B856 /* btAxisSweep3.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0091AF9AA1900B9B856 /* btAxisSweep3.h */; }; + B6CAB1EB1AF9AA1A00B9B856 /* btBroadphaseInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB00A1AF9AA1900B9B856 /* btBroadphaseInterface.h */; }; + B6CAB1EC1AF9AA1A00B9B856 /* btBroadphaseInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB00A1AF9AA1900B9B856 /* btBroadphaseInterface.h */; }; + B6CAB1ED1AF9AA1A00B9B856 /* btBroadphaseProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB00B1AF9AA1900B9B856 /* btBroadphaseProxy.cpp */; }; + B6CAB1EE1AF9AA1A00B9B856 /* btBroadphaseProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB00B1AF9AA1900B9B856 /* btBroadphaseProxy.cpp */; }; + B6CAB1EF1AF9AA1A00B9B856 /* btBroadphaseProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB00C1AF9AA1900B9B856 /* btBroadphaseProxy.h */; }; + B6CAB1F01AF9AA1A00B9B856 /* btBroadphaseProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB00C1AF9AA1900B9B856 /* btBroadphaseProxy.h */; }; + B6CAB1F11AF9AA1A00B9B856 /* btCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB00D1AF9AA1900B9B856 /* btCollisionAlgorithm.cpp */; }; + B6CAB1F21AF9AA1A00B9B856 /* btCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB00D1AF9AA1900B9B856 /* btCollisionAlgorithm.cpp */; }; + B6CAB1F31AF9AA1A00B9B856 /* btCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB00E1AF9AA1900B9B856 /* btCollisionAlgorithm.h */; }; + B6CAB1F41AF9AA1A00B9B856 /* btCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB00E1AF9AA1900B9B856 /* btCollisionAlgorithm.h */; }; + B6CAB1F51AF9AA1A00B9B856 /* btDbvt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB00F1AF9AA1900B9B856 /* btDbvt.cpp */; }; + B6CAB1F61AF9AA1A00B9B856 /* btDbvt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB00F1AF9AA1900B9B856 /* btDbvt.cpp */; }; + B6CAB1F71AF9AA1A00B9B856 /* btDbvt.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0101AF9AA1900B9B856 /* btDbvt.h */; }; + B6CAB1F81AF9AA1A00B9B856 /* btDbvt.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0101AF9AA1900B9B856 /* btDbvt.h */; }; + B6CAB1F91AF9AA1A00B9B856 /* btDbvtBroadphase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0111AF9AA1900B9B856 /* btDbvtBroadphase.cpp */; }; + B6CAB1FA1AF9AA1A00B9B856 /* btDbvtBroadphase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0111AF9AA1900B9B856 /* btDbvtBroadphase.cpp */; }; + B6CAB1FB1AF9AA1A00B9B856 /* btDbvtBroadphase.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0121AF9AA1900B9B856 /* btDbvtBroadphase.h */; }; + B6CAB1FC1AF9AA1A00B9B856 /* btDbvtBroadphase.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0121AF9AA1900B9B856 /* btDbvtBroadphase.h */; }; + B6CAB1FD1AF9AA1A00B9B856 /* btDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0131AF9AA1900B9B856 /* btDispatcher.cpp */; }; + B6CAB1FE1AF9AA1A00B9B856 /* btDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0131AF9AA1900B9B856 /* btDispatcher.cpp */; }; + B6CAB1FF1AF9AA1A00B9B856 /* btDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0141AF9AA1900B9B856 /* btDispatcher.h */; }; + B6CAB2001AF9AA1A00B9B856 /* btDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0141AF9AA1900B9B856 /* btDispatcher.h */; }; + B6CAB2011AF9AA1A00B9B856 /* btMultiSapBroadphase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0151AF9AA1900B9B856 /* btMultiSapBroadphase.cpp */; }; + B6CAB2021AF9AA1A00B9B856 /* btMultiSapBroadphase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0151AF9AA1900B9B856 /* btMultiSapBroadphase.cpp */; }; + B6CAB2031AF9AA1A00B9B856 /* btMultiSapBroadphase.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0161AF9AA1900B9B856 /* btMultiSapBroadphase.h */; }; + B6CAB2041AF9AA1A00B9B856 /* btMultiSapBroadphase.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0161AF9AA1900B9B856 /* btMultiSapBroadphase.h */; }; + B6CAB2051AF9AA1A00B9B856 /* btOverlappingPairCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0171AF9AA1900B9B856 /* btOverlappingPairCache.cpp */; }; + B6CAB2061AF9AA1A00B9B856 /* btOverlappingPairCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0171AF9AA1900B9B856 /* btOverlappingPairCache.cpp */; }; + B6CAB2071AF9AA1A00B9B856 /* btOverlappingPairCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0181AF9AA1900B9B856 /* btOverlappingPairCache.h */; }; + B6CAB2081AF9AA1A00B9B856 /* btOverlappingPairCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0181AF9AA1900B9B856 /* btOverlappingPairCache.h */; }; + B6CAB2091AF9AA1A00B9B856 /* btOverlappingPairCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0191AF9AA1900B9B856 /* btOverlappingPairCallback.h */; }; + B6CAB20A1AF9AA1A00B9B856 /* btOverlappingPairCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0191AF9AA1900B9B856 /* btOverlappingPairCallback.h */; }; + B6CAB20B1AF9AA1A00B9B856 /* btQuantizedBvh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB01A1AF9AA1900B9B856 /* btQuantizedBvh.cpp */; }; + B6CAB20C1AF9AA1A00B9B856 /* btQuantizedBvh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB01A1AF9AA1900B9B856 /* btQuantizedBvh.cpp */; }; + B6CAB20D1AF9AA1A00B9B856 /* btQuantizedBvh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB01B1AF9AA1900B9B856 /* btQuantizedBvh.h */; }; + B6CAB20E1AF9AA1A00B9B856 /* btQuantizedBvh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB01B1AF9AA1900B9B856 /* btQuantizedBvh.h */; }; + B6CAB20F1AF9AA1A00B9B856 /* btSimpleBroadphase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB01C1AF9AA1900B9B856 /* btSimpleBroadphase.cpp */; }; + B6CAB2101AF9AA1A00B9B856 /* btSimpleBroadphase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB01C1AF9AA1900B9B856 /* btSimpleBroadphase.cpp */; }; + B6CAB2111AF9AA1A00B9B856 /* btSimpleBroadphase.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB01D1AF9AA1900B9B856 /* btSimpleBroadphase.h */; }; + B6CAB2121AF9AA1A00B9B856 /* btSimpleBroadphase.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB01D1AF9AA1900B9B856 /* btSimpleBroadphase.h */; }; + B6CAB2131AF9AA1A00B9B856 /* btActivatingCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB01F1AF9AA1900B9B856 /* btActivatingCollisionAlgorithm.cpp */; }; + B6CAB2141AF9AA1A00B9B856 /* btActivatingCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB01F1AF9AA1900B9B856 /* btActivatingCollisionAlgorithm.cpp */; }; + B6CAB2151AF9AA1A00B9B856 /* btActivatingCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0201AF9AA1900B9B856 /* btActivatingCollisionAlgorithm.h */; }; + B6CAB2161AF9AA1A00B9B856 /* btActivatingCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0201AF9AA1900B9B856 /* btActivatingCollisionAlgorithm.h */; }; + B6CAB2171AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0211AF9AA1900B9B856 /* btBox2dBox2dCollisionAlgorithm.cpp */; }; + B6CAB2181AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0211AF9AA1900B9B856 /* btBox2dBox2dCollisionAlgorithm.cpp */; }; + B6CAB2191AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0221AF9AA1900B9B856 /* btBox2dBox2dCollisionAlgorithm.h */; }; + B6CAB21A1AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0221AF9AA1900B9B856 /* btBox2dBox2dCollisionAlgorithm.h */; }; + B6CAB21B1AF9AA1A00B9B856 /* btBoxBoxCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0231AF9AA1900B9B856 /* btBoxBoxCollisionAlgorithm.cpp */; }; + B6CAB21C1AF9AA1A00B9B856 /* btBoxBoxCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0231AF9AA1900B9B856 /* btBoxBoxCollisionAlgorithm.cpp */; }; + B6CAB21D1AF9AA1A00B9B856 /* btBoxBoxCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0241AF9AA1900B9B856 /* btBoxBoxCollisionAlgorithm.h */; }; + B6CAB21E1AF9AA1A00B9B856 /* btBoxBoxCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0241AF9AA1900B9B856 /* btBoxBoxCollisionAlgorithm.h */; }; + B6CAB21F1AF9AA1A00B9B856 /* btBoxBoxDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0251AF9AA1900B9B856 /* btBoxBoxDetector.cpp */; }; + B6CAB2201AF9AA1A00B9B856 /* btBoxBoxDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0251AF9AA1900B9B856 /* btBoxBoxDetector.cpp */; }; + B6CAB2211AF9AA1A00B9B856 /* btBoxBoxDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0261AF9AA1900B9B856 /* btBoxBoxDetector.h */; }; + B6CAB2221AF9AA1A00B9B856 /* btBoxBoxDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0261AF9AA1900B9B856 /* btBoxBoxDetector.h */; }; + B6CAB2231AF9AA1A00B9B856 /* btCollisionConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0271AF9AA1900B9B856 /* btCollisionConfiguration.h */; }; + B6CAB2241AF9AA1A00B9B856 /* btCollisionConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0271AF9AA1900B9B856 /* btCollisionConfiguration.h */; }; + B6CAB2251AF9AA1A00B9B856 /* btCollisionCreateFunc.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0281AF9AA1900B9B856 /* btCollisionCreateFunc.h */; }; + B6CAB2261AF9AA1A00B9B856 /* btCollisionCreateFunc.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0281AF9AA1900B9B856 /* btCollisionCreateFunc.h */; }; + B6CAB2271AF9AA1A00B9B856 /* btCollisionDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0291AF9AA1900B9B856 /* btCollisionDispatcher.cpp */; }; + B6CAB2281AF9AA1A00B9B856 /* btCollisionDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0291AF9AA1900B9B856 /* btCollisionDispatcher.cpp */; }; + B6CAB2291AF9AA1A00B9B856 /* btCollisionDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB02A1AF9AA1900B9B856 /* btCollisionDispatcher.h */; }; + B6CAB22A1AF9AA1A00B9B856 /* btCollisionDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB02A1AF9AA1900B9B856 /* btCollisionDispatcher.h */; }; + B6CAB22B1AF9AA1A00B9B856 /* btCollisionObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB02B1AF9AA1900B9B856 /* btCollisionObject.cpp */; }; + B6CAB22C1AF9AA1A00B9B856 /* btCollisionObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB02B1AF9AA1900B9B856 /* btCollisionObject.cpp */; }; + B6CAB22D1AF9AA1A00B9B856 /* btCollisionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB02C1AF9AA1900B9B856 /* btCollisionObject.h */; }; + B6CAB22E1AF9AA1A00B9B856 /* btCollisionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB02C1AF9AA1900B9B856 /* btCollisionObject.h */; }; + B6CAB22F1AF9AA1A00B9B856 /* btCollisionObjectWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB02D1AF9AA1900B9B856 /* btCollisionObjectWrapper.h */; }; + B6CAB2301AF9AA1A00B9B856 /* btCollisionObjectWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB02D1AF9AA1900B9B856 /* btCollisionObjectWrapper.h */; }; + B6CAB2311AF9AA1A00B9B856 /* btCollisionWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB02E1AF9AA1900B9B856 /* btCollisionWorld.cpp */; }; + B6CAB2321AF9AA1A00B9B856 /* btCollisionWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB02E1AF9AA1900B9B856 /* btCollisionWorld.cpp */; }; + B6CAB2331AF9AA1A00B9B856 /* btCollisionWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB02F1AF9AA1900B9B856 /* btCollisionWorld.h */; }; + B6CAB2341AF9AA1A00B9B856 /* btCollisionWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB02F1AF9AA1900B9B856 /* btCollisionWorld.h */; }; + B6CAB2351AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0301AF9AA1900B9B856 /* btCompoundCollisionAlgorithm.cpp */; }; + B6CAB2361AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0301AF9AA1900B9B856 /* btCompoundCollisionAlgorithm.cpp */; }; + B6CAB2371AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0311AF9AA1900B9B856 /* btCompoundCollisionAlgorithm.h */; }; + B6CAB2381AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0311AF9AA1900B9B856 /* btCompoundCollisionAlgorithm.h */; }; + B6CAB2391AF9AA1A00B9B856 /* btCompoundCompoundCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0321AF9AA1900B9B856 /* btCompoundCompoundCollisionAlgorithm.cpp */; }; + B6CAB23A1AF9AA1A00B9B856 /* btCompoundCompoundCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0321AF9AA1900B9B856 /* btCompoundCompoundCollisionAlgorithm.cpp */; }; + B6CAB23B1AF9AA1A00B9B856 /* btCompoundCompoundCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0331AF9AA1900B9B856 /* btCompoundCompoundCollisionAlgorithm.h */; }; + B6CAB23C1AF9AA1A00B9B856 /* btCompoundCompoundCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0331AF9AA1900B9B856 /* btCompoundCompoundCollisionAlgorithm.h */; }; + B6CAB23D1AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0341AF9AA1900B9B856 /* btConvex2dConvex2dAlgorithm.cpp */; }; + B6CAB23E1AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0341AF9AA1900B9B856 /* btConvex2dConvex2dAlgorithm.cpp */; }; + B6CAB23F1AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0351AF9AA1900B9B856 /* btConvex2dConvex2dAlgorithm.h */; }; + B6CAB2401AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0351AF9AA1900B9B856 /* btConvex2dConvex2dAlgorithm.h */; }; + B6CAB2411AF9AA1A00B9B856 /* btConvexConcaveCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0361AF9AA1900B9B856 /* btConvexConcaveCollisionAlgorithm.cpp */; }; + B6CAB2421AF9AA1A00B9B856 /* btConvexConcaveCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0361AF9AA1900B9B856 /* btConvexConcaveCollisionAlgorithm.cpp */; }; + B6CAB2431AF9AA1A00B9B856 /* btConvexConcaveCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0371AF9AA1900B9B856 /* btConvexConcaveCollisionAlgorithm.h */; }; + B6CAB2441AF9AA1A00B9B856 /* btConvexConcaveCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0371AF9AA1900B9B856 /* btConvexConcaveCollisionAlgorithm.h */; }; + B6CAB2451AF9AA1A00B9B856 /* btConvexConvexAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0381AF9AA1900B9B856 /* btConvexConvexAlgorithm.cpp */; }; + B6CAB2461AF9AA1A00B9B856 /* btConvexConvexAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0381AF9AA1900B9B856 /* btConvexConvexAlgorithm.cpp */; }; + B6CAB2471AF9AA1A00B9B856 /* btConvexConvexAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0391AF9AA1900B9B856 /* btConvexConvexAlgorithm.h */; }; + B6CAB2481AF9AA1A00B9B856 /* btConvexConvexAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0391AF9AA1900B9B856 /* btConvexConvexAlgorithm.h */; }; + B6CAB2491AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB03A1AF9AA1900B9B856 /* btConvexPlaneCollisionAlgorithm.cpp */; }; + B6CAB24A1AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB03A1AF9AA1900B9B856 /* btConvexPlaneCollisionAlgorithm.cpp */; }; + B6CAB24B1AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB03B1AF9AA1900B9B856 /* btConvexPlaneCollisionAlgorithm.h */; }; + B6CAB24C1AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB03B1AF9AA1900B9B856 /* btConvexPlaneCollisionAlgorithm.h */; }; + B6CAB24D1AF9AA1A00B9B856 /* btDefaultCollisionConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB03C1AF9AA1900B9B856 /* btDefaultCollisionConfiguration.cpp */; }; + B6CAB24E1AF9AA1A00B9B856 /* btDefaultCollisionConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB03C1AF9AA1900B9B856 /* btDefaultCollisionConfiguration.cpp */; }; + B6CAB24F1AF9AA1A00B9B856 /* btDefaultCollisionConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB03D1AF9AA1900B9B856 /* btDefaultCollisionConfiguration.h */; }; + B6CAB2501AF9AA1A00B9B856 /* btDefaultCollisionConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB03D1AF9AA1900B9B856 /* btDefaultCollisionConfiguration.h */; }; + B6CAB2511AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB03E1AF9AA1900B9B856 /* btEmptyCollisionAlgorithm.cpp */; }; + B6CAB2521AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB03E1AF9AA1900B9B856 /* btEmptyCollisionAlgorithm.cpp */; }; + B6CAB2531AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB03F1AF9AA1900B9B856 /* btEmptyCollisionAlgorithm.h */; }; + B6CAB2541AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB03F1AF9AA1900B9B856 /* btEmptyCollisionAlgorithm.h */; }; + B6CAB2551AF9AA1A00B9B856 /* btGhostObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0401AF9AA1900B9B856 /* btGhostObject.cpp */; }; + B6CAB2561AF9AA1A00B9B856 /* btGhostObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0401AF9AA1900B9B856 /* btGhostObject.cpp */; }; + B6CAB2571AF9AA1A00B9B856 /* btGhostObject.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0411AF9AA1900B9B856 /* btGhostObject.h */; }; + B6CAB2581AF9AA1A00B9B856 /* btGhostObject.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0411AF9AA1900B9B856 /* btGhostObject.h */; }; + B6CAB2591AF9AA1A00B9B856 /* btHashedSimplePairCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0421AF9AA1900B9B856 /* btHashedSimplePairCache.cpp */; }; + B6CAB25A1AF9AA1A00B9B856 /* btHashedSimplePairCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0421AF9AA1900B9B856 /* btHashedSimplePairCache.cpp */; }; + B6CAB25B1AF9AA1A00B9B856 /* btHashedSimplePairCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0431AF9AA1900B9B856 /* btHashedSimplePairCache.h */; }; + B6CAB25C1AF9AA1A00B9B856 /* btHashedSimplePairCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0431AF9AA1900B9B856 /* btHashedSimplePairCache.h */; }; + B6CAB25D1AF9AA1A00B9B856 /* btInternalEdgeUtility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0441AF9AA1900B9B856 /* btInternalEdgeUtility.cpp */; }; + B6CAB25E1AF9AA1A00B9B856 /* btInternalEdgeUtility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0441AF9AA1900B9B856 /* btInternalEdgeUtility.cpp */; }; + B6CAB25F1AF9AA1A00B9B856 /* btInternalEdgeUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0451AF9AA1900B9B856 /* btInternalEdgeUtility.h */; }; + B6CAB2601AF9AA1A00B9B856 /* btInternalEdgeUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0451AF9AA1900B9B856 /* btInternalEdgeUtility.h */; }; + B6CAB2611AF9AA1A00B9B856 /* btManifoldResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0461AF9AA1900B9B856 /* btManifoldResult.cpp */; }; + B6CAB2621AF9AA1A00B9B856 /* btManifoldResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0461AF9AA1900B9B856 /* btManifoldResult.cpp */; }; + B6CAB2631AF9AA1A00B9B856 /* btManifoldResult.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0471AF9AA1900B9B856 /* btManifoldResult.h */; }; + B6CAB2641AF9AA1A00B9B856 /* btManifoldResult.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0471AF9AA1900B9B856 /* btManifoldResult.h */; }; + B6CAB2651AF9AA1A00B9B856 /* btSimulationIslandManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0481AF9AA1900B9B856 /* btSimulationIslandManager.cpp */; }; + B6CAB2661AF9AA1A00B9B856 /* btSimulationIslandManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0481AF9AA1900B9B856 /* btSimulationIslandManager.cpp */; }; + B6CAB2671AF9AA1A00B9B856 /* btSimulationIslandManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0491AF9AA1900B9B856 /* btSimulationIslandManager.h */; }; + B6CAB2681AF9AA1A00B9B856 /* btSimulationIslandManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0491AF9AA1900B9B856 /* btSimulationIslandManager.h */; }; + B6CAB2691AF9AA1A00B9B856 /* btSphereBoxCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB04A1AF9AA1900B9B856 /* btSphereBoxCollisionAlgorithm.cpp */; }; + B6CAB26A1AF9AA1A00B9B856 /* btSphereBoxCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB04A1AF9AA1900B9B856 /* btSphereBoxCollisionAlgorithm.cpp */; }; + B6CAB26B1AF9AA1A00B9B856 /* btSphereBoxCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB04B1AF9AA1900B9B856 /* btSphereBoxCollisionAlgorithm.h */; }; + B6CAB26C1AF9AA1A00B9B856 /* btSphereBoxCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB04B1AF9AA1900B9B856 /* btSphereBoxCollisionAlgorithm.h */; }; + B6CAB26D1AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB04C1AF9AA1900B9B856 /* btSphereSphereCollisionAlgorithm.cpp */; }; + B6CAB26E1AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB04C1AF9AA1900B9B856 /* btSphereSphereCollisionAlgorithm.cpp */; }; + B6CAB26F1AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB04D1AF9AA1900B9B856 /* btSphereSphereCollisionAlgorithm.h */; }; + B6CAB2701AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB04D1AF9AA1900B9B856 /* btSphereSphereCollisionAlgorithm.h */; }; + B6CAB2711AF9AA1A00B9B856 /* btSphereTriangleCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB04E1AF9AA1900B9B856 /* btSphereTriangleCollisionAlgorithm.cpp */; }; + B6CAB2721AF9AA1A00B9B856 /* btSphereTriangleCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB04E1AF9AA1900B9B856 /* btSphereTriangleCollisionAlgorithm.cpp */; }; + B6CAB2731AF9AA1A00B9B856 /* btSphereTriangleCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB04F1AF9AA1900B9B856 /* btSphereTriangleCollisionAlgorithm.h */; }; + B6CAB2741AF9AA1A00B9B856 /* btSphereTriangleCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB04F1AF9AA1900B9B856 /* btSphereTriangleCollisionAlgorithm.h */; }; + B6CAB2751AF9AA1A00B9B856 /* btUnionFind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0501AF9AA1900B9B856 /* btUnionFind.cpp */; }; + B6CAB2761AF9AA1A00B9B856 /* btUnionFind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0501AF9AA1900B9B856 /* btUnionFind.cpp */; }; + B6CAB2771AF9AA1A00B9B856 /* btUnionFind.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0511AF9AA1900B9B856 /* btUnionFind.h */; }; + B6CAB2781AF9AA1A00B9B856 /* btUnionFind.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0511AF9AA1900B9B856 /* btUnionFind.h */; }; + B6CAB2791AF9AA1A00B9B856 /* SphereTriangleDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0521AF9AA1900B9B856 /* SphereTriangleDetector.cpp */; }; + B6CAB27A1AF9AA1A00B9B856 /* SphereTriangleDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0521AF9AA1900B9B856 /* SphereTriangleDetector.cpp */; }; + B6CAB27B1AF9AA1A00B9B856 /* SphereTriangleDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0531AF9AA1900B9B856 /* SphereTriangleDetector.h */; }; + B6CAB27C1AF9AA1A00B9B856 /* SphereTriangleDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0531AF9AA1900B9B856 /* SphereTriangleDetector.h */; }; + B6CAB27D1AF9AA1A00B9B856 /* btBox2dShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0551AF9AA1900B9B856 /* btBox2dShape.cpp */; }; + B6CAB27E1AF9AA1A00B9B856 /* btBox2dShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0551AF9AA1900B9B856 /* btBox2dShape.cpp */; }; + B6CAB27F1AF9AA1A00B9B856 /* btBox2dShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0561AF9AA1900B9B856 /* btBox2dShape.h */; }; + B6CAB2801AF9AA1A00B9B856 /* btBox2dShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0561AF9AA1900B9B856 /* btBox2dShape.h */; }; + B6CAB2811AF9AA1A00B9B856 /* btBoxShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0571AF9AA1900B9B856 /* btBoxShape.cpp */; }; + B6CAB2821AF9AA1A00B9B856 /* btBoxShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0571AF9AA1900B9B856 /* btBoxShape.cpp */; }; + B6CAB2831AF9AA1A00B9B856 /* btBoxShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0581AF9AA1900B9B856 /* btBoxShape.h */; }; + B6CAB2841AF9AA1A00B9B856 /* btBoxShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0581AF9AA1900B9B856 /* btBoxShape.h */; }; + B6CAB2851AF9AA1A00B9B856 /* btBvhTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0591AF9AA1900B9B856 /* btBvhTriangleMeshShape.cpp */; }; + B6CAB2861AF9AA1A00B9B856 /* btBvhTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0591AF9AA1900B9B856 /* btBvhTriangleMeshShape.cpp */; }; + B6CAB2871AF9AA1A00B9B856 /* btBvhTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB05A1AF9AA1900B9B856 /* btBvhTriangleMeshShape.h */; }; + B6CAB2881AF9AA1A00B9B856 /* btBvhTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB05A1AF9AA1900B9B856 /* btBvhTriangleMeshShape.h */; }; + B6CAB2891AF9AA1A00B9B856 /* btCapsuleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB05B1AF9AA1900B9B856 /* btCapsuleShape.cpp */; }; + B6CAB28A1AF9AA1A00B9B856 /* btCapsuleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB05B1AF9AA1900B9B856 /* btCapsuleShape.cpp */; }; + B6CAB28B1AF9AA1A00B9B856 /* btCapsuleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB05C1AF9AA1900B9B856 /* btCapsuleShape.h */; }; + B6CAB28C1AF9AA1A00B9B856 /* btCapsuleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB05C1AF9AA1900B9B856 /* btCapsuleShape.h */; }; + B6CAB28D1AF9AA1A00B9B856 /* btCollisionMargin.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB05D1AF9AA1900B9B856 /* btCollisionMargin.h */; }; + B6CAB28E1AF9AA1A00B9B856 /* btCollisionMargin.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB05D1AF9AA1900B9B856 /* btCollisionMargin.h */; }; + B6CAB28F1AF9AA1A00B9B856 /* btCollisionShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB05E1AF9AA1900B9B856 /* btCollisionShape.cpp */; }; + B6CAB2901AF9AA1A00B9B856 /* btCollisionShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB05E1AF9AA1900B9B856 /* btCollisionShape.cpp */; }; + B6CAB2911AF9AA1A00B9B856 /* btCollisionShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB05F1AF9AA1900B9B856 /* btCollisionShape.h */; }; + B6CAB2921AF9AA1A00B9B856 /* btCollisionShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB05F1AF9AA1900B9B856 /* btCollisionShape.h */; }; + B6CAB2931AF9AA1A00B9B856 /* btCompoundShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0601AF9AA1900B9B856 /* btCompoundShape.cpp */; }; + B6CAB2941AF9AA1A00B9B856 /* btCompoundShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0601AF9AA1900B9B856 /* btCompoundShape.cpp */; }; + B6CAB2951AF9AA1A00B9B856 /* btCompoundShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0611AF9AA1900B9B856 /* btCompoundShape.h */; }; + B6CAB2961AF9AA1A00B9B856 /* btCompoundShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0611AF9AA1900B9B856 /* btCompoundShape.h */; }; + B6CAB2971AF9AA1A00B9B856 /* btConcaveShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0621AF9AA1900B9B856 /* btConcaveShape.cpp */; }; + B6CAB2981AF9AA1A00B9B856 /* btConcaveShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0621AF9AA1900B9B856 /* btConcaveShape.cpp */; }; + B6CAB2991AF9AA1A00B9B856 /* btConcaveShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0631AF9AA1900B9B856 /* btConcaveShape.h */; }; + B6CAB29A1AF9AA1A00B9B856 /* btConcaveShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0631AF9AA1900B9B856 /* btConcaveShape.h */; }; + B6CAB29B1AF9AA1A00B9B856 /* btConeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0641AF9AA1900B9B856 /* btConeShape.cpp */; }; + B6CAB29C1AF9AA1A00B9B856 /* btConeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0641AF9AA1900B9B856 /* btConeShape.cpp */; }; + B6CAB29D1AF9AA1A00B9B856 /* btConeShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0651AF9AA1900B9B856 /* btConeShape.h */; }; + B6CAB29E1AF9AA1A00B9B856 /* btConeShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0651AF9AA1900B9B856 /* btConeShape.h */; }; + B6CAB29F1AF9AA1A00B9B856 /* btConvex2dShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0661AF9AA1900B9B856 /* btConvex2dShape.cpp */; }; + B6CAB2A01AF9AA1A00B9B856 /* btConvex2dShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0661AF9AA1900B9B856 /* btConvex2dShape.cpp */; }; + B6CAB2A11AF9AA1A00B9B856 /* btConvex2dShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0671AF9AA1900B9B856 /* btConvex2dShape.h */; }; + B6CAB2A21AF9AA1A00B9B856 /* btConvex2dShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0671AF9AA1900B9B856 /* btConvex2dShape.h */; }; + B6CAB2A31AF9AA1A00B9B856 /* btConvexHullShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0681AF9AA1900B9B856 /* btConvexHullShape.cpp */; }; + B6CAB2A41AF9AA1A00B9B856 /* btConvexHullShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0681AF9AA1900B9B856 /* btConvexHullShape.cpp */; }; + B6CAB2A51AF9AA1A00B9B856 /* btConvexHullShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0691AF9AA1900B9B856 /* btConvexHullShape.h */; }; + B6CAB2A61AF9AA1A00B9B856 /* btConvexHullShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0691AF9AA1900B9B856 /* btConvexHullShape.h */; }; + B6CAB2A71AF9AA1A00B9B856 /* btConvexInternalShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB06A1AF9AA1900B9B856 /* btConvexInternalShape.cpp */; }; + B6CAB2A81AF9AA1A00B9B856 /* btConvexInternalShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB06A1AF9AA1900B9B856 /* btConvexInternalShape.cpp */; }; + B6CAB2A91AF9AA1A00B9B856 /* btConvexInternalShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB06B1AF9AA1900B9B856 /* btConvexInternalShape.h */; }; + B6CAB2AA1AF9AA1A00B9B856 /* btConvexInternalShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB06B1AF9AA1900B9B856 /* btConvexInternalShape.h */; }; + B6CAB2AB1AF9AA1A00B9B856 /* btConvexPointCloudShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB06C1AF9AA1900B9B856 /* btConvexPointCloudShape.cpp */; }; + B6CAB2AC1AF9AA1A00B9B856 /* btConvexPointCloudShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB06C1AF9AA1900B9B856 /* btConvexPointCloudShape.cpp */; }; + B6CAB2AD1AF9AA1A00B9B856 /* btConvexPointCloudShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB06D1AF9AA1900B9B856 /* btConvexPointCloudShape.h */; }; + B6CAB2AE1AF9AA1A00B9B856 /* btConvexPointCloudShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB06D1AF9AA1900B9B856 /* btConvexPointCloudShape.h */; }; + B6CAB2AF1AF9AA1A00B9B856 /* btConvexPolyhedron.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB06E1AF9AA1900B9B856 /* btConvexPolyhedron.cpp */; }; + B6CAB2B01AF9AA1A00B9B856 /* btConvexPolyhedron.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB06E1AF9AA1900B9B856 /* btConvexPolyhedron.cpp */; }; + B6CAB2B11AF9AA1A00B9B856 /* btConvexPolyhedron.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB06F1AF9AA1900B9B856 /* btConvexPolyhedron.h */; }; + B6CAB2B21AF9AA1A00B9B856 /* btConvexPolyhedron.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB06F1AF9AA1900B9B856 /* btConvexPolyhedron.h */; }; + B6CAB2B31AF9AA1A00B9B856 /* btConvexShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0701AF9AA1900B9B856 /* btConvexShape.cpp */; }; + B6CAB2B41AF9AA1A00B9B856 /* btConvexShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0701AF9AA1900B9B856 /* btConvexShape.cpp */; }; + B6CAB2B51AF9AA1A00B9B856 /* btConvexShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0711AF9AA1900B9B856 /* btConvexShape.h */; }; + B6CAB2B61AF9AA1A00B9B856 /* btConvexShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0711AF9AA1900B9B856 /* btConvexShape.h */; }; + B6CAB2B71AF9AA1A00B9B856 /* btConvexTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0721AF9AA1900B9B856 /* btConvexTriangleMeshShape.cpp */; }; + B6CAB2B81AF9AA1A00B9B856 /* btConvexTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0721AF9AA1900B9B856 /* btConvexTriangleMeshShape.cpp */; }; + B6CAB2B91AF9AA1A00B9B856 /* btConvexTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0731AF9AA1900B9B856 /* btConvexTriangleMeshShape.h */; }; + B6CAB2BA1AF9AA1A00B9B856 /* btConvexTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0731AF9AA1900B9B856 /* btConvexTriangleMeshShape.h */; }; + B6CAB2BB1AF9AA1A00B9B856 /* btCylinderShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0741AF9AA1900B9B856 /* btCylinderShape.cpp */; }; + B6CAB2BC1AF9AA1A00B9B856 /* btCylinderShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0741AF9AA1900B9B856 /* btCylinderShape.cpp */; }; + B6CAB2BD1AF9AA1A00B9B856 /* btCylinderShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0751AF9AA1900B9B856 /* btCylinderShape.h */; }; + B6CAB2BE1AF9AA1A00B9B856 /* btCylinderShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0751AF9AA1900B9B856 /* btCylinderShape.h */; }; + B6CAB2BF1AF9AA1A00B9B856 /* btEmptyShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0761AF9AA1900B9B856 /* btEmptyShape.cpp */; }; + B6CAB2C01AF9AA1A00B9B856 /* btEmptyShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0761AF9AA1900B9B856 /* btEmptyShape.cpp */; }; + B6CAB2C11AF9AA1A00B9B856 /* btEmptyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0771AF9AA1900B9B856 /* btEmptyShape.h */; }; + B6CAB2C21AF9AA1A00B9B856 /* btEmptyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0771AF9AA1900B9B856 /* btEmptyShape.h */; }; + B6CAB2C31AF9AA1A00B9B856 /* btHeightfieldTerrainShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0781AF9AA1900B9B856 /* btHeightfieldTerrainShape.cpp */; }; + B6CAB2C41AF9AA1A00B9B856 /* btHeightfieldTerrainShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0781AF9AA1900B9B856 /* btHeightfieldTerrainShape.cpp */; }; + B6CAB2C51AF9AA1A00B9B856 /* btHeightfieldTerrainShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0791AF9AA1900B9B856 /* btHeightfieldTerrainShape.h */; }; + B6CAB2C61AF9AA1A00B9B856 /* btHeightfieldTerrainShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0791AF9AA1900B9B856 /* btHeightfieldTerrainShape.h */; }; + B6CAB2C71AF9AA1A00B9B856 /* btMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB07A1AF9AA1900B9B856 /* btMaterial.h */; }; + B6CAB2C81AF9AA1A00B9B856 /* btMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB07A1AF9AA1900B9B856 /* btMaterial.h */; }; + B6CAB2C91AF9AA1A00B9B856 /* btMinkowskiSumShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB07B1AF9AA1900B9B856 /* btMinkowskiSumShape.cpp */; }; + B6CAB2CA1AF9AA1A00B9B856 /* btMinkowskiSumShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB07B1AF9AA1900B9B856 /* btMinkowskiSumShape.cpp */; }; + B6CAB2CB1AF9AA1A00B9B856 /* btMinkowskiSumShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB07C1AF9AA1900B9B856 /* btMinkowskiSumShape.h */; }; + B6CAB2CC1AF9AA1A00B9B856 /* btMinkowskiSumShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB07C1AF9AA1900B9B856 /* btMinkowskiSumShape.h */; }; + B6CAB2CD1AF9AA1A00B9B856 /* btMultimaterialTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB07D1AF9AA1900B9B856 /* btMultimaterialTriangleMeshShape.cpp */; }; + B6CAB2CE1AF9AA1A00B9B856 /* btMultimaterialTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB07D1AF9AA1900B9B856 /* btMultimaterialTriangleMeshShape.cpp */; }; + B6CAB2CF1AF9AA1A00B9B856 /* btMultimaterialTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB07E1AF9AA1900B9B856 /* btMultimaterialTriangleMeshShape.h */; }; + B6CAB2D01AF9AA1A00B9B856 /* btMultimaterialTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB07E1AF9AA1900B9B856 /* btMultimaterialTriangleMeshShape.h */; }; + B6CAB2D11AF9AA1A00B9B856 /* btMultiSphereShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB07F1AF9AA1900B9B856 /* btMultiSphereShape.cpp */; }; + B6CAB2D21AF9AA1A00B9B856 /* btMultiSphereShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB07F1AF9AA1900B9B856 /* btMultiSphereShape.cpp */; }; + B6CAB2D31AF9AA1A00B9B856 /* btMultiSphereShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0801AF9AA1900B9B856 /* btMultiSphereShape.h */; }; + B6CAB2D41AF9AA1A00B9B856 /* btMultiSphereShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0801AF9AA1900B9B856 /* btMultiSphereShape.h */; }; + B6CAB2D51AF9AA1A00B9B856 /* btOptimizedBvh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0811AF9AA1900B9B856 /* btOptimizedBvh.cpp */; }; + B6CAB2D61AF9AA1A00B9B856 /* btOptimizedBvh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0811AF9AA1900B9B856 /* btOptimizedBvh.cpp */; }; + B6CAB2D71AF9AA1A00B9B856 /* btOptimizedBvh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0821AF9AA1900B9B856 /* btOptimizedBvh.h */; }; + B6CAB2D81AF9AA1A00B9B856 /* btOptimizedBvh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0821AF9AA1900B9B856 /* btOptimizedBvh.h */; }; + B6CAB2D91AF9AA1A00B9B856 /* btPolyhedralConvexShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0831AF9AA1900B9B856 /* btPolyhedralConvexShape.cpp */; }; + B6CAB2DA1AF9AA1A00B9B856 /* btPolyhedralConvexShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0831AF9AA1900B9B856 /* btPolyhedralConvexShape.cpp */; }; + B6CAB2DB1AF9AA1A00B9B856 /* btPolyhedralConvexShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0841AF9AA1900B9B856 /* btPolyhedralConvexShape.h */; }; + B6CAB2DC1AF9AA1A00B9B856 /* btPolyhedralConvexShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0841AF9AA1900B9B856 /* btPolyhedralConvexShape.h */; }; + B6CAB2DD1AF9AA1A00B9B856 /* btScaledBvhTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0851AF9AA1900B9B856 /* btScaledBvhTriangleMeshShape.cpp */; }; + B6CAB2DE1AF9AA1A00B9B856 /* btScaledBvhTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0851AF9AA1900B9B856 /* btScaledBvhTriangleMeshShape.cpp */; }; + B6CAB2DF1AF9AA1A00B9B856 /* btScaledBvhTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0861AF9AA1900B9B856 /* btScaledBvhTriangleMeshShape.h */; }; + B6CAB2E01AF9AA1A00B9B856 /* btScaledBvhTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0861AF9AA1900B9B856 /* btScaledBvhTriangleMeshShape.h */; }; + B6CAB2E11AF9AA1A00B9B856 /* btShapeHull.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0871AF9AA1900B9B856 /* btShapeHull.cpp */; }; + B6CAB2E21AF9AA1A00B9B856 /* btShapeHull.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0871AF9AA1900B9B856 /* btShapeHull.cpp */; }; + B6CAB2E31AF9AA1A00B9B856 /* btShapeHull.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0881AF9AA1900B9B856 /* btShapeHull.h */; }; + B6CAB2E41AF9AA1A00B9B856 /* btShapeHull.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0881AF9AA1900B9B856 /* btShapeHull.h */; }; + B6CAB2E51AF9AA1A00B9B856 /* btSphereShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0891AF9AA1900B9B856 /* btSphereShape.cpp */; }; + B6CAB2E61AF9AA1A00B9B856 /* btSphereShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0891AF9AA1900B9B856 /* btSphereShape.cpp */; }; + B6CAB2E71AF9AA1A00B9B856 /* btSphereShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB08A1AF9AA1900B9B856 /* btSphereShape.h */; }; + B6CAB2E81AF9AA1A00B9B856 /* btSphereShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB08A1AF9AA1900B9B856 /* btSphereShape.h */; }; + B6CAB2E91AF9AA1A00B9B856 /* btStaticPlaneShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB08B1AF9AA1900B9B856 /* btStaticPlaneShape.cpp */; }; + B6CAB2EA1AF9AA1A00B9B856 /* btStaticPlaneShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB08B1AF9AA1900B9B856 /* btStaticPlaneShape.cpp */; }; + B6CAB2EB1AF9AA1A00B9B856 /* btStaticPlaneShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB08C1AF9AA1900B9B856 /* btStaticPlaneShape.h */; }; + B6CAB2EC1AF9AA1A00B9B856 /* btStaticPlaneShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB08C1AF9AA1900B9B856 /* btStaticPlaneShape.h */; }; + B6CAB2ED1AF9AA1A00B9B856 /* btStridingMeshInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB08D1AF9AA1900B9B856 /* btStridingMeshInterface.cpp */; }; + B6CAB2EE1AF9AA1A00B9B856 /* btStridingMeshInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB08D1AF9AA1900B9B856 /* btStridingMeshInterface.cpp */; }; + B6CAB2EF1AF9AA1A00B9B856 /* btStridingMeshInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB08E1AF9AA1900B9B856 /* btStridingMeshInterface.h */; }; + B6CAB2F01AF9AA1A00B9B856 /* btStridingMeshInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB08E1AF9AA1900B9B856 /* btStridingMeshInterface.h */; }; + B6CAB2F11AF9AA1A00B9B856 /* btTetrahedronShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB08F1AF9AA1900B9B856 /* btTetrahedronShape.cpp */; }; + B6CAB2F21AF9AA1A00B9B856 /* btTetrahedronShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB08F1AF9AA1900B9B856 /* btTetrahedronShape.cpp */; }; + B6CAB2F31AF9AA1A00B9B856 /* btTetrahedronShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0901AF9AA1900B9B856 /* btTetrahedronShape.h */; }; + B6CAB2F41AF9AA1A00B9B856 /* btTetrahedronShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0901AF9AA1900B9B856 /* btTetrahedronShape.h */; }; + B6CAB2F51AF9AA1A00B9B856 /* btTriangleBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0911AF9AA1900B9B856 /* btTriangleBuffer.cpp */; }; + B6CAB2F61AF9AA1A00B9B856 /* btTriangleBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0911AF9AA1900B9B856 /* btTriangleBuffer.cpp */; }; + B6CAB2F71AF9AA1A00B9B856 /* btTriangleBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0921AF9AA1900B9B856 /* btTriangleBuffer.h */; }; + B6CAB2F81AF9AA1A00B9B856 /* btTriangleBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0921AF9AA1900B9B856 /* btTriangleBuffer.h */; }; + B6CAB2F91AF9AA1A00B9B856 /* btTriangleCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0931AF9AA1900B9B856 /* btTriangleCallback.cpp */; }; + B6CAB2FA1AF9AA1A00B9B856 /* btTriangleCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0931AF9AA1900B9B856 /* btTriangleCallback.cpp */; }; + B6CAB2FB1AF9AA1A00B9B856 /* btTriangleCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0941AF9AA1900B9B856 /* btTriangleCallback.h */; }; + B6CAB2FC1AF9AA1A00B9B856 /* btTriangleCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0941AF9AA1900B9B856 /* btTriangleCallback.h */; }; + B6CAB2FD1AF9AA1A00B9B856 /* btTriangleIndexVertexArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0951AF9AA1900B9B856 /* btTriangleIndexVertexArray.cpp */; }; + B6CAB2FE1AF9AA1A00B9B856 /* btTriangleIndexVertexArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0951AF9AA1900B9B856 /* btTriangleIndexVertexArray.cpp */; }; + B6CAB2FF1AF9AA1A00B9B856 /* btTriangleIndexVertexArray.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0961AF9AA1900B9B856 /* btTriangleIndexVertexArray.h */; }; + B6CAB3001AF9AA1A00B9B856 /* btTriangleIndexVertexArray.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0961AF9AA1900B9B856 /* btTriangleIndexVertexArray.h */; }; + B6CAB3011AF9AA1A00B9B856 /* btTriangleIndexVertexMaterialArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0971AF9AA1900B9B856 /* btTriangleIndexVertexMaterialArray.cpp */; }; + B6CAB3021AF9AA1A00B9B856 /* btTriangleIndexVertexMaterialArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0971AF9AA1900B9B856 /* btTriangleIndexVertexMaterialArray.cpp */; }; + B6CAB3031AF9AA1A00B9B856 /* btTriangleIndexVertexMaterialArray.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0981AF9AA1900B9B856 /* btTriangleIndexVertexMaterialArray.h */; }; + B6CAB3041AF9AA1A00B9B856 /* btTriangleIndexVertexMaterialArray.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0981AF9AA1900B9B856 /* btTriangleIndexVertexMaterialArray.h */; }; + B6CAB3051AF9AA1A00B9B856 /* btTriangleInfoMap.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0991AF9AA1900B9B856 /* btTriangleInfoMap.h */; }; + B6CAB3061AF9AA1A00B9B856 /* btTriangleInfoMap.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0991AF9AA1900B9B856 /* btTriangleInfoMap.h */; }; + B6CAB3071AF9AA1A00B9B856 /* btTriangleMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB09A1AF9AA1900B9B856 /* btTriangleMesh.cpp */; }; + B6CAB3081AF9AA1A00B9B856 /* btTriangleMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB09A1AF9AA1900B9B856 /* btTriangleMesh.cpp */; }; + B6CAB3091AF9AA1A00B9B856 /* btTriangleMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB09B1AF9AA1900B9B856 /* btTriangleMesh.h */; }; + B6CAB30A1AF9AA1A00B9B856 /* btTriangleMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB09B1AF9AA1900B9B856 /* btTriangleMesh.h */; }; + B6CAB30B1AF9AA1A00B9B856 /* btTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB09C1AF9AA1900B9B856 /* btTriangleMeshShape.cpp */; }; + B6CAB30C1AF9AA1A00B9B856 /* btTriangleMeshShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB09C1AF9AA1900B9B856 /* btTriangleMeshShape.cpp */; }; + B6CAB30D1AF9AA1A00B9B856 /* btTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB09D1AF9AA1900B9B856 /* btTriangleMeshShape.h */; }; + B6CAB30E1AF9AA1A00B9B856 /* btTriangleMeshShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB09D1AF9AA1900B9B856 /* btTriangleMeshShape.h */; }; + B6CAB30F1AF9AA1A00B9B856 /* btTriangleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB09E1AF9AA1900B9B856 /* btTriangleShape.h */; }; + B6CAB3101AF9AA1A00B9B856 /* btTriangleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB09E1AF9AA1900B9B856 /* btTriangleShape.h */; }; + B6CAB3111AF9AA1A00B9B856 /* btUniformScalingShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB09F1AF9AA1900B9B856 /* btUniformScalingShape.cpp */; }; + B6CAB3121AF9AA1A00B9B856 /* btUniformScalingShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB09F1AF9AA1900B9B856 /* btUniformScalingShape.cpp */; }; + B6CAB3131AF9AA1A00B9B856 /* btUniformScalingShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A01AF9AA1900B9B856 /* btUniformScalingShape.h */; }; + B6CAB3141AF9AA1A00B9B856 /* btUniformScalingShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A01AF9AA1900B9B856 /* btUniformScalingShape.h */; }; + B6CAB3151AF9AA1A00B9B856 /* btBoxCollision.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A21AF9AA1900B9B856 /* btBoxCollision.h */; }; + B6CAB3161AF9AA1A00B9B856 /* btBoxCollision.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A21AF9AA1900B9B856 /* btBoxCollision.h */; }; + B6CAB3171AF9AA1A00B9B856 /* btClipPolygon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A31AF9AA1900B9B856 /* btClipPolygon.h */; }; + B6CAB3181AF9AA1A00B9B856 /* btClipPolygon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A31AF9AA1900B9B856 /* btClipPolygon.h */; }; + B6CAB3191AF9AA1A00B9B856 /* btCompoundFromGimpact.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A41AF9AA1900B9B856 /* btCompoundFromGimpact.h */; }; + B6CAB31A1AF9AA1A00B9B856 /* btCompoundFromGimpact.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A41AF9AA1900B9B856 /* btCompoundFromGimpact.h */; }; + B6CAB31B1AF9AA1A00B9B856 /* btContactProcessing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0A51AF9AA1900B9B856 /* btContactProcessing.cpp */; }; + B6CAB31C1AF9AA1A00B9B856 /* btContactProcessing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0A51AF9AA1900B9B856 /* btContactProcessing.cpp */; }; + B6CAB31D1AF9AA1A00B9B856 /* btContactProcessing.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A61AF9AA1900B9B856 /* btContactProcessing.h */; }; + B6CAB31E1AF9AA1A00B9B856 /* btContactProcessing.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A61AF9AA1900B9B856 /* btContactProcessing.h */; }; + B6CAB31F1AF9AA1A00B9B856 /* btGenericPoolAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0A71AF9AA1900B9B856 /* btGenericPoolAllocator.cpp */; }; + B6CAB3201AF9AA1A00B9B856 /* btGenericPoolAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0A71AF9AA1900B9B856 /* btGenericPoolAllocator.cpp */; }; + B6CAB3211AF9AA1A00B9B856 /* btGenericPoolAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A81AF9AA1900B9B856 /* btGenericPoolAllocator.h */; }; + B6CAB3221AF9AA1A00B9B856 /* btGenericPoolAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A81AF9AA1900B9B856 /* btGenericPoolAllocator.h */; }; + B6CAB3231AF9AA1A00B9B856 /* btGeometryOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A91AF9AA1900B9B856 /* btGeometryOperations.h */; }; + B6CAB3241AF9AA1A00B9B856 /* btGeometryOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0A91AF9AA1900B9B856 /* btGeometryOperations.h */; }; + B6CAB3251AF9AA1A00B9B856 /* btGImpactBvh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0AA1AF9AA1900B9B856 /* btGImpactBvh.cpp */; }; + B6CAB3261AF9AA1A00B9B856 /* btGImpactBvh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0AA1AF9AA1900B9B856 /* btGImpactBvh.cpp */; }; + B6CAB3271AF9AA1A00B9B856 /* btGImpactBvh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0AB1AF9AA1900B9B856 /* btGImpactBvh.h */; }; + B6CAB3281AF9AA1A00B9B856 /* btGImpactBvh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0AB1AF9AA1900B9B856 /* btGImpactBvh.h */; }; + B6CAB3291AF9AA1A00B9B856 /* btGImpactCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0AC1AF9AA1900B9B856 /* btGImpactCollisionAlgorithm.cpp */; }; + B6CAB32A1AF9AA1A00B9B856 /* btGImpactCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0AC1AF9AA1900B9B856 /* btGImpactCollisionAlgorithm.cpp */; }; + B6CAB32B1AF9AA1A00B9B856 /* btGImpactCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0AD1AF9AA1900B9B856 /* btGImpactCollisionAlgorithm.h */; }; + B6CAB32C1AF9AA1A00B9B856 /* btGImpactCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0AD1AF9AA1900B9B856 /* btGImpactCollisionAlgorithm.h */; }; + B6CAB32D1AF9AA1A00B9B856 /* btGImpactMassUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0AE1AF9AA1900B9B856 /* btGImpactMassUtil.h */; }; + B6CAB32E1AF9AA1A00B9B856 /* btGImpactMassUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0AE1AF9AA1900B9B856 /* btGImpactMassUtil.h */; }; + B6CAB32F1AF9AA1A00B9B856 /* btGImpactQuantizedBvh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0AF1AF9AA1900B9B856 /* btGImpactQuantizedBvh.cpp */; }; + B6CAB3301AF9AA1A00B9B856 /* btGImpactQuantizedBvh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0AF1AF9AA1900B9B856 /* btGImpactQuantizedBvh.cpp */; }; + B6CAB3311AF9AA1A00B9B856 /* btGImpactQuantizedBvh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B01AF9AA1900B9B856 /* btGImpactQuantizedBvh.h */; }; + B6CAB3321AF9AA1A00B9B856 /* btGImpactQuantizedBvh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B01AF9AA1900B9B856 /* btGImpactQuantizedBvh.h */; }; + B6CAB3331AF9AA1A00B9B856 /* btGImpactShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0B11AF9AA1900B9B856 /* btGImpactShape.cpp */; }; + B6CAB3341AF9AA1A00B9B856 /* btGImpactShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0B11AF9AA1900B9B856 /* btGImpactShape.cpp */; }; + B6CAB3351AF9AA1A00B9B856 /* btGImpactShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B21AF9AA1900B9B856 /* btGImpactShape.h */; }; + B6CAB3361AF9AA1A00B9B856 /* btGImpactShape.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B21AF9AA1900B9B856 /* btGImpactShape.h */; }; + B6CAB3371AF9AA1A00B9B856 /* btQuantization.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B31AF9AA1900B9B856 /* btQuantization.h */; }; + B6CAB3381AF9AA1A00B9B856 /* btQuantization.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B31AF9AA1900B9B856 /* btQuantization.h */; }; + B6CAB3391AF9AA1A00B9B856 /* btTriangleShapeEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0B41AF9AA1900B9B856 /* btTriangleShapeEx.cpp */; }; + B6CAB33A1AF9AA1A00B9B856 /* btTriangleShapeEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0B41AF9AA1900B9B856 /* btTriangleShapeEx.cpp */; }; + B6CAB33B1AF9AA1A00B9B856 /* btTriangleShapeEx.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B51AF9AA1900B9B856 /* btTriangleShapeEx.h */; }; + B6CAB33C1AF9AA1A00B9B856 /* btTriangleShapeEx.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B51AF9AA1900B9B856 /* btTriangleShapeEx.h */; }; + B6CAB33D1AF9AA1A00B9B856 /* gim_array.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B61AF9AA1900B9B856 /* gim_array.h */; }; + B6CAB33E1AF9AA1A00B9B856 /* gim_array.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B61AF9AA1900B9B856 /* gim_array.h */; }; + B6CAB33F1AF9AA1A00B9B856 /* gim_basic_geometry_operations.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B71AF9AA1900B9B856 /* gim_basic_geometry_operations.h */; }; + B6CAB3401AF9AA1A00B9B856 /* gim_basic_geometry_operations.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B71AF9AA1900B9B856 /* gim_basic_geometry_operations.h */; }; + B6CAB3411AF9AA1A00B9B856 /* gim_bitset.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B81AF9AA1900B9B856 /* gim_bitset.h */; }; + B6CAB3421AF9AA1A00B9B856 /* gim_bitset.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B81AF9AA1900B9B856 /* gim_bitset.h */; }; + B6CAB3431AF9AA1A00B9B856 /* gim_box_collision.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B91AF9AA1900B9B856 /* gim_box_collision.h */; }; + B6CAB3441AF9AA1A00B9B856 /* gim_box_collision.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0B91AF9AA1900B9B856 /* gim_box_collision.h */; }; + B6CAB3451AF9AA1A00B9B856 /* gim_box_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0BA1AF9AA1900B9B856 /* gim_box_set.cpp */; }; + B6CAB3461AF9AA1A00B9B856 /* gim_box_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0BA1AF9AA1900B9B856 /* gim_box_set.cpp */; }; + B6CAB3471AF9AA1A00B9B856 /* gim_box_set.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0BB1AF9AA1900B9B856 /* gim_box_set.h */; }; + B6CAB3481AF9AA1A00B9B856 /* gim_box_set.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0BB1AF9AA1900B9B856 /* gim_box_set.h */; }; + B6CAB3491AF9AA1A00B9B856 /* gim_clip_polygon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0BC1AF9AA1900B9B856 /* gim_clip_polygon.h */; }; + B6CAB34A1AF9AA1A00B9B856 /* gim_clip_polygon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0BC1AF9AA1900B9B856 /* gim_clip_polygon.h */; }; + B6CAB34B1AF9AA1A00B9B856 /* gim_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0BD1AF9AA1900B9B856 /* gim_contact.cpp */; }; + B6CAB34C1AF9AA1A00B9B856 /* gim_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0BD1AF9AA1900B9B856 /* gim_contact.cpp */; }; + B6CAB34D1AF9AA1A00B9B856 /* gim_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0BE1AF9AA1900B9B856 /* gim_contact.h */; }; + B6CAB34E1AF9AA1A00B9B856 /* gim_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0BE1AF9AA1900B9B856 /* gim_contact.h */; }; + B6CAB34F1AF9AA1A00B9B856 /* gim_geom_types.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0BF1AF9AA1900B9B856 /* gim_geom_types.h */; }; + B6CAB3501AF9AA1A00B9B856 /* gim_geom_types.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0BF1AF9AA1900B9B856 /* gim_geom_types.h */; }; + B6CAB3511AF9AA1A00B9B856 /* gim_geometry.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C01AF9AA1900B9B856 /* gim_geometry.h */; }; + B6CAB3521AF9AA1A00B9B856 /* gim_geometry.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C01AF9AA1900B9B856 /* gim_geometry.h */; }; + B6CAB3531AF9AA1A00B9B856 /* gim_hash_table.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C11AF9AA1900B9B856 /* gim_hash_table.h */; }; + B6CAB3541AF9AA1A00B9B856 /* gim_hash_table.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C11AF9AA1900B9B856 /* gim_hash_table.h */; }; + B6CAB3551AF9AA1A00B9B856 /* gim_linear_math.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C21AF9AA1900B9B856 /* gim_linear_math.h */; }; + B6CAB3561AF9AA1A00B9B856 /* gim_linear_math.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C21AF9AA1900B9B856 /* gim_linear_math.h */; }; + B6CAB3571AF9AA1A00B9B856 /* gim_math.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C31AF9AA1900B9B856 /* gim_math.h */; }; + B6CAB3581AF9AA1A00B9B856 /* gim_math.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C31AF9AA1900B9B856 /* gim_math.h */; }; + B6CAB3591AF9AA1A00B9B856 /* gim_memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0C41AF9AA1900B9B856 /* gim_memory.cpp */; }; + B6CAB35A1AF9AA1A00B9B856 /* gim_memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0C41AF9AA1900B9B856 /* gim_memory.cpp */; }; + B6CAB35B1AF9AA1A00B9B856 /* gim_memory.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C51AF9AA1900B9B856 /* gim_memory.h */; }; + B6CAB35C1AF9AA1A00B9B856 /* gim_memory.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C51AF9AA1900B9B856 /* gim_memory.h */; }; + B6CAB35D1AF9AA1A00B9B856 /* gim_radixsort.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C61AF9AA1900B9B856 /* gim_radixsort.h */; }; + B6CAB35E1AF9AA1A00B9B856 /* gim_radixsort.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C61AF9AA1900B9B856 /* gim_radixsort.h */; }; + B6CAB35F1AF9AA1A00B9B856 /* gim_tri_collision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0C71AF9AA1900B9B856 /* gim_tri_collision.cpp */; }; + B6CAB3601AF9AA1A00B9B856 /* gim_tri_collision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0C71AF9AA1900B9B856 /* gim_tri_collision.cpp */; }; + B6CAB3611AF9AA1A00B9B856 /* gim_tri_collision.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C81AF9AA1900B9B856 /* gim_tri_collision.h */; }; + B6CAB3621AF9AA1A00B9B856 /* gim_tri_collision.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0C81AF9AA1900B9B856 /* gim_tri_collision.h */; }; + B6CAB3631AF9AA1A00B9B856 /* btContinuousConvexCollision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0CA1AF9AA1900B9B856 /* btContinuousConvexCollision.cpp */; }; + B6CAB3641AF9AA1A00B9B856 /* btContinuousConvexCollision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0CA1AF9AA1900B9B856 /* btContinuousConvexCollision.cpp */; }; + B6CAB3651AF9AA1A00B9B856 /* btContinuousConvexCollision.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0CB1AF9AA1900B9B856 /* btContinuousConvexCollision.h */; }; + B6CAB3661AF9AA1A00B9B856 /* btContinuousConvexCollision.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0CB1AF9AA1900B9B856 /* btContinuousConvexCollision.h */; }; + B6CAB3671AF9AA1A00B9B856 /* btConvexCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0CC1AF9AA1900B9B856 /* btConvexCast.cpp */; }; + B6CAB3681AF9AA1A00B9B856 /* btConvexCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0CC1AF9AA1900B9B856 /* btConvexCast.cpp */; }; + B6CAB3691AF9AA1A00B9B856 /* btConvexCast.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0CD1AF9AA1900B9B856 /* btConvexCast.h */; }; + B6CAB36A1AF9AA1A00B9B856 /* btConvexCast.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0CD1AF9AA1900B9B856 /* btConvexCast.h */; }; + B6CAB36B1AF9AA1A00B9B856 /* btConvexPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0CE1AF9AA1900B9B856 /* btConvexPenetrationDepthSolver.h */; }; + B6CAB36C1AF9AA1A00B9B856 /* btConvexPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0CE1AF9AA1900B9B856 /* btConvexPenetrationDepthSolver.h */; }; + B6CAB36D1AF9AA1A00B9B856 /* btDiscreteCollisionDetectorInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0CF1AF9AA1900B9B856 /* btDiscreteCollisionDetectorInterface.h */; }; + B6CAB36E1AF9AA1A00B9B856 /* btDiscreteCollisionDetectorInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0CF1AF9AA1900B9B856 /* btDiscreteCollisionDetectorInterface.h */; }; + B6CAB36F1AF9AA1A00B9B856 /* btGjkConvexCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D01AF9AA1900B9B856 /* btGjkConvexCast.cpp */; }; + B6CAB3701AF9AA1A00B9B856 /* btGjkConvexCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D01AF9AA1900B9B856 /* btGjkConvexCast.cpp */; }; + B6CAB3711AF9AA1A00B9B856 /* btGjkConvexCast.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D11AF9AA1900B9B856 /* btGjkConvexCast.h */; }; + B6CAB3721AF9AA1A00B9B856 /* btGjkConvexCast.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D11AF9AA1900B9B856 /* btGjkConvexCast.h */; }; + B6CAB3731AF9AA1A00B9B856 /* btGjkEpa2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D21AF9AA1900B9B856 /* btGjkEpa2.cpp */; }; + B6CAB3741AF9AA1A00B9B856 /* btGjkEpa2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D21AF9AA1900B9B856 /* btGjkEpa2.cpp */; }; + B6CAB3751AF9AA1A00B9B856 /* btGjkEpa2.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D31AF9AA1900B9B856 /* btGjkEpa2.h */; }; + B6CAB3761AF9AA1A00B9B856 /* btGjkEpa2.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D31AF9AA1900B9B856 /* btGjkEpa2.h */; }; + B6CAB3771AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D41AF9AA1900B9B856 /* btGjkEpaPenetrationDepthSolver.cpp */; }; + B6CAB3781AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D41AF9AA1900B9B856 /* btGjkEpaPenetrationDepthSolver.cpp */; }; + B6CAB3791AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D51AF9AA1900B9B856 /* btGjkEpaPenetrationDepthSolver.h */; }; + B6CAB37A1AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D51AF9AA1900B9B856 /* btGjkEpaPenetrationDepthSolver.h */; }; + B6CAB37B1AF9AA1A00B9B856 /* btGjkPairDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D61AF9AA1900B9B856 /* btGjkPairDetector.cpp */; }; + B6CAB37C1AF9AA1A00B9B856 /* btGjkPairDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D61AF9AA1900B9B856 /* btGjkPairDetector.cpp */; }; + B6CAB37D1AF9AA1A00B9B856 /* btGjkPairDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D71AF9AA1900B9B856 /* btGjkPairDetector.h */; }; + B6CAB37E1AF9AA1A00B9B856 /* btGjkPairDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D71AF9AA1900B9B856 /* btGjkPairDetector.h */; }; + B6CAB37F1AF9AA1A00B9B856 /* btManifoldPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D81AF9AA1900B9B856 /* btManifoldPoint.h */; }; + B6CAB3801AF9AA1A00B9B856 /* btManifoldPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0D81AF9AA1900B9B856 /* btManifoldPoint.h */; }; + B6CAB3811AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D91AF9AA1900B9B856 /* btMinkowskiPenetrationDepthSolver.cpp */; }; + B6CAB3821AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0D91AF9AA1900B9B856 /* btMinkowskiPenetrationDepthSolver.cpp */; }; + B6CAB3831AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0DA1AF9AA1900B9B856 /* btMinkowskiPenetrationDepthSolver.h */; }; + B6CAB3841AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0DA1AF9AA1900B9B856 /* btMinkowskiPenetrationDepthSolver.h */; }; + B6CAB3851AF9AA1A00B9B856 /* btPersistentManifold.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0DB1AF9AA1900B9B856 /* btPersistentManifold.cpp */; }; + B6CAB3861AF9AA1A00B9B856 /* btPersistentManifold.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0DB1AF9AA1900B9B856 /* btPersistentManifold.cpp */; }; + B6CAB3871AF9AA1A00B9B856 /* btPersistentManifold.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0DC1AF9AA1900B9B856 /* btPersistentManifold.h */; }; + B6CAB3881AF9AA1A00B9B856 /* btPersistentManifold.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0DC1AF9AA1900B9B856 /* btPersistentManifold.h */; }; + B6CAB3891AF9AA1A00B9B856 /* btPointCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0DD1AF9AA1900B9B856 /* btPointCollector.h */; }; + B6CAB38A1AF9AA1A00B9B856 /* btPointCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0DD1AF9AA1900B9B856 /* btPointCollector.h */; }; + B6CAB38B1AF9AA1A00B9B856 /* btPolyhedralContactClipping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0DE1AF9AA1900B9B856 /* btPolyhedralContactClipping.cpp */; }; + B6CAB38C1AF9AA1A00B9B856 /* btPolyhedralContactClipping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0DE1AF9AA1900B9B856 /* btPolyhedralContactClipping.cpp */; }; + B6CAB38D1AF9AA1A00B9B856 /* btPolyhedralContactClipping.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0DF1AF9AA1900B9B856 /* btPolyhedralContactClipping.h */; }; + B6CAB38E1AF9AA1A00B9B856 /* btPolyhedralContactClipping.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0DF1AF9AA1900B9B856 /* btPolyhedralContactClipping.h */; }; + B6CAB38F1AF9AA1A00B9B856 /* btRaycastCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0E01AF9AA1900B9B856 /* btRaycastCallback.cpp */; }; + B6CAB3901AF9AA1A00B9B856 /* btRaycastCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0E01AF9AA1900B9B856 /* btRaycastCallback.cpp */; }; + B6CAB3911AF9AA1A00B9B856 /* btRaycastCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E11AF9AA1900B9B856 /* btRaycastCallback.h */; }; + B6CAB3921AF9AA1A00B9B856 /* btRaycastCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E11AF9AA1900B9B856 /* btRaycastCallback.h */; }; + B6CAB3931AF9AA1A00B9B856 /* btSimplexSolverInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E21AF9AA1900B9B856 /* btSimplexSolverInterface.h */; }; + B6CAB3941AF9AA1A00B9B856 /* btSimplexSolverInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E21AF9AA1900B9B856 /* btSimplexSolverInterface.h */; }; + B6CAB3951AF9AA1A00B9B856 /* btSubSimplexConvexCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0E31AF9AA1900B9B856 /* btSubSimplexConvexCast.cpp */; }; + B6CAB3961AF9AA1A00B9B856 /* btSubSimplexConvexCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0E31AF9AA1900B9B856 /* btSubSimplexConvexCast.cpp */; }; + B6CAB3971AF9AA1A00B9B856 /* btSubSimplexConvexCast.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E41AF9AA1900B9B856 /* btSubSimplexConvexCast.h */; }; + B6CAB3981AF9AA1A00B9B856 /* btSubSimplexConvexCast.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E41AF9AA1900B9B856 /* btSubSimplexConvexCast.h */; }; + B6CAB3991AF9AA1A00B9B856 /* btVoronoiSimplexSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0E51AF9AA1900B9B856 /* btVoronoiSimplexSolver.cpp */; }; + B6CAB39A1AF9AA1A00B9B856 /* btVoronoiSimplexSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0E51AF9AA1900B9B856 /* btVoronoiSimplexSolver.cpp */; }; + B6CAB39B1AF9AA1A00B9B856 /* btVoronoiSimplexSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E61AF9AA1900B9B856 /* btVoronoiSimplexSolver.h */; }; + B6CAB39C1AF9AA1A00B9B856 /* btVoronoiSimplexSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E61AF9AA1900B9B856 /* btVoronoiSimplexSolver.h */; }; + B6CAB39D1AF9AA1A00B9B856 /* btCharacterControllerInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E91AF9AA1900B9B856 /* btCharacterControllerInterface.h */; }; + B6CAB39E1AF9AA1A00B9B856 /* btCharacterControllerInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0E91AF9AA1900B9B856 /* btCharacterControllerInterface.h */; }; + B6CAB39F1AF9AA1A00B9B856 /* btKinematicCharacterController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0EA1AF9AA1900B9B856 /* btKinematicCharacterController.cpp */; }; + B6CAB3A01AF9AA1A00B9B856 /* btKinematicCharacterController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0EA1AF9AA1900B9B856 /* btKinematicCharacterController.cpp */; }; + B6CAB3A11AF9AA1A00B9B856 /* btKinematicCharacterController.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0EB1AF9AA1900B9B856 /* btKinematicCharacterController.h */; }; + B6CAB3A21AF9AA1A00B9B856 /* btKinematicCharacterController.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0EB1AF9AA1900B9B856 /* btKinematicCharacterController.h */; }; + B6CAB3A31AF9AA1A00B9B856 /* btConeTwistConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0ED1AF9AA1900B9B856 /* btConeTwistConstraint.cpp */; }; + B6CAB3A41AF9AA1A00B9B856 /* btConeTwistConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0ED1AF9AA1900B9B856 /* btConeTwistConstraint.cpp */; }; + B6CAB3A51AF9AA1A00B9B856 /* btConeTwistConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0EE1AF9AA1900B9B856 /* btConeTwistConstraint.h */; }; + B6CAB3A61AF9AA1A00B9B856 /* btConeTwistConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0EE1AF9AA1900B9B856 /* btConeTwistConstraint.h */; }; + B6CAB3A71AF9AA1A00B9B856 /* btConstraintSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0EF1AF9AA1900B9B856 /* btConstraintSolver.h */; }; + B6CAB3A81AF9AA1A00B9B856 /* btConstraintSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0EF1AF9AA1900B9B856 /* btConstraintSolver.h */; }; + B6CAB3A91AF9AA1A00B9B856 /* btContactConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F01AF9AA1900B9B856 /* btContactConstraint.cpp */; }; + B6CAB3AA1AF9AA1A00B9B856 /* btContactConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F01AF9AA1900B9B856 /* btContactConstraint.cpp */; }; + B6CAB3AB1AF9AA1A00B9B856 /* btContactConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F11AF9AA1900B9B856 /* btContactConstraint.h */; }; + B6CAB3AC1AF9AA1A00B9B856 /* btContactConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F11AF9AA1900B9B856 /* btContactConstraint.h */; }; + B6CAB3AD1AF9AA1A00B9B856 /* btContactSolverInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F21AF9AA1900B9B856 /* btContactSolverInfo.h */; }; + B6CAB3AE1AF9AA1A00B9B856 /* btContactSolverInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F21AF9AA1900B9B856 /* btContactSolverInfo.h */; }; + B6CAB3AF1AF9AA1A00B9B856 /* btFixedConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F31AF9AA1900B9B856 /* btFixedConstraint.cpp */; }; + B6CAB3B01AF9AA1A00B9B856 /* btFixedConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F31AF9AA1900B9B856 /* btFixedConstraint.cpp */; }; + B6CAB3B11AF9AA1A00B9B856 /* btFixedConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F41AF9AA1900B9B856 /* btFixedConstraint.h */; }; + B6CAB3B21AF9AA1A00B9B856 /* btFixedConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F41AF9AA1900B9B856 /* btFixedConstraint.h */; }; + B6CAB3B31AF9AA1A00B9B856 /* btGearConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F51AF9AA1900B9B856 /* btGearConstraint.cpp */; }; + B6CAB3B41AF9AA1A00B9B856 /* btGearConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F51AF9AA1900B9B856 /* btGearConstraint.cpp */; }; + B6CAB3B51AF9AA1A00B9B856 /* btGearConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F61AF9AA1900B9B856 /* btGearConstraint.h */; }; + B6CAB3B61AF9AA1A00B9B856 /* btGearConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F61AF9AA1900B9B856 /* btGearConstraint.h */; }; + B6CAB3B71AF9AA1A00B9B856 /* btGeneric6DofConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F71AF9AA1900B9B856 /* btGeneric6DofConstraint.cpp */; }; + B6CAB3B81AF9AA1A00B9B856 /* btGeneric6DofConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F71AF9AA1900B9B856 /* btGeneric6DofConstraint.cpp */; }; + B6CAB3B91AF9AA1A00B9B856 /* btGeneric6DofConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F81AF9AA1900B9B856 /* btGeneric6DofConstraint.h */; }; + B6CAB3BA1AF9AA1A00B9B856 /* btGeneric6DofConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0F81AF9AA1900B9B856 /* btGeneric6DofConstraint.h */; }; + B6CAB3BB1AF9AA1A00B9B856 /* btGeneric6DofSpringConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F91AF9AA1900B9B856 /* btGeneric6DofSpringConstraint.cpp */; }; + B6CAB3BC1AF9AA1A00B9B856 /* btGeneric6DofSpringConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0F91AF9AA1900B9B856 /* btGeneric6DofSpringConstraint.cpp */; }; + B6CAB3BD1AF9AA1A00B9B856 /* btGeneric6DofSpringConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0FA1AF9AA1900B9B856 /* btGeneric6DofSpringConstraint.h */; }; + B6CAB3BE1AF9AA1A00B9B856 /* btGeneric6DofSpringConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0FA1AF9AA1900B9B856 /* btGeneric6DofSpringConstraint.h */; }; + B6CAB3BF1AF9AA1A00B9B856 /* btHinge2Constraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0FB1AF9AA1900B9B856 /* btHinge2Constraint.cpp */; }; + B6CAB3C01AF9AA1A00B9B856 /* btHinge2Constraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0FB1AF9AA1900B9B856 /* btHinge2Constraint.cpp */; }; + B6CAB3C11AF9AA1A00B9B856 /* btHinge2Constraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0FC1AF9AA1900B9B856 /* btHinge2Constraint.h */; }; + B6CAB3C21AF9AA1A00B9B856 /* btHinge2Constraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0FC1AF9AA1900B9B856 /* btHinge2Constraint.h */; }; + B6CAB3C31AF9AA1A00B9B856 /* btHingeConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0FD1AF9AA1900B9B856 /* btHingeConstraint.cpp */; }; + B6CAB3C41AF9AA1A00B9B856 /* btHingeConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB0FD1AF9AA1900B9B856 /* btHingeConstraint.cpp */; }; + B6CAB3C51AF9AA1A00B9B856 /* btHingeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0FE1AF9AA1900B9B856 /* btHingeConstraint.h */; }; + B6CAB3C61AF9AA1A00B9B856 /* btHingeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0FE1AF9AA1900B9B856 /* btHingeConstraint.h */; }; + B6CAB3C71AF9AA1A00B9B856 /* btJacobianEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0FF1AF9AA1900B9B856 /* btJacobianEntry.h */; }; + B6CAB3C81AF9AA1A00B9B856 /* btJacobianEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB0FF1AF9AA1900B9B856 /* btJacobianEntry.h */; }; + B6CAB3C91AF9AA1A00B9B856 /* btPoint2PointConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1001AF9AA1900B9B856 /* btPoint2PointConstraint.cpp */; }; + B6CAB3CA1AF9AA1A00B9B856 /* btPoint2PointConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1001AF9AA1900B9B856 /* btPoint2PointConstraint.cpp */; }; + B6CAB3CB1AF9AA1A00B9B856 /* btPoint2PointConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1011AF9AA1900B9B856 /* btPoint2PointConstraint.h */; }; + B6CAB3CC1AF9AA1A00B9B856 /* btPoint2PointConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1011AF9AA1900B9B856 /* btPoint2PointConstraint.h */; }; + B6CAB3CD1AF9AA1A00B9B856 /* btSequentialImpulseConstraintSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1021AF9AA1900B9B856 /* btSequentialImpulseConstraintSolver.cpp */; }; + B6CAB3CE1AF9AA1A00B9B856 /* btSequentialImpulseConstraintSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1021AF9AA1900B9B856 /* btSequentialImpulseConstraintSolver.cpp */; }; + B6CAB3CF1AF9AA1A00B9B856 /* btSequentialImpulseConstraintSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1031AF9AA1900B9B856 /* btSequentialImpulseConstraintSolver.h */; }; + B6CAB3D01AF9AA1A00B9B856 /* btSequentialImpulseConstraintSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1031AF9AA1900B9B856 /* btSequentialImpulseConstraintSolver.h */; }; + B6CAB3D11AF9AA1A00B9B856 /* btSliderConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1041AF9AA1900B9B856 /* btSliderConstraint.cpp */; }; + B6CAB3D21AF9AA1A00B9B856 /* btSliderConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1041AF9AA1900B9B856 /* btSliderConstraint.cpp */; }; + B6CAB3D31AF9AA1A00B9B856 /* btSliderConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1051AF9AA1900B9B856 /* btSliderConstraint.h */; }; + B6CAB3D41AF9AA1A00B9B856 /* btSliderConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1051AF9AA1900B9B856 /* btSliderConstraint.h */; }; + B6CAB3D51AF9AA1A00B9B856 /* btSolve2LinearConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1061AF9AA1900B9B856 /* btSolve2LinearConstraint.cpp */; }; + B6CAB3D61AF9AA1A00B9B856 /* btSolve2LinearConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1061AF9AA1900B9B856 /* btSolve2LinearConstraint.cpp */; }; + B6CAB3D71AF9AA1A00B9B856 /* btSolve2LinearConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1071AF9AA1900B9B856 /* btSolve2LinearConstraint.h */; }; + B6CAB3D81AF9AA1A00B9B856 /* btSolve2LinearConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1071AF9AA1900B9B856 /* btSolve2LinearConstraint.h */; }; + B6CAB3D91AF9AA1A00B9B856 /* btSolverBody.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1081AF9AA1900B9B856 /* btSolverBody.h */; }; + B6CAB3DA1AF9AA1A00B9B856 /* btSolverBody.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1081AF9AA1900B9B856 /* btSolverBody.h */; }; + B6CAB3DB1AF9AA1A00B9B856 /* btSolverConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1091AF9AA1900B9B856 /* btSolverConstraint.h */; }; + B6CAB3DC1AF9AA1A00B9B856 /* btSolverConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1091AF9AA1900B9B856 /* btSolverConstraint.h */; }; + B6CAB3DD1AF9AA1A00B9B856 /* btTypedConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB10A1AF9AA1900B9B856 /* btTypedConstraint.cpp */; }; + B6CAB3DE1AF9AA1A00B9B856 /* btTypedConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB10A1AF9AA1900B9B856 /* btTypedConstraint.cpp */; }; + B6CAB3DF1AF9AA1A00B9B856 /* btTypedConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB10B1AF9AA1900B9B856 /* btTypedConstraint.h */; }; + B6CAB3E01AF9AA1A00B9B856 /* btTypedConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB10B1AF9AA1900B9B856 /* btTypedConstraint.h */; }; + B6CAB3E11AF9AA1A00B9B856 /* btUniversalConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB10C1AF9AA1900B9B856 /* btUniversalConstraint.cpp */; }; + B6CAB3E21AF9AA1A00B9B856 /* btUniversalConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB10C1AF9AA1900B9B856 /* btUniversalConstraint.cpp */; }; + B6CAB3E31AF9AA1A00B9B856 /* btUniversalConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB10D1AF9AA1900B9B856 /* btUniversalConstraint.h */; }; + B6CAB3E41AF9AA1A00B9B856 /* btUniversalConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB10D1AF9AA1900B9B856 /* btUniversalConstraint.h */; }; + B6CAB3E51AF9AA1A00B9B856 /* btActionInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB10F1AF9AA1900B9B856 /* btActionInterface.h */; }; + B6CAB3E61AF9AA1A00B9B856 /* btActionInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB10F1AF9AA1900B9B856 /* btActionInterface.h */; }; + B6CAB3E71AF9AA1A00B9B856 /* btDiscreteDynamicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1101AF9AA1900B9B856 /* btDiscreteDynamicsWorld.cpp */; }; + B6CAB3E81AF9AA1A00B9B856 /* btDiscreteDynamicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1101AF9AA1900B9B856 /* btDiscreteDynamicsWorld.cpp */; }; + B6CAB3E91AF9AA1A00B9B856 /* btDiscreteDynamicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1111AF9AA1900B9B856 /* btDiscreteDynamicsWorld.h */; }; + B6CAB3EA1AF9AA1A00B9B856 /* btDiscreteDynamicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1111AF9AA1900B9B856 /* btDiscreteDynamicsWorld.h */; }; + B6CAB3EB1AF9AA1A00B9B856 /* btDynamicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1121AF9AA1900B9B856 /* btDynamicsWorld.h */; }; + B6CAB3EC1AF9AA1A00B9B856 /* btDynamicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1121AF9AA1900B9B856 /* btDynamicsWorld.h */; }; + B6CAB3ED1AF9AA1A00B9B856 /* btRigidBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1131AF9AA1900B9B856 /* btRigidBody.cpp */; }; + B6CAB3EE1AF9AA1A00B9B856 /* btRigidBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1131AF9AA1900B9B856 /* btRigidBody.cpp */; }; + B6CAB3EF1AF9AA1A00B9B856 /* btRigidBody.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1141AF9AA1900B9B856 /* btRigidBody.h */; }; + B6CAB3F01AF9AA1A00B9B856 /* btRigidBody.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1141AF9AA1900B9B856 /* btRigidBody.h */; }; + B6CAB3F11AF9AA1A00B9B856 /* btSimpleDynamicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1151AF9AA1900B9B856 /* btSimpleDynamicsWorld.cpp */; }; + B6CAB3F21AF9AA1A00B9B856 /* btSimpleDynamicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1151AF9AA1900B9B856 /* btSimpleDynamicsWorld.cpp */; }; + B6CAB3F31AF9AA1A00B9B856 /* btSimpleDynamicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1161AF9AA1900B9B856 /* btSimpleDynamicsWorld.h */; }; + B6CAB3F41AF9AA1A00B9B856 /* btSimpleDynamicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1161AF9AA1900B9B856 /* btSimpleDynamicsWorld.h */; }; + B6CAB3F51AF9AA1A00B9B856 /* Bullet-C-API.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1171AF9AA1900B9B856 /* Bullet-C-API.cpp */; }; + B6CAB3F61AF9AA1A00B9B856 /* Bullet-C-API.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1171AF9AA1900B9B856 /* Bullet-C-API.cpp */; }; + B6CAB3F71AF9AA1A00B9B856 /* btMultiBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1191AF9AA1900B9B856 /* btMultiBody.cpp */; }; + B6CAB3F81AF9AA1A00B9B856 /* btMultiBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1191AF9AA1900B9B856 /* btMultiBody.cpp */; }; + B6CAB3F91AF9AA1A00B9B856 /* btMultiBody.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB11A1AF9AA1900B9B856 /* btMultiBody.h */; }; + B6CAB3FA1AF9AA1A00B9B856 /* btMultiBody.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB11A1AF9AA1900B9B856 /* btMultiBody.h */; }; + B6CAB3FB1AF9AA1A00B9B856 /* btMultiBodyConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB11B1AF9AA1900B9B856 /* btMultiBodyConstraint.cpp */; }; + B6CAB3FC1AF9AA1A00B9B856 /* btMultiBodyConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB11B1AF9AA1900B9B856 /* btMultiBodyConstraint.cpp */; }; + B6CAB3FD1AF9AA1A00B9B856 /* btMultiBodyConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB11C1AF9AA1900B9B856 /* btMultiBodyConstraint.h */; }; + B6CAB3FE1AF9AA1A00B9B856 /* btMultiBodyConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB11C1AF9AA1900B9B856 /* btMultiBodyConstraint.h */; }; + B6CAB3FF1AF9AA1A00B9B856 /* btMultiBodyConstraintSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB11D1AF9AA1900B9B856 /* btMultiBodyConstraintSolver.cpp */; }; + B6CAB4001AF9AA1A00B9B856 /* btMultiBodyConstraintSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB11D1AF9AA1900B9B856 /* btMultiBodyConstraintSolver.cpp */; }; + B6CAB4011AF9AA1A00B9B856 /* btMultiBodyConstraintSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB11E1AF9AA1900B9B856 /* btMultiBodyConstraintSolver.h */; }; + B6CAB4021AF9AA1A00B9B856 /* btMultiBodyConstraintSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB11E1AF9AA1900B9B856 /* btMultiBodyConstraintSolver.h */; }; + B6CAB4031AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB11F1AF9AA1900B9B856 /* btMultiBodyDynamicsWorld.cpp */; }; + B6CAB4041AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB11F1AF9AA1900B9B856 /* btMultiBodyDynamicsWorld.cpp */; }; + B6CAB4051AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1201AF9AA1900B9B856 /* btMultiBodyDynamicsWorld.h */; }; + B6CAB4061AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1201AF9AA1900B9B856 /* btMultiBodyDynamicsWorld.h */; }; + B6CAB4071AF9AA1A00B9B856 /* btMultiBodyJointLimitConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1211AF9AA1900B9B856 /* btMultiBodyJointLimitConstraint.cpp */; }; + B6CAB4081AF9AA1A00B9B856 /* btMultiBodyJointLimitConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1211AF9AA1900B9B856 /* btMultiBodyJointLimitConstraint.cpp */; }; + B6CAB4091AF9AA1A00B9B856 /* btMultiBodyJointLimitConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1221AF9AA1900B9B856 /* btMultiBodyJointLimitConstraint.h */; }; + B6CAB40A1AF9AA1A00B9B856 /* btMultiBodyJointLimitConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1221AF9AA1900B9B856 /* btMultiBodyJointLimitConstraint.h */; }; + B6CAB40B1AF9AA1A00B9B856 /* btMultiBodyJointMotor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1231AF9AA1900B9B856 /* btMultiBodyJointMotor.cpp */; }; + B6CAB40C1AF9AA1A00B9B856 /* btMultiBodyJointMotor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1231AF9AA1900B9B856 /* btMultiBodyJointMotor.cpp */; }; + B6CAB40D1AF9AA1A00B9B856 /* btMultiBodyJointMotor.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1241AF9AA1900B9B856 /* btMultiBodyJointMotor.h */; }; + B6CAB40E1AF9AA1A00B9B856 /* btMultiBodyJointMotor.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1241AF9AA1900B9B856 /* btMultiBodyJointMotor.h */; }; + B6CAB40F1AF9AA1A00B9B856 /* btMultiBodyLink.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1251AF9AA1900B9B856 /* btMultiBodyLink.h */; }; + B6CAB4101AF9AA1A00B9B856 /* btMultiBodyLink.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1251AF9AA1900B9B856 /* btMultiBodyLink.h */; }; + B6CAB4111AF9AA1A00B9B856 /* btMultiBodyLinkCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1261AF9AA1900B9B856 /* btMultiBodyLinkCollider.h */; }; + B6CAB4121AF9AA1A00B9B856 /* btMultiBodyLinkCollider.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1261AF9AA1900B9B856 /* btMultiBodyLinkCollider.h */; }; + B6CAB4131AF9AA1A00B9B856 /* btMultiBodyPoint2Point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1271AF9AA1900B9B856 /* btMultiBodyPoint2Point.cpp */; }; + B6CAB4141AF9AA1A00B9B856 /* btMultiBodyPoint2Point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1271AF9AA1900B9B856 /* btMultiBodyPoint2Point.cpp */; }; + B6CAB4151AF9AA1A00B9B856 /* btMultiBodyPoint2Point.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1281AF9AA1900B9B856 /* btMultiBodyPoint2Point.h */; }; + B6CAB4161AF9AA1A00B9B856 /* btMultiBodyPoint2Point.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1281AF9AA1900B9B856 /* btMultiBodyPoint2Point.h */; }; + B6CAB4171AF9AA1A00B9B856 /* btMultiBodySolverConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1291AF9AA1900B9B856 /* btMultiBodySolverConstraint.h */; }; + B6CAB4181AF9AA1A00B9B856 /* btMultiBodySolverConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1291AF9AA1900B9B856 /* btMultiBodySolverConstraint.h */; }; + B6CAB4191AF9AA1A00B9B856 /* btDantzigLCP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB12B1AF9AA1900B9B856 /* btDantzigLCP.cpp */; }; + B6CAB41A1AF9AA1A00B9B856 /* btDantzigLCP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB12B1AF9AA1900B9B856 /* btDantzigLCP.cpp */; }; + B6CAB41B1AF9AA1A00B9B856 /* btDantzigLCP.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB12C1AF9AA1900B9B856 /* btDantzigLCP.h */; }; + B6CAB41C1AF9AA1A00B9B856 /* btDantzigLCP.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB12C1AF9AA1900B9B856 /* btDantzigLCP.h */; }; + B6CAB41D1AF9AA1A00B9B856 /* btDantzigSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB12D1AF9AA1900B9B856 /* btDantzigSolver.h */; }; + B6CAB41E1AF9AA1A00B9B856 /* btDantzigSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB12D1AF9AA1900B9B856 /* btDantzigSolver.h */; }; + B6CAB41F1AF9AA1A00B9B856 /* btMLCPSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB12E1AF9AA1900B9B856 /* btMLCPSolver.cpp */; }; + B6CAB4201AF9AA1A00B9B856 /* btMLCPSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB12E1AF9AA1900B9B856 /* btMLCPSolver.cpp */; }; + B6CAB4211AF9AA1A00B9B856 /* btMLCPSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB12F1AF9AA1900B9B856 /* btMLCPSolver.h */; }; + B6CAB4221AF9AA1A00B9B856 /* btMLCPSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB12F1AF9AA1900B9B856 /* btMLCPSolver.h */; }; + B6CAB4231AF9AA1A00B9B856 /* btMLCPSolverInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1301AF9AA1900B9B856 /* btMLCPSolverInterface.h */; }; + B6CAB4241AF9AA1A00B9B856 /* btMLCPSolverInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1301AF9AA1900B9B856 /* btMLCPSolverInterface.h */; }; + B6CAB4251AF9AA1A00B9B856 /* btPATHSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1311AF9AA1900B9B856 /* btPATHSolver.h */; }; + B6CAB4261AF9AA1A00B9B856 /* btPATHSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1311AF9AA1900B9B856 /* btPATHSolver.h */; }; + B6CAB4271AF9AA1A00B9B856 /* btSolveProjectedGaussSeidel.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1321AF9AA1900B9B856 /* btSolveProjectedGaussSeidel.h */; }; + B6CAB4281AF9AA1A00B9B856 /* btSolveProjectedGaussSeidel.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1321AF9AA1900B9B856 /* btSolveProjectedGaussSeidel.h */; }; + B6CAB4291AF9AA1A00B9B856 /* btRaycastVehicle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1341AF9AA1900B9B856 /* btRaycastVehicle.cpp */; }; + B6CAB42A1AF9AA1A00B9B856 /* btRaycastVehicle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1341AF9AA1900B9B856 /* btRaycastVehicle.cpp */; }; + B6CAB42B1AF9AA1A00B9B856 /* btRaycastVehicle.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1351AF9AA1900B9B856 /* btRaycastVehicle.h */; }; + B6CAB42C1AF9AA1A00B9B856 /* btRaycastVehicle.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1351AF9AA1900B9B856 /* btRaycastVehicle.h */; }; + B6CAB42D1AF9AA1A00B9B856 /* btVehicleRaycaster.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1361AF9AA1900B9B856 /* btVehicleRaycaster.h */; }; + B6CAB42E1AF9AA1A00B9B856 /* btVehicleRaycaster.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1361AF9AA1900B9B856 /* btVehicleRaycaster.h */; }; + B6CAB42F1AF9AA1A00B9B856 /* btWheelInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1371AF9AA1900B9B856 /* btWheelInfo.cpp */; }; + B6CAB4301AF9AA1A00B9B856 /* btWheelInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1371AF9AA1900B9B856 /* btWheelInfo.cpp */; }; + B6CAB4311AF9AA1A00B9B856 /* btWheelInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1381AF9AA1900B9B856 /* btWheelInfo.h */; }; + B6CAB4321AF9AA1A00B9B856 /* btWheelInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1381AF9AA1900B9B856 /* btWheelInfo.h */; }; + B6CAB4331AF9AA1A00B9B856 /* btGpu3DGridBroadphase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB13A1AF9AA1900B9B856 /* btGpu3DGridBroadphase.cpp */; }; + B6CAB4341AF9AA1A00B9B856 /* btGpu3DGridBroadphase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB13A1AF9AA1900B9B856 /* btGpu3DGridBroadphase.cpp */; }; + B6CAB4351AF9AA1A00B9B856 /* btGpu3DGridBroadphase.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13B1AF9AA1900B9B856 /* btGpu3DGridBroadphase.h */; }; + B6CAB4361AF9AA1A00B9B856 /* btGpu3DGridBroadphase.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13B1AF9AA1900B9B856 /* btGpu3DGridBroadphase.h */; }; + B6CAB4371AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedCode.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13C1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedCode.h */; }; + B6CAB4381AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedCode.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13C1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedCode.h */; }; + B6CAB4391AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedDefs.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13D1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedDefs.h */; }; + B6CAB43A1AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedDefs.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13D1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedDefs.h */; }; + B6CAB43B1AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13E1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedTypes.h */; }; + B6CAB43C1AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13E1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedTypes.h */; }; + B6CAB43D1AF9AA1A00B9B856 /* btGpuDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13F1AF9AA1900B9B856 /* btGpuDefines.h */; }; + B6CAB43E1AF9AA1A00B9B856 /* btGpuDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB13F1AF9AA1900B9B856 /* btGpuDefines.h */; }; + B6CAB43F1AF9AA1A00B9B856 /* btGpuUtilsSharedCode.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1401AF9AA1900B9B856 /* btGpuUtilsSharedCode.h */; }; + B6CAB4401AF9AA1A00B9B856 /* btGpuUtilsSharedCode.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1401AF9AA1900B9B856 /* btGpuUtilsSharedCode.h */; }; + B6CAB4411AF9AA1A00B9B856 /* btGpuUtilsSharedDefs.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1411AF9AA1900B9B856 /* btGpuUtilsSharedDefs.h */; }; + B6CAB4421AF9AA1A00B9B856 /* btGpuUtilsSharedDefs.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1411AF9AA1900B9B856 /* btGpuUtilsSharedDefs.h */; }; + B6CAB4431AF9AA1A00B9B856 /* btParallelConstraintSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1421AF9AA1900B9B856 /* btParallelConstraintSolver.cpp */; }; + B6CAB4441AF9AA1A00B9B856 /* btParallelConstraintSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1421AF9AA1900B9B856 /* btParallelConstraintSolver.cpp */; }; + B6CAB4451AF9AA1A00B9B856 /* btParallelConstraintSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1431AF9AA1900B9B856 /* btParallelConstraintSolver.h */; }; + B6CAB4461AF9AA1A00B9B856 /* btParallelConstraintSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1431AF9AA1900B9B856 /* btParallelConstraintSolver.h */; }; + B6CAB4471AF9AA1A00B9B856 /* btThreadSupportInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1441AF9AA1900B9B856 /* btThreadSupportInterface.cpp */; }; + B6CAB4481AF9AA1A00B9B856 /* btThreadSupportInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1441AF9AA1900B9B856 /* btThreadSupportInterface.cpp */; }; + B6CAB4491AF9AA1A00B9B856 /* btThreadSupportInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1451AF9AA1900B9B856 /* btThreadSupportInterface.h */; }; + B6CAB44A1AF9AA1A00B9B856 /* btThreadSupportInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1451AF9AA1900B9B856 /* btThreadSupportInterface.h */; }; + B6CAB49B1AF9AA1A00B9B856 /* HeapManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1841AF9AA1A00B9B856 /* HeapManager.h */; }; + B6CAB49C1AF9AA1A00B9B856 /* HeapManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1841AF9AA1A00B9B856 /* HeapManager.h */; }; + B6CAB49D1AF9AA1A00B9B856 /* PlatformDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1851AF9AA1A00B9B856 /* PlatformDefinitions.h */; }; + B6CAB49E1AF9AA1A00B9B856 /* PlatformDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1851AF9AA1A00B9B856 /* PlatformDefinitions.h */; }; + B6CAB49F1AF9AA1A00B9B856 /* PosixThreadSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1861AF9AA1A00B9B856 /* PosixThreadSupport.cpp */; }; + B6CAB4A01AF9AA1A00B9B856 /* PosixThreadSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1861AF9AA1A00B9B856 /* PosixThreadSupport.cpp */; }; + B6CAB4A11AF9AA1A00B9B856 /* PosixThreadSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1871AF9AA1A00B9B856 /* PosixThreadSupport.h */; }; + B6CAB4A21AF9AA1A00B9B856 /* PosixThreadSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1871AF9AA1A00B9B856 /* PosixThreadSupport.h */; }; + B6CAB4A31AF9AA1A00B9B856 /* PpuAddressSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1881AF9AA1A00B9B856 /* PpuAddressSpace.h */; }; + B6CAB4A41AF9AA1A00B9B856 /* PpuAddressSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1881AF9AA1A00B9B856 /* PpuAddressSpace.h */; }; + B6CAB4A51AF9AA1A00B9B856 /* SequentialThreadSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1891AF9AA1A00B9B856 /* SequentialThreadSupport.cpp */; }; + B6CAB4A61AF9AA1A00B9B856 /* SequentialThreadSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1891AF9AA1A00B9B856 /* SequentialThreadSupport.cpp */; }; + B6CAB4A71AF9AA1A00B9B856 /* SequentialThreadSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB18A1AF9AA1A00B9B856 /* SequentialThreadSupport.h */; }; + B6CAB4A81AF9AA1A00B9B856 /* SequentialThreadSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB18A1AF9AA1A00B9B856 /* SequentialThreadSupport.h */; }; + B6CAB4A91AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB18B1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.cpp */; }; + B6CAB4AA1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB18B1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.cpp */; }; + B6CAB4AB1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB18C1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.h */; }; + B6CAB4AC1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB18C1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.h */; }; + B6CAB4AD1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB18D1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp */; }; + B6CAB4AE1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB18D1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp */; }; + B6CAB4AF1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB18E1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.h */; }; + B6CAB4B01AF9AA1A00B9B856 /* SpuCollisionTaskProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB18E1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.h */; }; + B6CAB4B11AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB18F1AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp */; }; + B6CAB4B21AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB18F1AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp */; }; + B6CAB4B31AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1901AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.h */; }; + B6CAB4B41AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1901AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.h */; }; + B6CAB4B51AF9AA1A00B9B856 /* SpuDoubleBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1911AF9AA1A00B9B856 /* SpuDoubleBuffer.h */; }; + B6CAB4B61AF9AA1A00B9B856 /* SpuDoubleBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1911AF9AA1A00B9B856 /* SpuDoubleBuffer.h */; }; + B6CAB4B71AF9AA1A00B9B856 /* SpuFakeDma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1921AF9AA1A00B9B856 /* SpuFakeDma.cpp */; }; + B6CAB4B81AF9AA1A00B9B856 /* SpuFakeDma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1921AF9AA1A00B9B856 /* SpuFakeDma.cpp */; }; + B6CAB4B91AF9AA1A00B9B856 /* SpuFakeDma.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1931AF9AA1A00B9B856 /* SpuFakeDma.h */; }; + B6CAB4BA1AF9AA1A00B9B856 /* SpuFakeDma.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1931AF9AA1A00B9B856 /* SpuFakeDma.h */; }; + B6CAB4BB1AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1941AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.cpp */; }; + B6CAB4BC1AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1941AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.cpp */; }; + B6CAB4BD1AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1951AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.h */; }; + B6CAB4BE1AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1951AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.h */; }; + B6CAB4BF1AF9AA1A00B9B856 /* SpuLibspe2Support.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1961AF9AA1A00B9B856 /* SpuLibspe2Support.cpp */; }; + B6CAB4C01AF9AA1A00B9B856 /* SpuLibspe2Support.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1961AF9AA1A00B9B856 /* SpuLibspe2Support.cpp */; }; + B6CAB4C11AF9AA1A00B9B856 /* SpuLibspe2Support.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1971AF9AA1A00B9B856 /* SpuLibspe2Support.h */; }; + B6CAB4C21AF9AA1A00B9B856 /* SpuLibspe2Support.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1971AF9AA1A00B9B856 /* SpuLibspe2Support.h */; }; + B6CAB4C31AF9AA1A00B9B856 /* Box.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1991AF9AA1A00B9B856 /* Box.h */; }; + B6CAB4C41AF9AA1A00B9B856 /* Box.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1991AF9AA1A00B9B856 /* Box.h */; }; + B6CAB4C51AF9AA1A00B9B856 /* boxBoxDistance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB19A1AF9AA1A00B9B856 /* boxBoxDistance.cpp */; }; + B6CAB4C61AF9AA1A00B9B856 /* boxBoxDistance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB19A1AF9AA1A00B9B856 /* boxBoxDistance.cpp */; }; + B6CAB4C71AF9AA1A00B9B856 /* boxBoxDistance.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB19B1AF9AA1A00B9B856 /* boxBoxDistance.h */; }; + B6CAB4C81AF9AA1A00B9B856 /* boxBoxDistance.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB19B1AF9AA1A00B9B856 /* boxBoxDistance.h */; }; + B6CAB4C91AF9AA1A00B9B856 /* SpuCollisionShapes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB19C1AF9AA1A00B9B856 /* SpuCollisionShapes.cpp */; }; + B6CAB4CA1AF9AA1A00B9B856 /* SpuCollisionShapes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB19C1AF9AA1A00B9B856 /* SpuCollisionShapes.cpp */; }; + B6CAB4CB1AF9AA1A00B9B856 /* SpuCollisionShapes.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB19D1AF9AA1A00B9B856 /* SpuCollisionShapes.h */; }; + B6CAB4CC1AF9AA1A00B9B856 /* SpuCollisionShapes.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB19D1AF9AA1A00B9B856 /* SpuCollisionShapes.h */; }; + B6CAB4CD1AF9AA1A00B9B856 /* SpuContactResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB19E1AF9AA1A00B9B856 /* SpuContactResult.cpp */; }; + B6CAB4CE1AF9AA1A00B9B856 /* SpuContactResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB19E1AF9AA1A00B9B856 /* SpuContactResult.cpp */; }; + B6CAB4CF1AF9AA1A00B9B856 /* SpuContactResult.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB19F1AF9AA1A00B9B856 /* SpuContactResult.h */; }; + B6CAB4D01AF9AA1A00B9B856 /* SpuContactResult.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB19F1AF9AA1A00B9B856 /* SpuContactResult.h */; }; + B6CAB4D11AF9AA1A00B9B856 /* SpuConvexPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A01AF9AA1A00B9B856 /* SpuConvexPenetrationDepthSolver.h */; }; + B6CAB4D21AF9AA1A00B9B856 /* SpuConvexPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A01AF9AA1A00B9B856 /* SpuConvexPenetrationDepthSolver.h */; }; + B6CAB4D31AF9AA1A00B9B856 /* SpuGatheringCollisionTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1A11AF9AA1A00B9B856 /* SpuGatheringCollisionTask.cpp */; }; + B6CAB4D41AF9AA1A00B9B856 /* SpuGatheringCollisionTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1A11AF9AA1A00B9B856 /* SpuGatheringCollisionTask.cpp */; }; + B6CAB4D51AF9AA1A00B9B856 /* SpuGatheringCollisionTask.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A21AF9AA1A00B9B856 /* SpuGatheringCollisionTask.h */; }; + B6CAB4D61AF9AA1A00B9B856 /* SpuGatheringCollisionTask.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A21AF9AA1A00B9B856 /* SpuGatheringCollisionTask.h */; }; + B6CAB4D71AF9AA1A00B9B856 /* SpuLocalSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A31AF9AA1A00B9B856 /* SpuLocalSupport.h */; }; + B6CAB4D81AF9AA1A00B9B856 /* SpuLocalSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A31AF9AA1A00B9B856 /* SpuLocalSupport.h */; }; + B6CAB4D91AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1A41AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.cpp */; }; + B6CAB4DA1AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1A41AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.cpp */; }; + B6CAB4DB1AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A51AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.h */; }; + B6CAB4DC1AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A51AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.h */; }; + B6CAB4DD1AF9AA1A00B9B856 /* SpuPreferredPenetrationDirections.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A61AF9AA1A00B9B856 /* SpuPreferredPenetrationDirections.h */; }; + B6CAB4DE1AF9AA1A00B9B856 /* SpuPreferredPenetrationDirections.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A61AF9AA1A00B9B856 /* SpuPreferredPenetrationDirections.h */; }; + B6CAB4DF1AF9AA1A00B9B856 /* SpuSampleTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1A81AF9AA1A00B9B856 /* SpuSampleTask.cpp */; }; + B6CAB4E01AF9AA1A00B9B856 /* SpuSampleTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1A81AF9AA1A00B9B856 /* SpuSampleTask.cpp */; }; + B6CAB4E11AF9AA1A00B9B856 /* SpuSampleTask.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A91AF9AA1A00B9B856 /* SpuSampleTask.h */; }; + B6CAB4E21AF9AA1A00B9B856 /* SpuSampleTask.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1A91AF9AA1A00B9B856 /* SpuSampleTask.h */; }; + B6CAB4E31AF9AA1A00B9B856 /* SpuSampleTaskProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1AA1AF9AA1A00B9B856 /* SpuSampleTaskProcess.cpp */; }; + B6CAB4E41AF9AA1A00B9B856 /* SpuSampleTaskProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1AA1AF9AA1A00B9B856 /* SpuSampleTaskProcess.cpp */; }; + B6CAB4E51AF9AA1A00B9B856 /* SpuSampleTaskProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AB1AF9AA1A00B9B856 /* SpuSampleTaskProcess.h */; }; + B6CAB4E61AF9AA1A00B9B856 /* SpuSampleTaskProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AB1AF9AA1A00B9B856 /* SpuSampleTaskProcess.h */; }; + B6CAB4E71AF9AA1A00B9B856 /* SpuSync.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AC1AF9AA1A00B9B856 /* SpuSync.h */; }; + B6CAB4E81AF9AA1A00B9B856 /* SpuSync.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AC1AF9AA1A00B9B856 /* SpuSync.h */; }; + B6CAB4E91AF9AA1A00B9B856 /* TrbDynBody.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AD1AF9AA1A00B9B856 /* TrbDynBody.h */; }; + B6CAB4EA1AF9AA1A00B9B856 /* TrbDynBody.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AD1AF9AA1A00B9B856 /* TrbDynBody.h */; }; + B6CAB4EB1AF9AA1A00B9B856 /* TrbStateVec.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AE1AF9AA1A00B9B856 /* TrbStateVec.h */; }; + B6CAB4EC1AF9AA1A00B9B856 /* TrbStateVec.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AE1AF9AA1A00B9B856 /* TrbStateVec.h */; }; + B6CAB4ED1AF9AA1A00B9B856 /* vectormath2bullet.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AF1AF9AA1A00B9B856 /* vectormath2bullet.h */; }; + B6CAB4EE1AF9AA1A00B9B856 /* vectormath2bullet.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1AF1AF9AA1A00B9B856 /* vectormath2bullet.h */; }; + B6CAB4EF1AF9AA1A00B9B856 /* Win32ThreadSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1B01AF9AA1A00B9B856 /* Win32ThreadSupport.cpp */; }; + B6CAB4F01AF9AA1A00B9B856 /* Win32ThreadSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1B01AF9AA1A00B9B856 /* Win32ThreadSupport.cpp */; }; + B6CAB4F11AF9AA1A00B9B856 /* Win32ThreadSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B11AF9AA1A00B9B856 /* Win32ThreadSupport.h */; }; + B6CAB4F21AF9AA1A00B9B856 /* Win32ThreadSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B11AF9AA1A00B9B856 /* Win32ThreadSupport.h */; }; + B6CAB4F31AF9AA1A00B9B856 /* btAabbUtil2.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B31AF9AA1A00B9B856 /* btAabbUtil2.h */; }; + B6CAB4F41AF9AA1A00B9B856 /* btAabbUtil2.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B31AF9AA1A00B9B856 /* btAabbUtil2.h */; }; + B6CAB4F51AF9AA1A00B9B856 /* btAlignedAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1B41AF9AA1A00B9B856 /* btAlignedAllocator.cpp */; }; + B6CAB4F61AF9AA1A00B9B856 /* btAlignedAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1B41AF9AA1A00B9B856 /* btAlignedAllocator.cpp */; }; + B6CAB4F71AF9AA1A00B9B856 /* btAlignedAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B51AF9AA1A00B9B856 /* btAlignedAllocator.h */; }; + B6CAB4F81AF9AA1A00B9B856 /* btAlignedAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B51AF9AA1A00B9B856 /* btAlignedAllocator.h */; }; + B6CAB4F91AF9AA1A00B9B856 /* btAlignedObjectArray.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B61AF9AA1A00B9B856 /* btAlignedObjectArray.h */; }; + B6CAB4FA1AF9AA1A00B9B856 /* btAlignedObjectArray.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B61AF9AA1A00B9B856 /* btAlignedObjectArray.h */; }; + B6CAB4FB1AF9AA1A00B9B856 /* btConvexHull.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1B71AF9AA1A00B9B856 /* btConvexHull.cpp */; }; + B6CAB4FC1AF9AA1A00B9B856 /* btConvexHull.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1B71AF9AA1A00B9B856 /* btConvexHull.cpp */; }; + B6CAB4FD1AF9AA1A00B9B856 /* btConvexHull.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B81AF9AA1A00B9B856 /* btConvexHull.h */; }; + B6CAB4FE1AF9AA1A00B9B856 /* btConvexHull.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1B81AF9AA1A00B9B856 /* btConvexHull.h */; }; + B6CAB4FF1AF9AA1A00B9B856 /* btConvexHullComputer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1B91AF9AA1A00B9B856 /* btConvexHullComputer.cpp */; }; + B6CAB5001AF9AA1A00B9B856 /* btConvexHullComputer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1B91AF9AA1A00B9B856 /* btConvexHullComputer.cpp */; }; + B6CAB5011AF9AA1A00B9B856 /* btConvexHullComputer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BA1AF9AA1A00B9B856 /* btConvexHullComputer.h */; }; + B6CAB5021AF9AA1A00B9B856 /* btConvexHullComputer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BA1AF9AA1A00B9B856 /* btConvexHullComputer.h */; }; + B6CAB5031AF9AA1A00B9B856 /* btDefaultMotionState.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BB1AF9AA1A00B9B856 /* btDefaultMotionState.h */; }; + B6CAB5041AF9AA1A00B9B856 /* btDefaultMotionState.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BB1AF9AA1A00B9B856 /* btDefaultMotionState.h */; }; + B6CAB5051AF9AA1A00B9B856 /* btGeometryUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1BC1AF9AA1A00B9B856 /* btGeometryUtil.cpp */; }; + B6CAB5061AF9AA1A00B9B856 /* btGeometryUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1BC1AF9AA1A00B9B856 /* btGeometryUtil.cpp */; }; + B6CAB5071AF9AA1A00B9B856 /* btGeometryUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BD1AF9AA1A00B9B856 /* btGeometryUtil.h */; }; + B6CAB5081AF9AA1A00B9B856 /* btGeometryUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BD1AF9AA1A00B9B856 /* btGeometryUtil.h */; }; + B6CAB5091AF9AA1A00B9B856 /* btGrahamScan2dConvexHull.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BE1AF9AA1A00B9B856 /* btGrahamScan2dConvexHull.h */; }; + B6CAB50A1AF9AA1A00B9B856 /* btGrahamScan2dConvexHull.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BE1AF9AA1A00B9B856 /* btGrahamScan2dConvexHull.h */; }; + B6CAB50B1AF9AA1A00B9B856 /* btHashMap.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BF1AF9AA1A00B9B856 /* btHashMap.h */; }; + B6CAB50C1AF9AA1A00B9B856 /* btHashMap.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1BF1AF9AA1A00B9B856 /* btHashMap.h */; }; + B6CAB50D1AF9AA1A00B9B856 /* btIDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C01AF9AA1A00B9B856 /* btIDebugDraw.h */; }; + B6CAB50E1AF9AA1A00B9B856 /* btIDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C01AF9AA1A00B9B856 /* btIDebugDraw.h */; }; + B6CAB50F1AF9AA1A00B9B856 /* btList.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C11AF9AA1A00B9B856 /* btList.h */; }; + B6CAB5101AF9AA1A00B9B856 /* btList.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C11AF9AA1A00B9B856 /* btList.h */; }; + B6CAB5111AF9AA1A00B9B856 /* btMatrix3x3.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C21AF9AA1A00B9B856 /* btMatrix3x3.h */; }; + B6CAB5121AF9AA1A00B9B856 /* btMatrix3x3.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C21AF9AA1A00B9B856 /* btMatrix3x3.h */; }; + B6CAB5131AF9AA1A00B9B856 /* btMatrixX.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C31AF9AA1A00B9B856 /* btMatrixX.h */; }; + B6CAB5141AF9AA1A00B9B856 /* btMatrixX.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C31AF9AA1A00B9B856 /* btMatrixX.h */; }; + B6CAB5151AF9AA1A00B9B856 /* btMinMax.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C41AF9AA1A00B9B856 /* btMinMax.h */; }; + B6CAB5161AF9AA1A00B9B856 /* btMinMax.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C41AF9AA1A00B9B856 /* btMinMax.h */; }; + B6CAB5171AF9AA1A00B9B856 /* btMotionState.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C51AF9AA1A00B9B856 /* btMotionState.h */; }; + B6CAB5181AF9AA1A00B9B856 /* btMotionState.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C51AF9AA1A00B9B856 /* btMotionState.h */; }; + B6CAB5191AF9AA1A00B9B856 /* btPolarDecomposition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1C61AF9AA1A00B9B856 /* btPolarDecomposition.cpp */; }; + B6CAB51A1AF9AA1A00B9B856 /* btPolarDecomposition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1C61AF9AA1A00B9B856 /* btPolarDecomposition.cpp */; }; + B6CAB51B1AF9AA1A00B9B856 /* btPolarDecomposition.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C71AF9AA1A00B9B856 /* btPolarDecomposition.h */; }; + B6CAB51C1AF9AA1A00B9B856 /* btPolarDecomposition.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C71AF9AA1A00B9B856 /* btPolarDecomposition.h */; }; + B6CAB51D1AF9AA1A00B9B856 /* btPoolAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C81AF9AA1A00B9B856 /* btPoolAllocator.h */; }; + B6CAB51E1AF9AA1A00B9B856 /* btPoolAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C81AF9AA1A00B9B856 /* btPoolAllocator.h */; }; + B6CAB51F1AF9AA1A00B9B856 /* btQuadWord.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C91AF9AA1A00B9B856 /* btQuadWord.h */; }; + B6CAB5201AF9AA1A00B9B856 /* btQuadWord.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1C91AF9AA1A00B9B856 /* btQuadWord.h */; }; + B6CAB5211AF9AA1A00B9B856 /* btQuaternion.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1CA1AF9AA1A00B9B856 /* btQuaternion.h */; }; + B6CAB5221AF9AA1A00B9B856 /* btQuaternion.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1CA1AF9AA1A00B9B856 /* btQuaternion.h */; }; + B6CAB5231AF9AA1A00B9B856 /* btQuickprof.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1CB1AF9AA1A00B9B856 /* btQuickprof.cpp */; }; + B6CAB5241AF9AA1A00B9B856 /* btQuickprof.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1CB1AF9AA1A00B9B856 /* btQuickprof.cpp */; }; + B6CAB5251AF9AA1A00B9B856 /* btQuickprof.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1CC1AF9AA1A00B9B856 /* btQuickprof.h */; }; + B6CAB5261AF9AA1A00B9B856 /* btQuickprof.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1CC1AF9AA1A00B9B856 /* btQuickprof.h */; }; + B6CAB5271AF9AA1A00B9B856 /* btRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1CD1AF9AA1A00B9B856 /* btRandom.h */; }; + B6CAB5281AF9AA1A00B9B856 /* btRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1CD1AF9AA1A00B9B856 /* btRandom.h */; }; + B6CAB5291AF9AA1A00B9B856 /* btScalar.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1CE1AF9AA1A00B9B856 /* btScalar.h */; }; + B6CAB52A1AF9AA1A00B9B856 /* btScalar.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1CE1AF9AA1A00B9B856 /* btScalar.h */; }; + B6CAB52B1AF9AA1A00B9B856 /* btSerializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1CF1AF9AA1A00B9B856 /* btSerializer.cpp */; }; + B6CAB52C1AF9AA1A00B9B856 /* btSerializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1CF1AF9AA1A00B9B856 /* btSerializer.cpp */; }; + B6CAB52D1AF9AA1A00B9B856 /* btSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D01AF9AA1A00B9B856 /* btSerializer.h */; }; + B6CAB52E1AF9AA1A00B9B856 /* btSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D01AF9AA1A00B9B856 /* btSerializer.h */; }; + B6CAB52F1AF9AA1A00B9B856 /* btStackAlloc.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D11AF9AA1A00B9B856 /* btStackAlloc.h */; }; + B6CAB5301AF9AA1A00B9B856 /* btStackAlloc.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D11AF9AA1A00B9B856 /* btStackAlloc.h */; }; + B6CAB5311AF9AA1A00B9B856 /* btTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D21AF9AA1A00B9B856 /* btTransform.h */; }; + B6CAB5321AF9AA1A00B9B856 /* btTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D21AF9AA1A00B9B856 /* btTransform.h */; }; + B6CAB5331AF9AA1A00B9B856 /* btTransformUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D31AF9AA1A00B9B856 /* btTransformUtil.h */; }; + B6CAB5341AF9AA1A00B9B856 /* btTransformUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D31AF9AA1A00B9B856 /* btTransformUtil.h */; }; + B6CAB5351AF9AA1A00B9B856 /* btVector3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1D41AF9AA1A00B9B856 /* btVector3.cpp */; }; + B6CAB5361AF9AA1A00B9B856 /* btVector3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1D41AF9AA1A00B9B856 /* btVector3.cpp */; }; + B6CAB5371AF9AA1A00B9B856 /* btVector3.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D51AF9AA1A00B9B856 /* btVector3.h */; }; + B6CAB5381AF9AA1A00B9B856 /* btVector3.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D51AF9AA1A00B9B856 /* btVector3.h */; }; + B6CAB5391AF9AA1A00B9B856 /* cl.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D71AF9AA1A00B9B856 /* cl.h */; }; + B6CAB53A1AF9AA1A00B9B856 /* cl.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D71AF9AA1A00B9B856 /* cl.h */; }; + B6CAB53B1AF9AA1A00B9B856 /* cl_gl.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D81AF9AA1A00B9B856 /* cl_gl.h */; }; + B6CAB53C1AF9AA1A00B9B856 /* cl_gl.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D81AF9AA1A00B9B856 /* cl_gl.h */; }; + B6CAB53D1AF9AA1A00B9B856 /* cl_MiniCL_Defs.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D91AF9AA1A00B9B856 /* cl_MiniCL_Defs.h */; }; + B6CAB53E1AF9AA1A00B9B856 /* cl_MiniCL_Defs.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1D91AF9AA1A00B9B856 /* cl_MiniCL_Defs.h */; }; + B6CAB53F1AF9AA1A00B9B856 /* cl_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1DA1AF9AA1A00B9B856 /* cl_platform.h */; }; + B6CAB5401AF9AA1A00B9B856 /* cl_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1DA1AF9AA1A00B9B856 /* cl_platform.h */; }; + B6CAB5411AF9AA1A00B9B856 /* MiniCL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1DB1AF9AA1A00B9B856 /* MiniCL.cpp */; }; + B6CAB5421AF9AA1A00B9B856 /* MiniCL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1DB1AF9AA1A00B9B856 /* MiniCL.cpp */; }; + B6CAB5431AF9AA1A00B9B856 /* MiniCLTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1DD1AF9AA1A00B9B856 /* MiniCLTask.cpp */; }; + B6CAB5441AF9AA1A00B9B856 /* MiniCLTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1DD1AF9AA1A00B9B856 /* MiniCLTask.cpp */; }; + B6CAB5451AF9AA1A00B9B856 /* MiniCLTask.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1DE1AF9AA1A00B9B856 /* MiniCLTask.h */; }; + B6CAB5461AF9AA1A00B9B856 /* MiniCLTask.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1DE1AF9AA1A00B9B856 /* MiniCLTask.h */; }; + B6CAB5471AF9AA1A00B9B856 /* MiniCLTaskScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1DF1AF9AA1A00B9B856 /* MiniCLTaskScheduler.cpp */; }; + B6CAB5481AF9AA1A00B9B856 /* MiniCLTaskScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB1DF1AF9AA1A00B9B856 /* MiniCLTaskScheduler.cpp */; }; + B6CAB5491AF9AA1A00B9B856 /* MiniCLTaskScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1E01AF9AA1A00B9B856 /* MiniCLTaskScheduler.h */; }; + B6CAB54A1AF9AA1A00B9B856 /* MiniCLTaskScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = B6CAB1E01AF9AA1A00B9B856 /* MiniCLTaskScheduler.h */; }; B6D38B8A1AC3AFAC00043997 /* CCSkybox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6D38B861AC3AFAC00043997 /* CCSkybox.cpp */; }; B6D38B8B1AC3AFAC00043997 /* CCSkybox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6D38B861AC3AFAC00043997 /* CCSkybox.cpp */; }; B6D38B8C1AC3AFAC00043997 /* CCSkybox.h in Headers */ = {isa = PBXBuildFile; fileRef = B6D38B871AC3AFAC00043997 /* CCSkybox.h */; }; @@ -3412,6 +4246,10 @@ 503DD8F21926B0DB00CD74DD /* CCIMEDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCIMEDelegate.h; path = ../base/CCIMEDelegate.h; sourceTree = ""; }; 503DD8F31926B0DB00CD74DD /* CCIMEDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCIMEDispatcher.cpp; path = ../base/CCIMEDispatcher.cpp; sourceTree = ""; }; 503DD8F41926B0DB00CD74DD /* CCIMEDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCIMEDispatcher.h; path = ../base/CCIMEDispatcher.h; sourceTree = ""; }; + 505385001B01887A00793096 /* CCProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCProperties.h; path = ../base/CCProperties.h; sourceTree = ""; }; + 505385011B01887A00793096 /* CCProperties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCProperties.cpp; path = ../base/CCProperties.cpp; sourceTree = ""; }; + 5053850A1B02819E00793096 /* CCVertexAttribBinding.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVertexAttribBinding.cpp; sourceTree = ""; }; + 5053850B1B02819E00793096 /* CCVertexAttribBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVertexAttribBinding.h; sourceTree = ""; }; 50643BD319BFAECF00EF68ED /* CCGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGL.h; sourceTree = ""; }; 50643BD719BFAF4400EF68ED /* CCApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCApplication.h; sourceTree = ""; }; 50643BD819BFAF4400EF68ED /* CCStdC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCStdC.h; sourceTree = ""; }; @@ -4057,6 +4895,419 @@ B68778F51A8CA82E00643ABF /* CCParticle3DRender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCParticle3DRender.h; path = Particle3D/CCParticle3DRender.h; sourceTree = ""; }; B68778F61A8CA82E00643ABF /* CCParticleSystem3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCParticleSystem3D.cpp; path = Particle3D/CCParticleSystem3D.cpp; sourceTree = ""; }; B68778F71A8CA82E00643ABF /* CCParticleSystem3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCParticleSystem3D.h; path = Particle3D/CCParticleSystem3D.h; sourceTree = ""; }; + B6CAAFD21AF9A9E100B9B856 /* CCPhysics3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3D.cpp; path = ../cocos/physics3d/CCPhysics3D.cpp; sourceTree = ""; }; + B6CAAFD31AF9A9E100B9B856 /* CCPhysics3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3D.h; path = ../cocos/physics3d/CCPhysics3D.h; sourceTree = ""; }; + B6CAAFD41AF9A9E100B9B856 /* CCPhysics3DComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DComponent.cpp; path = ../cocos/physics3d/CCPhysics3DComponent.cpp; sourceTree = ""; }; + B6CAAFD51AF9A9E100B9B856 /* CCPhysics3DComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DComponent.h; path = ../cocos/physics3d/CCPhysics3DComponent.h; sourceTree = ""; }; + B6CAAFD61AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DConstraint.cpp; path = ../cocos/physics3d/CCPhysics3DConstraint.cpp; sourceTree = ""; }; + B6CAAFD71AF9A9E100B9B856 /* CCPhysics3DConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DConstraint.h; path = ../cocos/physics3d/CCPhysics3DConstraint.h; sourceTree = ""; }; + B6CAAFD81AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DDebugDrawer.cpp; path = ../cocos/physics3d/CCPhysics3DDebugDrawer.cpp; sourceTree = ""; }; + B6CAAFD91AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DDebugDrawer.h; path = ../cocos/physics3d/CCPhysics3DDebugDrawer.h; sourceTree = ""; }; + B6CAAFDA1AF9A9E100B9B856 /* CCPhysics3DObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DObject.cpp; path = ../cocos/physics3d/CCPhysics3DObject.cpp; sourceTree = ""; }; + B6CAAFDB1AF9A9E100B9B856 /* CCPhysics3DObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DObject.h; path = ../cocos/physics3d/CCPhysics3DObject.h; sourceTree = ""; }; + B6CAAFDC1AF9A9E100B9B856 /* CCPhysics3DShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DShape.cpp; path = ../cocos/physics3d/CCPhysics3DShape.cpp; sourceTree = ""; }; + B6CAAFDD1AF9A9E100B9B856 /* CCPhysics3DShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DShape.h; path = ../cocos/physics3d/CCPhysics3DShape.h; sourceTree = ""; }; + B6CAAFDE1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysics3DWorld.cpp; path = ../cocos/physics3d/CCPhysics3DWorld.cpp; sourceTree = ""; }; + B6CAAFDF1AF9A9E100B9B856 /* CCPhysics3DWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysics3DWorld.h; path = ../cocos/physics3d/CCPhysics3DWorld.h; sourceTree = ""; }; + B6CAAFE01AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysicsSprite3D.cpp; path = ../cocos/physics3d/CCPhysicsSprite3D.cpp; sourceTree = ""; }; + B6CAAFE11AF9A9E100B9B856 /* CCPhysicsSprite3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysicsSprite3D.h; path = ../cocos/physics3d/CCPhysicsSprite3D.h; sourceTree = ""; }; + B6CAB0031AF9AA1900B9B856 /* btBulletCollisionCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = btBulletCollisionCommon.h; path = ../external/bullet/btBulletCollisionCommon.h; sourceTree = ""; }; + B6CAB0041AF9AA1900B9B856 /* btBulletDynamicsCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = btBulletDynamicsCommon.h; path = ../external/bullet/btBulletDynamicsCommon.h; sourceTree = ""; }; + B6CAB0051AF9AA1900B9B856 /* Bullet-C-Api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Bullet-C-Api.h"; path = "../external/bullet/Bullet-C-Api.h"; sourceTree = ""; }; + B6CAB0081AF9AA1900B9B856 /* btAxisSweep3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btAxisSweep3.cpp; sourceTree = ""; }; + B6CAB0091AF9AA1900B9B856 /* btAxisSweep3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btAxisSweep3.h; sourceTree = ""; }; + B6CAB00A1AF9AA1900B9B856 /* btBroadphaseInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btBroadphaseInterface.h; sourceTree = ""; }; + B6CAB00B1AF9AA1900B9B856 /* btBroadphaseProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btBroadphaseProxy.cpp; sourceTree = ""; }; + B6CAB00C1AF9AA1900B9B856 /* btBroadphaseProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btBroadphaseProxy.h; sourceTree = ""; }; + B6CAB00D1AF9AA1900B9B856 /* btCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB00E1AF9AA1900B9B856 /* btCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB00F1AF9AA1900B9B856 /* btDbvt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btDbvt.cpp; sourceTree = ""; }; + B6CAB0101AF9AA1900B9B856 /* btDbvt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDbvt.h; sourceTree = ""; }; + B6CAB0111AF9AA1900B9B856 /* btDbvtBroadphase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btDbvtBroadphase.cpp; sourceTree = ""; }; + B6CAB0121AF9AA1900B9B856 /* btDbvtBroadphase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDbvtBroadphase.h; sourceTree = ""; }; + B6CAB0131AF9AA1900B9B856 /* btDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btDispatcher.cpp; sourceTree = ""; }; + B6CAB0141AF9AA1900B9B856 /* btDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDispatcher.h; sourceTree = ""; }; + B6CAB0151AF9AA1900B9B856 /* btMultiSapBroadphase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultiSapBroadphase.cpp; sourceTree = ""; }; + B6CAB0161AF9AA1900B9B856 /* btMultiSapBroadphase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiSapBroadphase.h; sourceTree = ""; }; + B6CAB0171AF9AA1900B9B856 /* btOverlappingPairCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btOverlappingPairCache.cpp; sourceTree = ""; }; + B6CAB0181AF9AA1900B9B856 /* btOverlappingPairCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btOverlappingPairCache.h; sourceTree = ""; }; + B6CAB0191AF9AA1900B9B856 /* btOverlappingPairCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btOverlappingPairCallback.h; sourceTree = ""; }; + B6CAB01A1AF9AA1900B9B856 /* btQuantizedBvh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btQuantizedBvh.cpp; sourceTree = ""; }; + B6CAB01B1AF9AA1900B9B856 /* btQuantizedBvh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btQuantizedBvh.h; sourceTree = ""; }; + B6CAB01C1AF9AA1900B9B856 /* btSimpleBroadphase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSimpleBroadphase.cpp; sourceTree = ""; }; + B6CAB01D1AF9AA1900B9B856 /* btSimpleBroadphase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSimpleBroadphase.h; sourceTree = ""; }; + B6CAB01F1AF9AA1900B9B856 /* btActivatingCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btActivatingCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB0201AF9AA1900B9B856 /* btActivatingCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btActivatingCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB0211AF9AA1900B9B856 /* btBox2dBox2dCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btBox2dBox2dCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB0221AF9AA1900B9B856 /* btBox2dBox2dCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btBox2dBox2dCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB0231AF9AA1900B9B856 /* btBoxBoxCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btBoxBoxCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB0241AF9AA1900B9B856 /* btBoxBoxCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btBoxBoxCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB0251AF9AA1900B9B856 /* btBoxBoxDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btBoxBoxDetector.cpp; sourceTree = ""; }; + B6CAB0261AF9AA1900B9B856 /* btBoxBoxDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btBoxBoxDetector.h; sourceTree = ""; }; + B6CAB0271AF9AA1900B9B856 /* btCollisionConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCollisionConfiguration.h; sourceTree = ""; }; + B6CAB0281AF9AA1900B9B856 /* btCollisionCreateFunc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCollisionCreateFunc.h; sourceTree = ""; }; + B6CAB0291AF9AA1900B9B856 /* btCollisionDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCollisionDispatcher.cpp; sourceTree = ""; }; + B6CAB02A1AF9AA1900B9B856 /* btCollisionDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCollisionDispatcher.h; sourceTree = ""; }; + B6CAB02B1AF9AA1900B9B856 /* btCollisionObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCollisionObject.cpp; sourceTree = ""; }; + B6CAB02C1AF9AA1900B9B856 /* btCollisionObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCollisionObject.h; sourceTree = ""; }; + B6CAB02D1AF9AA1900B9B856 /* btCollisionObjectWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCollisionObjectWrapper.h; sourceTree = ""; }; + B6CAB02E1AF9AA1900B9B856 /* btCollisionWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCollisionWorld.cpp; sourceTree = ""; }; + B6CAB02F1AF9AA1900B9B856 /* btCollisionWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCollisionWorld.h; sourceTree = ""; }; + B6CAB0301AF9AA1900B9B856 /* btCompoundCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCompoundCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB0311AF9AA1900B9B856 /* btCompoundCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCompoundCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB0321AF9AA1900B9B856 /* btCompoundCompoundCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCompoundCompoundCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB0331AF9AA1900B9B856 /* btCompoundCompoundCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCompoundCompoundCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB0341AF9AA1900B9B856 /* btConvex2dConvex2dAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvex2dConvex2dAlgorithm.cpp; sourceTree = ""; }; + B6CAB0351AF9AA1900B9B856 /* btConvex2dConvex2dAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvex2dConvex2dAlgorithm.h; sourceTree = ""; }; + B6CAB0361AF9AA1900B9B856 /* btConvexConcaveCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexConcaveCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB0371AF9AA1900B9B856 /* btConvexConcaveCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexConcaveCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB0381AF9AA1900B9B856 /* btConvexConvexAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexConvexAlgorithm.cpp; sourceTree = ""; }; + B6CAB0391AF9AA1900B9B856 /* btConvexConvexAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexConvexAlgorithm.h; sourceTree = ""; }; + B6CAB03A1AF9AA1900B9B856 /* btConvexPlaneCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexPlaneCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB03B1AF9AA1900B9B856 /* btConvexPlaneCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexPlaneCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB03C1AF9AA1900B9B856 /* btDefaultCollisionConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btDefaultCollisionConfiguration.cpp; sourceTree = ""; }; + B6CAB03D1AF9AA1900B9B856 /* btDefaultCollisionConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDefaultCollisionConfiguration.h; sourceTree = ""; }; + B6CAB03E1AF9AA1900B9B856 /* btEmptyCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btEmptyCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB03F1AF9AA1900B9B856 /* btEmptyCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btEmptyCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB0401AF9AA1900B9B856 /* btGhostObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGhostObject.cpp; sourceTree = ""; }; + B6CAB0411AF9AA1900B9B856 /* btGhostObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGhostObject.h; sourceTree = ""; }; + B6CAB0421AF9AA1900B9B856 /* btHashedSimplePairCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btHashedSimplePairCache.cpp; sourceTree = ""; }; + B6CAB0431AF9AA1900B9B856 /* btHashedSimplePairCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btHashedSimplePairCache.h; sourceTree = ""; }; + B6CAB0441AF9AA1900B9B856 /* btInternalEdgeUtility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btInternalEdgeUtility.cpp; sourceTree = ""; }; + B6CAB0451AF9AA1900B9B856 /* btInternalEdgeUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btInternalEdgeUtility.h; sourceTree = ""; }; + B6CAB0461AF9AA1900B9B856 /* btManifoldResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btManifoldResult.cpp; sourceTree = ""; }; + B6CAB0471AF9AA1900B9B856 /* btManifoldResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btManifoldResult.h; sourceTree = ""; }; + B6CAB0481AF9AA1900B9B856 /* btSimulationIslandManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSimulationIslandManager.cpp; sourceTree = ""; }; + B6CAB0491AF9AA1900B9B856 /* btSimulationIslandManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSimulationIslandManager.h; sourceTree = ""; }; + B6CAB04A1AF9AA1900B9B856 /* btSphereBoxCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSphereBoxCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB04B1AF9AA1900B9B856 /* btSphereBoxCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSphereBoxCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB04C1AF9AA1900B9B856 /* btSphereSphereCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSphereSphereCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB04D1AF9AA1900B9B856 /* btSphereSphereCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSphereSphereCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB04E1AF9AA1900B9B856 /* btSphereTriangleCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSphereTriangleCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB04F1AF9AA1900B9B856 /* btSphereTriangleCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSphereTriangleCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB0501AF9AA1900B9B856 /* btUnionFind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btUnionFind.cpp; sourceTree = ""; }; + B6CAB0511AF9AA1900B9B856 /* btUnionFind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btUnionFind.h; sourceTree = ""; }; + B6CAB0521AF9AA1900B9B856 /* SphereTriangleDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SphereTriangleDetector.cpp; sourceTree = ""; }; + B6CAB0531AF9AA1900B9B856 /* SphereTriangleDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SphereTriangleDetector.h; sourceTree = ""; }; + B6CAB0551AF9AA1900B9B856 /* btBox2dShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btBox2dShape.cpp; sourceTree = ""; }; + B6CAB0561AF9AA1900B9B856 /* btBox2dShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btBox2dShape.h; sourceTree = ""; }; + B6CAB0571AF9AA1900B9B856 /* btBoxShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btBoxShape.cpp; sourceTree = ""; }; + B6CAB0581AF9AA1900B9B856 /* btBoxShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btBoxShape.h; sourceTree = ""; }; + B6CAB0591AF9AA1900B9B856 /* btBvhTriangleMeshShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btBvhTriangleMeshShape.cpp; sourceTree = ""; }; + B6CAB05A1AF9AA1900B9B856 /* btBvhTriangleMeshShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btBvhTriangleMeshShape.h; sourceTree = ""; }; + B6CAB05B1AF9AA1900B9B856 /* btCapsuleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCapsuleShape.cpp; sourceTree = ""; }; + B6CAB05C1AF9AA1900B9B856 /* btCapsuleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCapsuleShape.h; sourceTree = ""; }; + B6CAB05D1AF9AA1900B9B856 /* btCollisionMargin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCollisionMargin.h; sourceTree = ""; }; + B6CAB05E1AF9AA1900B9B856 /* btCollisionShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCollisionShape.cpp; sourceTree = ""; }; + B6CAB05F1AF9AA1900B9B856 /* btCollisionShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCollisionShape.h; sourceTree = ""; }; + B6CAB0601AF9AA1900B9B856 /* btCompoundShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCompoundShape.cpp; sourceTree = ""; }; + B6CAB0611AF9AA1900B9B856 /* btCompoundShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCompoundShape.h; sourceTree = ""; }; + B6CAB0621AF9AA1900B9B856 /* btConcaveShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConcaveShape.cpp; sourceTree = ""; }; + B6CAB0631AF9AA1900B9B856 /* btConcaveShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConcaveShape.h; sourceTree = ""; }; + B6CAB0641AF9AA1900B9B856 /* btConeShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConeShape.cpp; sourceTree = ""; }; + B6CAB0651AF9AA1900B9B856 /* btConeShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConeShape.h; sourceTree = ""; }; + B6CAB0661AF9AA1900B9B856 /* btConvex2dShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvex2dShape.cpp; sourceTree = ""; }; + B6CAB0671AF9AA1900B9B856 /* btConvex2dShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvex2dShape.h; sourceTree = ""; }; + B6CAB0681AF9AA1900B9B856 /* btConvexHullShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexHullShape.cpp; sourceTree = ""; }; + B6CAB0691AF9AA1900B9B856 /* btConvexHullShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexHullShape.h; sourceTree = ""; }; + B6CAB06A1AF9AA1900B9B856 /* btConvexInternalShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexInternalShape.cpp; sourceTree = ""; }; + B6CAB06B1AF9AA1900B9B856 /* btConvexInternalShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexInternalShape.h; sourceTree = ""; }; + B6CAB06C1AF9AA1900B9B856 /* btConvexPointCloudShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexPointCloudShape.cpp; sourceTree = ""; }; + B6CAB06D1AF9AA1900B9B856 /* btConvexPointCloudShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexPointCloudShape.h; sourceTree = ""; }; + B6CAB06E1AF9AA1900B9B856 /* btConvexPolyhedron.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexPolyhedron.cpp; sourceTree = ""; }; + B6CAB06F1AF9AA1900B9B856 /* btConvexPolyhedron.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexPolyhedron.h; sourceTree = ""; }; + B6CAB0701AF9AA1900B9B856 /* btConvexShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexShape.cpp; sourceTree = ""; }; + B6CAB0711AF9AA1900B9B856 /* btConvexShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexShape.h; sourceTree = ""; }; + B6CAB0721AF9AA1900B9B856 /* btConvexTriangleMeshShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexTriangleMeshShape.cpp; sourceTree = ""; }; + B6CAB0731AF9AA1900B9B856 /* btConvexTriangleMeshShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexTriangleMeshShape.h; sourceTree = ""; }; + B6CAB0741AF9AA1900B9B856 /* btCylinderShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btCylinderShape.cpp; sourceTree = ""; }; + B6CAB0751AF9AA1900B9B856 /* btCylinderShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCylinderShape.h; sourceTree = ""; }; + B6CAB0761AF9AA1900B9B856 /* btEmptyShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btEmptyShape.cpp; sourceTree = ""; }; + B6CAB0771AF9AA1900B9B856 /* btEmptyShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btEmptyShape.h; sourceTree = ""; }; + B6CAB0781AF9AA1900B9B856 /* btHeightfieldTerrainShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btHeightfieldTerrainShape.cpp; sourceTree = ""; }; + B6CAB0791AF9AA1900B9B856 /* btHeightfieldTerrainShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btHeightfieldTerrainShape.h; sourceTree = ""; }; + B6CAB07A1AF9AA1900B9B856 /* btMaterial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMaterial.h; sourceTree = ""; }; + B6CAB07B1AF9AA1900B9B856 /* btMinkowskiSumShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMinkowskiSumShape.cpp; sourceTree = ""; }; + B6CAB07C1AF9AA1900B9B856 /* btMinkowskiSumShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMinkowskiSumShape.h; sourceTree = ""; }; + B6CAB07D1AF9AA1900B9B856 /* btMultimaterialTriangleMeshShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultimaterialTriangleMeshShape.cpp; sourceTree = ""; }; + B6CAB07E1AF9AA1900B9B856 /* btMultimaterialTriangleMeshShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultimaterialTriangleMeshShape.h; sourceTree = ""; }; + B6CAB07F1AF9AA1900B9B856 /* btMultiSphereShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultiSphereShape.cpp; sourceTree = ""; }; + B6CAB0801AF9AA1900B9B856 /* btMultiSphereShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiSphereShape.h; sourceTree = ""; }; + B6CAB0811AF9AA1900B9B856 /* btOptimizedBvh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btOptimizedBvh.cpp; sourceTree = ""; }; + B6CAB0821AF9AA1900B9B856 /* btOptimizedBvh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btOptimizedBvh.h; sourceTree = ""; }; + B6CAB0831AF9AA1900B9B856 /* btPolyhedralConvexShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btPolyhedralConvexShape.cpp; sourceTree = ""; }; + B6CAB0841AF9AA1900B9B856 /* btPolyhedralConvexShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btPolyhedralConvexShape.h; sourceTree = ""; }; + B6CAB0851AF9AA1900B9B856 /* btScaledBvhTriangleMeshShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btScaledBvhTriangleMeshShape.cpp; sourceTree = ""; }; + B6CAB0861AF9AA1900B9B856 /* btScaledBvhTriangleMeshShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btScaledBvhTriangleMeshShape.h; sourceTree = ""; }; + B6CAB0871AF9AA1900B9B856 /* btShapeHull.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btShapeHull.cpp; sourceTree = ""; }; + B6CAB0881AF9AA1900B9B856 /* btShapeHull.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btShapeHull.h; sourceTree = ""; }; + B6CAB0891AF9AA1900B9B856 /* btSphereShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSphereShape.cpp; sourceTree = ""; }; + B6CAB08A1AF9AA1900B9B856 /* btSphereShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSphereShape.h; sourceTree = ""; }; + B6CAB08B1AF9AA1900B9B856 /* btStaticPlaneShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btStaticPlaneShape.cpp; sourceTree = ""; }; + B6CAB08C1AF9AA1900B9B856 /* btStaticPlaneShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btStaticPlaneShape.h; sourceTree = ""; }; + B6CAB08D1AF9AA1900B9B856 /* btStridingMeshInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btStridingMeshInterface.cpp; sourceTree = ""; }; + B6CAB08E1AF9AA1900B9B856 /* btStridingMeshInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btStridingMeshInterface.h; sourceTree = ""; }; + B6CAB08F1AF9AA1900B9B856 /* btTetrahedronShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btTetrahedronShape.cpp; sourceTree = ""; }; + B6CAB0901AF9AA1900B9B856 /* btTetrahedronShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTetrahedronShape.h; sourceTree = ""; }; + B6CAB0911AF9AA1900B9B856 /* btTriangleBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btTriangleBuffer.cpp; sourceTree = ""; }; + B6CAB0921AF9AA1900B9B856 /* btTriangleBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTriangleBuffer.h; sourceTree = ""; }; + B6CAB0931AF9AA1900B9B856 /* btTriangleCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btTriangleCallback.cpp; sourceTree = ""; }; + B6CAB0941AF9AA1900B9B856 /* btTriangleCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTriangleCallback.h; sourceTree = ""; }; + B6CAB0951AF9AA1900B9B856 /* btTriangleIndexVertexArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btTriangleIndexVertexArray.cpp; sourceTree = ""; }; + B6CAB0961AF9AA1900B9B856 /* btTriangleIndexVertexArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTriangleIndexVertexArray.h; sourceTree = ""; }; + B6CAB0971AF9AA1900B9B856 /* btTriangleIndexVertexMaterialArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btTriangleIndexVertexMaterialArray.cpp; sourceTree = ""; }; + B6CAB0981AF9AA1900B9B856 /* btTriangleIndexVertexMaterialArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTriangleIndexVertexMaterialArray.h; sourceTree = ""; }; + B6CAB0991AF9AA1900B9B856 /* btTriangleInfoMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTriangleInfoMap.h; sourceTree = ""; }; + B6CAB09A1AF9AA1900B9B856 /* btTriangleMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btTriangleMesh.cpp; sourceTree = ""; }; + B6CAB09B1AF9AA1900B9B856 /* btTriangleMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTriangleMesh.h; sourceTree = ""; }; + B6CAB09C1AF9AA1900B9B856 /* btTriangleMeshShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btTriangleMeshShape.cpp; sourceTree = ""; }; + B6CAB09D1AF9AA1900B9B856 /* btTriangleMeshShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTriangleMeshShape.h; sourceTree = ""; }; + B6CAB09E1AF9AA1900B9B856 /* btTriangleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTriangleShape.h; sourceTree = ""; }; + B6CAB09F1AF9AA1900B9B856 /* btUniformScalingShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btUniformScalingShape.cpp; sourceTree = ""; }; + B6CAB0A01AF9AA1900B9B856 /* btUniformScalingShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btUniformScalingShape.h; sourceTree = ""; }; + B6CAB0A21AF9AA1900B9B856 /* btBoxCollision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btBoxCollision.h; sourceTree = ""; }; + B6CAB0A31AF9AA1900B9B856 /* btClipPolygon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btClipPolygon.h; sourceTree = ""; }; + B6CAB0A41AF9AA1900B9B856 /* btCompoundFromGimpact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCompoundFromGimpact.h; sourceTree = ""; }; + B6CAB0A51AF9AA1900B9B856 /* btContactProcessing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btContactProcessing.cpp; sourceTree = ""; }; + B6CAB0A61AF9AA1900B9B856 /* btContactProcessing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btContactProcessing.h; sourceTree = ""; }; + B6CAB0A71AF9AA1900B9B856 /* btGenericPoolAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGenericPoolAllocator.cpp; sourceTree = ""; }; + B6CAB0A81AF9AA1900B9B856 /* btGenericPoolAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGenericPoolAllocator.h; sourceTree = ""; }; + B6CAB0A91AF9AA1900B9B856 /* btGeometryOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGeometryOperations.h; sourceTree = ""; }; + B6CAB0AA1AF9AA1900B9B856 /* btGImpactBvh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGImpactBvh.cpp; sourceTree = ""; }; + B6CAB0AB1AF9AA1900B9B856 /* btGImpactBvh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGImpactBvh.h; sourceTree = ""; }; + B6CAB0AC1AF9AA1900B9B856 /* btGImpactCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGImpactCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB0AD1AF9AA1900B9B856 /* btGImpactCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGImpactCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB0AE1AF9AA1900B9B856 /* btGImpactMassUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGImpactMassUtil.h; sourceTree = ""; }; + B6CAB0AF1AF9AA1900B9B856 /* btGImpactQuantizedBvh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGImpactQuantizedBvh.cpp; sourceTree = ""; }; + B6CAB0B01AF9AA1900B9B856 /* btGImpactQuantizedBvh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGImpactQuantizedBvh.h; sourceTree = ""; }; + B6CAB0B11AF9AA1900B9B856 /* btGImpactShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGImpactShape.cpp; sourceTree = ""; }; + B6CAB0B21AF9AA1900B9B856 /* btGImpactShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGImpactShape.h; sourceTree = ""; }; + B6CAB0B31AF9AA1900B9B856 /* btQuantization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btQuantization.h; sourceTree = ""; }; + B6CAB0B41AF9AA1900B9B856 /* btTriangleShapeEx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btTriangleShapeEx.cpp; sourceTree = ""; }; + B6CAB0B51AF9AA1900B9B856 /* btTriangleShapeEx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTriangleShapeEx.h; sourceTree = ""; }; + B6CAB0B61AF9AA1900B9B856 /* gim_array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_array.h; sourceTree = ""; }; + B6CAB0B71AF9AA1900B9B856 /* gim_basic_geometry_operations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_basic_geometry_operations.h; sourceTree = ""; }; + B6CAB0B81AF9AA1900B9B856 /* gim_bitset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_bitset.h; sourceTree = ""; }; + B6CAB0B91AF9AA1900B9B856 /* gim_box_collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_box_collision.h; sourceTree = ""; }; + B6CAB0BA1AF9AA1900B9B856 /* gim_box_set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gim_box_set.cpp; sourceTree = ""; }; + B6CAB0BB1AF9AA1900B9B856 /* gim_box_set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_box_set.h; sourceTree = ""; }; + B6CAB0BC1AF9AA1900B9B856 /* gim_clip_polygon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_clip_polygon.h; sourceTree = ""; }; + B6CAB0BD1AF9AA1900B9B856 /* gim_contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gim_contact.cpp; sourceTree = ""; }; + B6CAB0BE1AF9AA1900B9B856 /* gim_contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_contact.h; sourceTree = ""; }; + B6CAB0BF1AF9AA1900B9B856 /* gim_geom_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_geom_types.h; sourceTree = ""; }; + B6CAB0C01AF9AA1900B9B856 /* gim_geometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_geometry.h; sourceTree = ""; }; + B6CAB0C11AF9AA1900B9B856 /* gim_hash_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_hash_table.h; sourceTree = ""; }; + B6CAB0C21AF9AA1900B9B856 /* gim_linear_math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_linear_math.h; sourceTree = ""; }; + B6CAB0C31AF9AA1900B9B856 /* gim_math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_math.h; sourceTree = ""; }; + B6CAB0C41AF9AA1900B9B856 /* gim_memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gim_memory.cpp; sourceTree = ""; }; + B6CAB0C51AF9AA1900B9B856 /* gim_memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_memory.h; sourceTree = ""; }; + B6CAB0C61AF9AA1900B9B856 /* gim_radixsort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_radixsort.h; sourceTree = ""; }; + B6CAB0C71AF9AA1900B9B856 /* gim_tri_collision.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gim_tri_collision.cpp; sourceTree = ""; }; + B6CAB0C81AF9AA1900B9B856 /* gim_tri_collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gim_tri_collision.h; sourceTree = ""; }; + B6CAB0CA1AF9AA1900B9B856 /* btContinuousConvexCollision.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btContinuousConvexCollision.cpp; sourceTree = ""; }; + B6CAB0CB1AF9AA1900B9B856 /* btContinuousConvexCollision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btContinuousConvexCollision.h; sourceTree = ""; }; + B6CAB0CC1AF9AA1900B9B856 /* btConvexCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexCast.cpp; sourceTree = ""; }; + B6CAB0CD1AF9AA1900B9B856 /* btConvexCast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexCast.h; sourceTree = ""; }; + B6CAB0CE1AF9AA1900B9B856 /* btConvexPenetrationDepthSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexPenetrationDepthSolver.h; sourceTree = ""; }; + B6CAB0CF1AF9AA1900B9B856 /* btDiscreteCollisionDetectorInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDiscreteCollisionDetectorInterface.h; sourceTree = ""; }; + B6CAB0D01AF9AA1900B9B856 /* btGjkConvexCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGjkConvexCast.cpp; sourceTree = ""; }; + B6CAB0D11AF9AA1900B9B856 /* btGjkConvexCast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGjkConvexCast.h; sourceTree = ""; }; + B6CAB0D21AF9AA1900B9B856 /* btGjkEpa2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGjkEpa2.cpp; sourceTree = ""; }; + B6CAB0D31AF9AA1900B9B856 /* btGjkEpa2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGjkEpa2.h; sourceTree = ""; }; + B6CAB0D41AF9AA1900B9B856 /* btGjkEpaPenetrationDepthSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGjkEpaPenetrationDepthSolver.cpp; sourceTree = ""; }; + B6CAB0D51AF9AA1900B9B856 /* btGjkEpaPenetrationDepthSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGjkEpaPenetrationDepthSolver.h; sourceTree = ""; }; + B6CAB0D61AF9AA1900B9B856 /* btGjkPairDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGjkPairDetector.cpp; sourceTree = ""; }; + B6CAB0D71AF9AA1900B9B856 /* btGjkPairDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGjkPairDetector.h; sourceTree = ""; }; + B6CAB0D81AF9AA1900B9B856 /* btManifoldPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btManifoldPoint.h; sourceTree = ""; }; + B6CAB0D91AF9AA1900B9B856 /* btMinkowskiPenetrationDepthSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMinkowskiPenetrationDepthSolver.cpp; sourceTree = ""; }; + B6CAB0DA1AF9AA1900B9B856 /* btMinkowskiPenetrationDepthSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMinkowskiPenetrationDepthSolver.h; sourceTree = ""; }; + B6CAB0DB1AF9AA1900B9B856 /* btPersistentManifold.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btPersistentManifold.cpp; sourceTree = ""; }; + B6CAB0DC1AF9AA1900B9B856 /* btPersistentManifold.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btPersistentManifold.h; sourceTree = ""; }; + B6CAB0DD1AF9AA1900B9B856 /* btPointCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btPointCollector.h; sourceTree = ""; }; + B6CAB0DE1AF9AA1900B9B856 /* btPolyhedralContactClipping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btPolyhedralContactClipping.cpp; sourceTree = ""; }; + B6CAB0DF1AF9AA1900B9B856 /* btPolyhedralContactClipping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btPolyhedralContactClipping.h; sourceTree = ""; }; + B6CAB0E01AF9AA1900B9B856 /* btRaycastCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btRaycastCallback.cpp; sourceTree = ""; }; + B6CAB0E11AF9AA1900B9B856 /* btRaycastCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btRaycastCallback.h; sourceTree = ""; }; + B6CAB0E21AF9AA1900B9B856 /* btSimplexSolverInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSimplexSolverInterface.h; sourceTree = ""; }; + B6CAB0E31AF9AA1900B9B856 /* btSubSimplexConvexCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSubSimplexConvexCast.cpp; sourceTree = ""; }; + B6CAB0E41AF9AA1900B9B856 /* btSubSimplexConvexCast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSubSimplexConvexCast.h; sourceTree = ""; }; + B6CAB0E51AF9AA1900B9B856 /* btVoronoiSimplexSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btVoronoiSimplexSolver.cpp; sourceTree = ""; }; + B6CAB0E61AF9AA1900B9B856 /* btVoronoiSimplexSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btVoronoiSimplexSolver.h; sourceTree = ""; }; + B6CAB0E91AF9AA1900B9B856 /* btCharacterControllerInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btCharacterControllerInterface.h; sourceTree = ""; }; + B6CAB0EA1AF9AA1900B9B856 /* btKinematicCharacterController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btKinematicCharacterController.cpp; sourceTree = ""; }; + B6CAB0EB1AF9AA1900B9B856 /* btKinematicCharacterController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btKinematicCharacterController.h; sourceTree = ""; }; + B6CAB0ED1AF9AA1900B9B856 /* btConeTwistConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConeTwistConstraint.cpp; sourceTree = ""; }; + B6CAB0EE1AF9AA1900B9B856 /* btConeTwistConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConeTwistConstraint.h; sourceTree = ""; }; + B6CAB0EF1AF9AA1900B9B856 /* btConstraintSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConstraintSolver.h; sourceTree = ""; }; + B6CAB0F01AF9AA1900B9B856 /* btContactConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btContactConstraint.cpp; sourceTree = ""; }; + B6CAB0F11AF9AA1900B9B856 /* btContactConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btContactConstraint.h; sourceTree = ""; }; + B6CAB0F21AF9AA1900B9B856 /* btContactSolverInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btContactSolverInfo.h; sourceTree = ""; }; + B6CAB0F31AF9AA1900B9B856 /* btFixedConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btFixedConstraint.cpp; sourceTree = ""; }; + B6CAB0F41AF9AA1900B9B856 /* btFixedConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btFixedConstraint.h; sourceTree = ""; }; + B6CAB0F51AF9AA1900B9B856 /* btGearConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGearConstraint.cpp; sourceTree = ""; }; + B6CAB0F61AF9AA1900B9B856 /* btGearConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGearConstraint.h; sourceTree = ""; }; + B6CAB0F71AF9AA1900B9B856 /* btGeneric6DofConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGeneric6DofConstraint.cpp; sourceTree = ""; }; + B6CAB0F81AF9AA1900B9B856 /* btGeneric6DofConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGeneric6DofConstraint.h; sourceTree = ""; }; + B6CAB0F91AF9AA1900B9B856 /* btGeneric6DofSpringConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGeneric6DofSpringConstraint.cpp; sourceTree = ""; }; + B6CAB0FA1AF9AA1900B9B856 /* btGeneric6DofSpringConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGeneric6DofSpringConstraint.h; sourceTree = ""; }; + B6CAB0FB1AF9AA1900B9B856 /* btHinge2Constraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btHinge2Constraint.cpp; sourceTree = ""; }; + B6CAB0FC1AF9AA1900B9B856 /* btHinge2Constraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btHinge2Constraint.h; sourceTree = ""; }; + B6CAB0FD1AF9AA1900B9B856 /* btHingeConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btHingeConstraint.cpp; sourceTree = ""; }; + B6CAB0FE1AF9AA1900B9B856 /* btHingeConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btHingeConstraint.h; sourceTree = ""; }; + B6CAB0FF1AF9AA1900B9B856 /* btJacobianEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btJacobianEntry.h; sourceTree = ""; }; + B6CAB1001AF9AA1900B9B856 /* btPoint2PointConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btPoint2PointConstraint.cpp; sourceTree = ""; }; + B6CAB1011AF9AA1900B9B856 /* btPoint2PointConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btPoint2PointConstraint.h; sourceTree = ""; }; + B6CAB1021AF9AA1900B9B856 /* btSequentialImpulseConstraintSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSequentialImpulseConstraintSolver.cpp; sourceTree = ""; }; + B6CAB1031AF9AA1900B9B856 /* btSequentialImpulseConstraintSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSequentialImpulseConstraintSolver.h; sourceTree = ""; }; + B6CAB1041AF9AA1900B9B856 /* btSliderConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSliderConstraint.cpp; sourceTree = ""; }; + B6CAB1051AF9AA1900B9B856 /* btSliderConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSliderConstraint.h; sourceTree = ""; }; + B6CAB1061AF9AA1900B9B856 /* btSolve2LinearConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSolve2LinearConstraint.cpp; sourceTree = ""; }; + B6CAB1071AF9AA1900B9B856 /* btSolve2LinearConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSolve2LinearConstraint.h; sourceTree = ""; }; + B6CAB1081AF9AA1900B9B856 /* btSolverBody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSolverBody.h; sourceTree = ""; }; + B6CAB1091AF9AA1900B9B856 /* btSolverConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSolverConstraint.h; sourceTree = ""; }; + B6CAB10A1AF9AA1900B9B856 /* btTypedConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btTypedConstraint.cpp; sourceTree = ""; }; + B6CAB10B1AF9AA1900B9B856 /* btTypedConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTypedConstraint.h; sourceTree = ""; }; + B6CAB10C1AF9AA1900B9B856 /* btUniversalConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btUniversalConstraint.cpp; sourceTree = ""; }; + B6CAB10D1AF9AA1900B9B856 /* btUniversalConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btUniversalConstraint.h; sourceTree = ""; }; + B6CAB10F1AF9AA1900B9B856 /* btActionInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btActionInterface.h; sourceTree = ""; }; + B6CAB1101AF9AA1900B9B856 /* btDiscreteDynamicsWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btDiscreteDynamicsWorld.cpp; sourceTree = ""; }; + B6CAB1111AF9AA1900B9B856 /* btDiscreteDynamicsWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDiscreteDynamicsWorld.h; sourceTree = ""; }; + B6CAB1121AF9AA1900B9B856 /* btDynamicsWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDynamicsWorld.h; sourceTree = ""; }; + B6CAB1131AF9AA1900B9B856 /* btRigidBody.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btRigidBody.cpp; sourceTree = ""; }; + B6CAB1141AF9AA1900B9B856 /* btRigidBody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btRigidBody.h; sourceTree = ""; }; + B6CAB1151AF9AA1900B9B856 /* btSimpleDynamicsWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSimpleDynamicsWorld.cpp; sourceTree = ""; }; + B6CAB1161AF9AA1900B9B856 /* btSimpleDynamicsWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSimpleDynamicsWorld.h; sourceTree = ""; }; + B6CAB1171AF9AA1900B9B856 /* Bullet-C-API.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "Bullet-C-API.cpp"; sourceTree = ""; }; + B6CAB1191AF9AA1900B9B856 /* btMultiBody.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultiBody.cpp; sourceTree = ""; }; + B6CAB11A1AF9AA1900B9B856 /* btMultiBody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBody.h; sourceTree = ""; }; + B6CAB11B1AF9AA1900B9B856 /* btMultiBodyConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultiBodyConstraint.cpp; sourceTree = ""; }; + B6CAB11C1AF9AA1900B9B856 /* btMultiBodyConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBodyConstraint.h; sourceTree = ""; }; + B6CAB11D1AF9AA1900B9B856 /* btMultiBodyConstraintSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultiBodyConstraintSolver.cpp; sourceTree = ""; }; + B6CAB11E1AF9AA1900B9B856 /* btMultiBodyConstraintSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBodyConstraintSolver.h; sourceTree = ""; }; + B6CAB11F1AF9AA1900B9B856 /* btMultiBodyDynamicsWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultiBodyDynamicsWorld.cpp; sourceTree = ""; }; + B6CAB1201AF9AA1900B9B856 /* btMultiBodyDynamicsWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBodyDynamicsWorld.h; sourceTree = ""; }; + B6CAB1211AF9AA1900B9B856 /* btMultiBodyJointLimitConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultiBodyJointLimitConstraint.cpp; sourceTree = ""; }; + B6CAB1221AF9AA1900B9B856 /* btMultiBodyJointLimitConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBodyJointLimitConstraint.h; sourceTree = ""; }; + B6CAB1231AF9AA1900B9B856 /* btMultiBodyJointMotor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultiBodyJointMotor.cpp; sourceTree = ""; }; + B6CAB1241AF9AA1900B9B856 /* btMultiBodyJointMotor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBodyJointMotor.h; sourceTree = ""; }; + B6CAB1251AF9AA1900B9B856 /* btMultiBodyLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBodyLink.h; sourceTree = ""; }; + B6CAB1261AF9AA1900B9B856 /* btMultiBodyLinkCollider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBodyLinkCollider.h; sourceTree = ""; }; + B6CAB1271AF9AA1900B9B856 /* btMultiBodyPoint2Point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMultiBodyPoint2Point.cpp; sourceTree = ""; }; + B6CAB1281AF9AA1900B9B856 /* btMultiBodyPoint2Point.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBodyPoint2Point.h; sourceTree = ""; }; + B6CAB1291AF9AA1900B9B856 /* btMultiBodySolverConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMultiBodySolverConstraint.h; sourceTree = ""; }; + B6CAB12B1AF9AA1900B9B856 /* btDantzigLCP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btDantzigLCP.cpp; sourceTree = ""; }; + B6CAB12C1AF9AA1900B9B856 /* btDantzigLCP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDantzigLCP.h; sourceTree = ""; }; + B6CAB12D1AF9AA1900B9B856 /* btDantzigSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDantzigSolver.h; sourceTree = ""; }; + B6CAB12E1AF9AA1900B9B856 /* btMLCPSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btMLCPSolver.cpp; sourceTree = ""; }; + B6CAB12F1AF9AA1900B9B856 /* btMLCPSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMLCPSolver.h; sourceTree = ""; }; + B6CAB1301AF9AA1900B9B856 /* btMLCPSolverInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMLCPSolverInterface.h; sourceTree = ""; }; + B6CAB1311AF9AA1900B9B856 /* btPATHSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btPATHSolver.h; sourceTree = ""; }; + B6CAB1321AF9AA1900B9B856 /* btSolveProjectedGaussSeidel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSolveProjectedGaussSeidel.h; sourceTree = ""; }; + B6CAB1341AF9AA1900B9B856 /* btRaycastVehicle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btRaycastVehicle.cpp; sourceTree = ""; }; + B6CAB1351AF9AA1900B9B856 /* btRaycastVehicle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btRaycastVehicle.h; sourceTree = ""; }; + B6CAB1361AF9AA1900B9B856 /* btVehicleRaycaster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btVehicleRaycaster.h; sourceTree = ""; }; + B6CAB1371AF9AA1900B9B856 /* btWheelInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btWheelInfo.cpp; sourceTree = ""; }; + B6CAB1381AF9AA1900B9B856 /* btWheelInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btWheelInfo.h; sourceTree = ""; }; + B6CAB13A1AF9AA1900B9B856 /* btGpu3DGridBroadphase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGpu3DGridBroadphase.cpp; sourceTree = ""; }; + B6CAB13B1AF9AA1900B9B856 /* btGpu3DGridBroadphase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGpu3DGridBroadphase.h; sourceTree = ""; }; + B6CAB13C1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGpu3DGridBroadphaseSharedCode.h; sourceTree = ""; }; + B6CAB13D1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedDefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGpu3DGridBroadphaseSharedDefs.h; sourceTree = ""; }; + B6CAB13E1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGpu3DGridBroadphaseSharedTypes.h; sourceTree = ""; }; + B6CAB13F1AF9AA1900B9B856 /* btGpuDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGpuDefines.h; sourceTree = ""; }; + B6CAB1401AF9AA1900B9B856 /* btGpuUtilsSharedCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGpuUtilsSharedCode.h; sourceTree = ""; }; + B6CAB1411AF9AA1900B9B856 /* btGpuUtilsSharedDefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGpuUtilsSharedDefs.h; sourceTree = ""; }; + B6CAB1421AF9AA1900B9B856 /* btParallelConstraintSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btParallelConstraintSolver.cpp; sourceTree = ""; }; + B6CAB1431AF9AA1900B9B856 /* btParallelConstraintSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btParallelConstraintSolver.h; sourceTree = ""; }; + B6CAB1441AF9AA1900B9B856 /* btThreadSupportInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btThreadSupportInterface.cpp; sourceTree = ""; }; + B6CAB1451AF9AA1900B9B856 /* btThreadSupportInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btThreadSupportInterface.h; sourceTree = ""; }; + B6CAB1841AF9AA1A00B9B856 /* HeapManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapManager.h; sourceTree = ""; }; + B6CAB1851AF9AA1A00B9B856 /* PlatformDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformDefinitions.h; sourceTree = ""; }; + B6CAB1861AF9AA1A00B9B856 /* PosixThreadSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PosixThreadSupport.cpp; sourceTree = ""; }; + B6CAB1871AF9AA1A00B9B856 /* PosixThreadSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PosixThreadSupport.h; sourceTree = ""; }; + B6CAB1881AF9AA1A00B9B856 /* PpuAddressSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PpuAddressSpace.h; sourceTree = ""; }; + B6CAB1891AF9AA1A00B9B856 /* SequentialThreadSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SequentialThreadSupport.cpp; sourceTree = ""; }; + B6CAB18A1AF9AA1A00B9B856 /* SequentialThreadSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SequentialThreadSupport.h; sourceTree = ""; }; + B6CAB18B1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuCollisionObjectWrapper.cpp; sourceTree = ""; }; + B6CAB18C1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuCollisionObjectWrapper.h; sourceTree = ""; }; + B6CAB18D1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuCollisionTaskProcess.cpp; sourceTree = ""; }; + B6CAB18E1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuCollisionTaskProcess.h; sourceTree = ""; }; + B6CAB18F1AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuContactManifoldCollisionAlgorithm.cpp; sourceTree = ""; }; + B6CAB1901AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuContactManifoldCollisionAlgorithm.h; sourceTree = ""; }; + B6CAB1911AF9AA1A00B9B856 /* SpuDoubleBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuDoubleBuffer.h; sourceTree = ""; }; + B6CAB1921AF9AA1A00B9B856 /* SpuFakeDma.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuFakeDma.cpp; sourceTree = ""; }; + B6CAB1931AF9AA1A00B9B856 /* SpuFakeDma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuFakeDma.h; sourceTree = ""; }; + B6CAB1941AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuGatheringCollisionDispatcher.cpp; sourceTree = ""; }; + B6CAB1951AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuGatheringCollisionDispatcher.h; sourceTree = ""; }; + B6CAB1961AF9AA1A00B9B856 /* SpuLibspe2Support.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuLibspe2Support.cpp; sourceTree = ""; }; + B6CAB1971AF9AA1A00B9B856 /* SpuLibspe2Support.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuLibspe2Support.h; sourceTree = ""; }; + B6CAB1991AF9AA1A00B9B856 /* Box.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box.h; sourceTree = ""; }; + B6CAB19A1AF9AA1A00B9B856 /* boxBoxDistance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = boxBoxDistance.cpp; sourceTree = ""; }; + B6CAB19B1AF9AA1A00B9B856 /* boxBoxDistance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = boxBoxDistance.h; sourceTree = ""; }; + B6CAB19C1AF9AA1A00B9B856 /* SpuCollisionShapes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuCollisionShapes.cpp; sourceTree = ""; }; + B6CAB19D1AF9AA1A00B9B856 /* SpuCollisionShapes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuCollisionShapes.h; sourceTree = ""; }; + B6CAB19E1AF9AA1A00B9B856 /* SpuContactResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuContactResult.cpp; sourceTree = ""; }; + B6CAB19F1AF9AA1A00B9B856 /* SpuContactResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuContactResult.h; sourceTree = ""; }; + B6CAB1A01AF9AA1A00B9B856 /* SpuConvexPenetrationDepthSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuConvexPenetrationDepthSolver.h; sourceTree = ""; }; + B6CAB1A11AF9AA1A00B9B856 /* SpuGatheringCollisionTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuGatheringCollisionTask.cpp; sourceTree = ""; }; + B6CAB1A21AF9AA1A00B9B856 /* SpuGatheringCollisionTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuGatheringCollisionTask.h; sourceTree = ""; }; + B6CAB1A31AF9AA1A00B9B856 /* SpuLocalSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuLocalSupport.h; sourceTree = ""; }; + B6CAB1A41AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuMinkowskiPenetrationDepthSolver.cpp; sourceTree = ""; }; + B6CAB1A51AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuMinkowskiPenetrationDepthSolver.h; sourceTree = ""; }; + B6CAB1A61AF9AA1A00B9B856 /* SpuPreferredPenetrationDirections.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuPreferredPenetrationDirections.h; sourceTree = ""; }; + B6CAB1A81AF9AA1A00B9B856 /* SpuSampleTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuSampleTask.cpp; sourceTree = ""; }; + B6CAB1A91AF9AA1A00B9B856 /* SpuSampleTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuSampleTask.h; sourceTree = ""; }; + B6CAB1AA1AF9AA1A00B9B856 /* SpuSampleTaskProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpuSampleTaskProcess.cpp; sourceTree = ""; }; + B6CAB1AB1AF9AA1A00B9B856 /* SpuSampleTaskProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuSampleTaskProcess.h; sourceTree = ""; }; + B6CAB1AC1AF9AA1A00B9B856 /* SpuSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpuSync.h; sourceTree = ""; }; + B6CAB1AD1AF9AA1A00B9B856 /* TrbDynBody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrbDynBody.h; sourceTree = ""; }; + B6CAB1AE1AF9AA1A00B9B856 /* TrbStateVec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrbStateVec.h; sourceTree = ""; }; + B6CAB1AF1AF9AA1A00B9B856 /* vectormath2bullet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vectormath2bullet.h; sourceTree = ""; }; + B6CAB1B01AF9AA1A00B9B856 /* Win32ThreadSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Win32ThreadSupport.cpp; sourceTree = ""; }; + B6CAB1B11AF9AA1A00B9B856 /* Win32ThreadSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Win32ThreadSupport.h; sourceTree = ""; }; + B6CAB1B31AF9AA1A00B9B856 /* btAabbUtil2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btAabbUtil2.h; sourceTree = ""; }; + B6CAB1B41AF9AA1A00B9B856 /* btAlignedAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btAlignedAllocator.cpp; sourceTree = ""; }; + B6CAB1B51AF9AA1A00B9B856 /* btAlignedAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btAlignedAllocator.h; sourceTree = ""; }; + B6CAB1B61AF9AA1A00B9B856 /* btAlignedObjectArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btAlignedObjectArray.h; sourceTree = ""; }; + B6CAB1B71AF9AA1A00B9B856 /* btConvexHull.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexHull.cpp; sourceTree = ""; }; + B6CAB1B81AF9AA1A00B9B856 /* btConvexHull.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexHull.h; sourceTree = ""; }; + B6CAB1B91AF9AA1A00B9B856 /* btConvexHullComputer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btConvexHullComputer.cpp; sourceTree = ""; }; + B6CAB1BA1AF9AA1A00B9B856 /* btConvexHullComputer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btConvexHullComputer.h; sourceTree = ""; }; + B6CAB1BB1AF9AA1A00B9B856 /* btDefaultMotionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btDefaultMotionState.h; sourceTree = ""; }; + B6CAB1BC1AF9AA1A00B9B856 /* btGeometryUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btGeometryUtil.cpp; sourceTree = ""; }; + B6CAB1BD1AF9AA1A00B9B856 /* btGeometryUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGeometryUtil.h; sourceTree = ""; }; + B6CAB1BE1AF9AA1A00B9B856 /* btGrahamScan2dConvexHull.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btGrahamScan2dConvexHull.h; sourceTree = ""; }; + B6CAB1BF1AF9AA1A00B9B856 /* btHashMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btHashMap.h; sourceTree = ""; }; + B6CAB1C01AF9AA1A00B9B856 /* btIDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btIDebugDraw.h; sourceTree = ""; }; + B6CAB1C11AF9AA1A00B9B856 /* btList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btList.h; sourceTree = ""; }; + B6CAB1C21AF9AA1A00B9B856 /* btMatrix3x3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMatrix3x3.h; sourceTree = ""; }; + B6CAB1C31AF9AA1A00B9B856 /* btMatrixX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMatrixX.h; sourceTree = ""; }; + B6CAB1C41AF9AA1A00B9B856 /* btMinMax.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMinMax.h; sourceTree = ""; }; + B6CAB1C51AF9AA1A00B9B856 /* btMotionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btMotionState.h; sourceTree = ""; }; + B6CAB1C61AF9AA1A00B9B856 /* btPolarDecomposition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btPolarDecomposition.cpp; sourceTree = ""; }; + B6CAB1C71AF9AA1A00B9B856 /* btPolarDecomposition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btPolarDecomposition.h; sourceTree = ""; }; + B6CAB1C81AF9AA1A00B9B856 /* btPoolAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btPoolAllocator.h; sourceTree = ""; }; + B6CAB1C91AF9AA1A00B9B856 /* btQuadWord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btQuadWord.h; sourceTree = ""; }; + B6CAB1CA1AF9AA1A00B9B856 /* btQuaternion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btQuaternion.h; sourceTree = ""; }; + B6CAB1CB1AF9AA1A00B9B856 /* btQuickprof.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btQuickprof.cpp; sourceTree = ""; }; + B6CAB1CC1AF9AA1A00B9B856 /* btQuickprof.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btQuickprof.h; sourceTree = ""; }; + B6CAB1CD1AF9AA1A00B9B856 /* btRandom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btRandom.h; sourceTree = ""; }; + B6CAB1CE1AF9AA1A00B9B856 /* btScalar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btScalar.h; sourceTree = ""; }; + B6CAB1CF1AF9AA1A00B9B856 /* btSerializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btSerializer.cpp; sourceTree = ""; }; + B6CAB1D01AF9AA1A00B9B856 /* btSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btSerializer.h; sourceTree = ""; }; + B6CAB1D11AF9AA1A00B9B856 /* btStackAlloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btStackAlloc.h; sourceTree = ""; }; + B6CAB1D21AF9AA1A00B9B856 /* btTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTransform.h; sourceTree = ""; }; + B6CAB1D31AF9AA1A00B9B856 /* btTransformUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btTransformUtil.h; sourceTree = ""; }; + B6CAB1D41AF9AA1A00B9B856 /* btVector3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = btVector3.cpp; sourceTree = ""; }; + B6CAB1D51AF9AA1A00B9B856 /* btVector3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btVector3.h; sourceTree = ""; }; + B6CAB1D71AF9AA1A00B9B856 /* cl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl.h; sourceTree = ""; }; + B6CAB1D81AF9AA1A00B9B856 /* cl_gl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_gl.h; sourceTree = ""; }; + B6CAB1D91AF9AA1A00B9B856 /* cl_MiniCL_Defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_MiniCL_Defs.h; sourceTree = ""; }; + B6CAB1DA1AF9AA1A00B9B856 /* cl_platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_platform.h; sourceTree = ""; }; + B6CAB1DB1AF9AA1A00B9B856 /* MiniCL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MiniCL.cpp; sourceTree = ""; }; + B6CAB1DD1AF9AA1A00B9B856 /* MiniCLTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MiniCLTask.cpp; sourceTree = ""; }; + B6CAB1DE1AF9AA1A00B9B856 /* MiniCLTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MiniCLTask.h; sourceTree = ""; }; + B6CAB1DF1AF9AA1A00B9B856 /* MiniCLTaskScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MiniCLTaskScheduler.cpp; sourceTree = ""; }; + B6CAB1E01AF9AA1A00B9B856 /* MiniCLTaskScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MiniCLTaskScheduler.h; sourceTree = ""; }; B6D38B861AC3AFAC00043997 /* CCSkybox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkybox.cpp; sourceTree = ""; }; B6D38B871AC3AFAC00043997 /* CCSkybox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkybox.h; sourceTree = ""; }; B6D38B881AC3AFAC00043997 /* CCTextureCube.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTextureCube.cpp; sourceTree = ""; }; @@ -4173,6 +5424,7 @@ 46A170851807CE87005B8026 /* math */, 1AAF5360180E3374000584C8 /* network */, 46A170611807CE7A005B8026 /* physics */, + B6CAAFD11AF9A98E00B9B856 /* physics3d */, 50ABBEDB1926664700A911A9 /* platform */, 1551A340158F2AB200E66CFE /* Products */, 500DC89819105D41007B91BF /* renderer */, @@ -4366,6 +5618,8 @@ 1A5700A2180BC5E60088DEC7 /* base */ = { isa = PBXGroup; children = ( + 505385001B01887A00793096 /* CCProperties.h */, + 505385011B01887A00793096 /* CCProperties.cpp */, B63990CA1A490AFE00B07923 /* CCAsyncTaskPool.cpp */, B63990CB1A490AFE00B07923 /* CCAsyncTaskPool.h */, D0FD03391A3B51AA00825BB5 /* allocator */, @@ -4667,6 +5921,7 @@ 1A57033E180BD0490088DEC7 /* external */ = { isa = PBXGroup; children = ( + B6CAB0021AF9A9EE00B9B856 /* bullet */, 15FB20781AE7C57D00C31518 /* poly2tri */, 382383E11A258FA7002C4610 /* flatbuffers */, 1AC026971914068200FA920D /* ConvertUTF */, @@ -5928,6 +7183,7 @@ 500DC89819105D41007B91BF /* renderer */ = { isa = PBXGroup; children = ( + 5034CA5D191D591900CE6051 /* shaders */, B276EF5B1988D1D500CD400F /* CCVertexIndexData.h */, B276EF5C1988D1D500CD400F /* CCVertexIndexData.cpp */, B276EF5D1988D1D500CD400F /* CCVertexIndexBuffer.h */, @@ -5971,7 +7227,6 @@ B257B44D1989D5E800D9A687 /* CCPrimitive.h */, B257B45E198A353E00D9A687 /* CCPrimitiveCommand.cpp */, B257B45F198A353E00D9A687 /* CCPrimitiveCommand.h */, - 5034CA5D191D591900CE6051 /* shaders */, 5012168C1AC47380009A4BEA /* CCRenderState.cpp */, 5012168D1AC47380009A4BEA /* CCRenderState.h */, 501216921AC47393009A4BEA /* CCPass.cpp */, @@ -5980,6 +7235,8 @@ 501216991AC473A3009A4BEA /* CCTechnique.h */, 5012169E1AC473AD009A4BEA /* CCMaterial.cpp */, 5012169F1AC473AD009A4BEA /* CCMaterial.h */, + 5053850A1B02819E00793096 /* CCVertexAttribBinding.cpp */, + 5053850B1B02819E00793096 /* CCVertexAttribBinding.h */, ); name = renderer; path = ../cocos/renderer; @@ -6658,6 +7915,590 @@ name = ParticleUniverse; sourceTree = ""; }; + B6CAAFD11AF9A98E00B9B856 /* physics3d */ = { + isa = PBXGroup; + children = ( + B6CAAFD21AF9A9E100B9B856 /* CCPhysics3D.cpp */, + B6CAAFD31AF9A9E100B9B856 /* CCPhysics3D.h */, + B6CAAFD41AF9A9E100B9B856 /* CCPhysics3DComponent.cpp */, + B6CAAFD51AF9A9E100B9B856 /* CCPhysics3DComponent.h */, + B6CAAFD61AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp */, + B6CAAFD71AF9A9E100B9B856 /* CCPhysics3DConstraint.h */, + B6CAAFD81AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp */, + B6CAAFD91AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h */, + B6CAAFDA1AF9A9E100B9B856 /* CCPhysics3DObject.cpp */, + B6CAAFDB1AF9A9E100B9B856 /* CCPhysics3DObject.h */, + B6CAAFDC1AF9A9E100B9B856 /* CCPhysics3DShape.cpp */, + B6CAAFDD1AF9A9E100B9B856 /* CCPhysics3DShape.h */, + B6CAAFDE1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp */, + B6CAAFDF1AF9A9E100B9B856 /* CCPhysics3DWorld.h */, + B6CAAFE01AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp */, + B6CAAFE11AF9A9E100B9B856 /* CCPhysicsSprite3D.h */, + ); + name = physics3d; + sourceTree = ""; + }; + B6CAB0021AF9A9EE00B9B856 /* bullet */ = { + isa = PBXGroup; + children = ( + B6CAB0031AF9AA1900B9B856 /* btBulletCollisionCommon.h */, + B6CAB0041AF9AA1900B9B856 /* btBulletDynamicsCommon.h */, + B6CAB0051AF9AA1900B9B856 /* Bullet-C-Api.h */, + B6CAB0061AF9AA1900B9B856 /* BulletCollision */, + B6CAB0E71AF9AA1900B9B856 /* BulletDynamics */, + B6CAB1391AF9AA1900B9B856 /* BulletMultiThreaded */, + B6CAB1B21AF9AA1A00B9B856 /* LinearMath */, + B6CAB1D61AF9AA1A00B9B856 /* MiniCL */, + ); + name = bullet; + sourceTree = ""; + }; + B6CAB0061AF9AA1900B9B856 /* BulletCollision */ = { + isa = PBXGroup; + children = ( + B6CAB0071AF9AA1900B9B856 /* BroadphaseCollision */, + B6CAB01E1AF9AA1900B9B856 /* CollisionDispatch */, + B6CAB0541AF9AA1900B9B856 /* CollisionShapes */, + B6CAB0A11AF9AA1900B9B856 /* Gimpact */, + B6CAB0C91AF9AA1900B9B856 /* NarrowPhaseCollision */, + ); + name = BulletCollision; + path = ../external/bullet/BulletCollision; + sourceTree = ""; + }; + B6CAB0071AF9AA1900B9B856 /* BroadphaseCollision */ = { + isa = PBXGroup; + children = ( + B6CAB0081AF9AA1900B9B856 /* btAxisSweep3.cpp */, + B6CAB0091AF9AA1900B9B856 /* btAxisSweep3.h */, + B6CAB00A1AF9AA1900B9B856 /* btBroadphaseInterface.h */, + B6CAB00B1AF9AA1900B9B856 /* btBroadphaseProxy.cpp */, + B6CAB00C1AF9AA1900B9B856 /* btBroadphaseProxy.h */, + B6CAB00D1AF9AA1900B9B856 /* btCollisionAlgorithm.cpp */, + B6CAB00E1AF9AA1900B9B856 /* btCollisionAlgorithm.h */, + B6CAB00F1AF9AA1900B9B856 /* btDbvt.cpp */, + B6CAB0101AF9AA1900B9B856 /* btDbvt.h */, + B6CAB0111AF9AA1900B9B856 /* btDbvtBroadphase.cpp */, + B6CAB0121AF9AA1900B9B856 /* btDbvtBroadphase.h */, + B6CAB0131AF9AA1900B9B856 /* btDispatcher.cpp */, + B6CAB0141AF9AA1900B9B856 /* btDispatcher.h */, + B6CAB0151AF9AA1900B9B856 /* btMultiSapBroadphase.cpp */, + B6CAB0161AF9AA1900B9B856 /* btMultiSapBroadphase.h */, + B6CAB0171AF9AA1900B9B856 /* btOverlappingPairCache.cpp */, + B6CAB0181AF9AA1900B9B856 /* btOverlappingPairCache.h */, + B6CAB0191AF9AA1900B9B856 /* btOverlappingPairCallback.h */, + B6CAB01A1AF9AA1900B9B856 /* btQuantizedBvh.cpp */, + B6CAB01B1AF9AA1900B9B856 /* btQuantizedBvh.h */, + B6CAB01C1AF9AA1900B9B856 /* btSimpleBroadphase.cpp */, + B6CAB01D1AF9AA1900B9B856 /* btSimpleBroadphase.h */, + ); + path = BroadphaseCollision; + sourceTree = ""; + }; + B6CAB01E1AF9AA1900B9B856 /* CollisionDispatch */ = { + isa = PBXGroup; + children = ( + B6CAB01F1AF9AA1900B9B856 /* btActivatingCollisionAlgorithm.cpp */, + B6CAB0201AF9AA1900B9B856 /* btActivatingCollisionAlgorithm.h */, + B6CAB0211AF9AA1900B9B856 /* btBox2dBox2dCollisionAlgorithm.cpp */, + B6CAB0221AF9AA1900B9B856 /* btBox2dBox2dCollisionAlgorithm.h */, + B6CAB0231AF9AA1900B9B856 /* btBoxBoxCollisionAlgorithm.cpp */, + B6CAB0241AF9AA1900B9B856 /* btBoxBoxCollisionAlgorithm.h */, + B6CAB0251AF9AA1900B9B856 /* btBoxBoxDetector.cpp */, + B6CAB0261AF9AA1900B9B856 /* btBoxBoxDetector.h */, + B6CAB0271AF9AA1900B9B856 /* btCollisionConfiguration.h */, + B6CAB0281AF9AA1900B9B856 /* btCollisionCreateFunc.h */, + B6CAB0291AF9AA1900B9B856 /* btCollisionDispatcher.cpp */, + B6CAB02A1AF9AA1900B9B856 /* btCollisionDispatcher.h */, + B6CAB02B1AF9AA1900B9B856 /* btCollisionObject.cpp */, + B6CAB02C1AF9AA1900B9B856 /* btCollisionObject.h */, + B6CAB02D1AF9AA1900B9B856 /* btCollisionObjectWrapper.h */, + B6CAB02E1AF9AA1900B9B856 /* btCollisionWorld.cpp */, + B6CAB02F1AF9AA1900B9B856 /* btCollisionWorld.h */, + B6CAB0301AF9AA1900B9B856 /* btCompoundCollisionAlgorithm.cpp */, + B6CAB0311AF9AA1900B9B856 /* btCompoundCollisionAlgorithm.h */, + B6CAB0321AF9AA1900B9B856 /* btCompoundCompoundCollisionAlgorithm.cpp */, + B6CAB0331AF9AA1900B9B856 /* btCompoundCompoundCollisionAlgorithm.h */, + B6CAB0341AF9AA1900B9B856 /* btConvex2dConvex2dAlgorithm.cpp */, + B6CAB0351AF9AA1900B9B856 /* btConvex2dConvex2dAlgorithm.h */, + B6CAB0361AF9AA1900B9B856 /* btConvexConcaveCollisionAlgorithm.cpp */, + B6CAB0371AF9AA1900B9B856 /* btConvexConcaveCollisionAlgorithm.h */, + B6CAB0381AF9AA1900B9B856 /* btConvexConvexAlgorithm.cpp */, + B6CAB0391AF9AA1900B9B856 /* btConvexConvexAlgorithm.h */, + B6CAB03A1AF9AA1900B9B856 /* btConvexPlaneCollisionAlgorithm.cpp */, + B6CAB03B1AF9AA1900B9B856 /* btConvexPlaneCollisionAlgorithm.h */, + B6CAB03C1AF9AA1900B9B856 /* btDefaultCollisionConfiguration.cpp */, + B6CAB03D1AF9AA1900B9B856 /* btDefaultCollisionConfiguration.h */, + B6CAB03E1AF9AA1900B9B856 /* btEmptyCollisionAlgorithm.cpp */, + B6CAB03F1AF9AA1900B9B856 /* btEmptyCollisionAlgorithm.h */, + B6CAB0401AF9AA1900B9B856 /* btGhostObject.cpp */, + B6CAB0411AF9AA1900B9B856 /* btGhostObject.h */, + B6CAB0421AF9AA1900B9B856 /* btHashedSimplePairCache.cpp */, + B6CAB0431AF9AA1900B9B856 /* btHashedSimplePairCache.h */, + B6CAB0441AF9AA1900B9B856 /* btInternalEdgeUtility.cpp */, + B6CAB0451AF9AA1900B9B856 /* btInternalEdgeUtility.h */, + B6CAB0461AF9AA1900B9B856 /* btManifoldResult.cpp */, + B6CAB0471AF9AA1900B9B856 /* btManifoldResult.h */, + B6CAB0481AF9AA1900B9B856 /* btSimulationIslandManager.cpp */, + B6CAB0491AF9AA1900B9B856 /* btSimulationIslandManager.h */, + B6CAB04A1AF9AA1900B9B856 /* btSphereBoxCollisionAlgorithm.cpp */, + B6CAB04B1AF9AA1900B9B856 /* btSphereBoxCollisionAlgorithm.h */, + B6CAB04C1AF9AA1900B9B856 /* btSphereSphereCollisionAlgorithm.cpp */, + B6CAB04D1AF9AA1900B9B856 /* btSphereSphereCollisionAlgorithm.h */, + B6CAB04E1AF9AA1900B9B856 /* btSphereTriangleCollisionAlgorithm.cpp */, + B6CAB04F1AF9AA1900B9B856 /* btSphereTriangleCollisionAlgorithm.h */, + B6CAB0501AF9AA1900B9B856 /* btUnionFind.cpp */, + B6CAB0511AF9AA1900B9B856 /* btUnionFind.h */, + B6CAB0521AF9AA1900B9B856 /* SphereTriangleDetector.cpp */, + B6CAB0531AF9AA1900B9B856 /* SphereTriangleDetector.h */, + ); + path = CollisionDispatch; + sourceTree = ""; + }; + B6CAB0541AF9AA1900B9B856 /* CollisionShapes */ = { + isa = PBXGroup; + children = ( + B6CAB0551AF9AA1900B9B856 /* btBox2dShape.cpp */, + B6CAB0561AF9AA1900B9B856 /* btBox2dShape.h */, + B6CAB0571AF9AA1900B9B856 /* btBoxShape.cpp */, + B6CAB0581AF9AA1900B9B856 /* btBoxShape.h */, + B6CAB0591AF9AA1900B9B856 /* btBvhTriangleMeshShape.cpp */, + B6CAB05A1AF9AA1900B9B856 /* btBvhTriangleMeshShape.h */, + B6CAB05B1AF9AA1900B9B856 /* btCapsuleShape.cpp */, + B6CAB05C1AF9AA1900B9B856 /* btCapsuleShape.h */, + B6CAB05D1AF9AA1900B9B856 /* btCollisionMargin.h */, + B6CAB05E1AF9AA1900B9B856 /* btCollisionShape.cpp */, + B6CAB05F1AF9AA1900B9B856 /* btCollisionShape.h */, + B6CAB0601AF9AA1900B9B856 /* btCompoundShape.cpp */, + B6CAB0611AF9AA1900B9B856 /* btCompoundShape.h */, + B6CAB0621AF9AA1900B9B856 /* btConcaveShape.cpp */, + B6CAB0631AF9AA1900B9B856 /* btConcaveShape.h */, + B6CAB0641AF9AA1900B9B856 /* btConeShape.cpp */, + B6CAB0651AF9AA1900B9B856 /* btConeShape.h */, + B6CAB0661AF9AA1900B9B856 /* btConvex2dShape.cpp */, + B6CAB0671AF9AA1900B9B856 /* btConvex2dShape.h */, + B6CAB0681AF9AA1900B9B856 /* btConvexHullShape.cpp */, + B6CAB0691AF9AA1900B9B856 /* btConvexHullShape.h */, + B6CAB06A1AF9AA1900B9B856 /* btConvexInternalShape.cpp */, + B6CAB06B1AF9AA1900B9B856 /* btConvexInternalShape.h */, + B6CAB06C1AF9AA1900B9B856 /* btConvexPointCloudShape.cpp */, + B6CAB06D1AF9AA1900B9B856 /* btConvexPointCloudShape.h */, + B6CAB06E1AF9AA1900B9B856 /* btConvexPolyhedron.cpp */, + B6CAB06F1AF9AA1900B9B856 /* btConvexPolyhedron.h */, + B6CAB0701AF9AA1900B9B856 /* btConvexShape.cpp */, + B6CAB0711AF9AA1900B9B856 /* btConvexShape.h */, + B6CAB0721AF9AA1900B9B856 /* btConvexTriangleMeshShape.cpp */, + B6CAB0731AF9AA1900B9B856 /* btConvexTriangleMeshShape.h */, + B6CAB0741AF9AA1900B9B856 /* btCylinderShape.cpp */, + B6CAB0751AF9AA1900B9B856 /* btCylinderShape.h */, + B6CAB0761AF9AA1900B9B856 /* btEmptyShape.cpp */, + B6CAB0771AF9AA1900B9B856 /* btEmptyShape.h */, + B6CAB0781AF9AA1900B9B856 /* btHeightfieldTerrainShape.cpp */, + B6CAB0791AF9AA1900B9B856 /* btHeightfieldTerrainShape.h */, + B6CAB07A1AF9AA1900B9B856 /* btMaterial.h */, + B6CAB07B1AF9AA1900B9B856 /* btMinkowskiSumShape.cpp */, + B6CAB07C1AF9AA1900B9B856 /* btMinkowskiSumShape.h */, + B6CAB07D1AF9AA1900B9B856 /* btMultimaterialTriangleMeshShape.cpp */, + B6CAB07E1AF9AA1900B9B856 /* btMultimaterialTriangleMeshShape.h */, + B6CAB07F1AF9AA1900B9B856 /* btMultiSphereShape.cpp */, + B6CAB0801AF9AA1900B9B856 /* btMultiSphereShape.h */, + B6CAB0811AF9AA1900B9B856 /* btOptimizedBvh.cpp */, + B6CAB0821AF9AA1900B9B856 /* btOptimizedBvh.h */, + B6CAB0831AF9AA1900B9B856 /* btPolyhedralConvexShape.cpp */, + B6CAB0841AF9AA1900B9B856 /* btPolyhedralConvexShape.h */, + B6CAB0851AF9AA1900B9B856 /* btScaledBvhTriangleMeshShape.cpp */, + B6CAB0861AF9AA1900B9B856 /* btScaledBvhTriangleMeshShape.h */, + B6CAB0871AF9AA1900B9B856 /* btShapeHull.cpp */, + B6CAB0881AF9AA1900B9B856 /* btShapeHull.h */, + B6CAB0891AF9AA1900B9B856 /* btSphereShape.cpp */, + B6CAB08A1AF9AA1900B9B856 /* btSphereShape.h */, + B6CAB08B1AF9AA1900B9B856 /* btStaticPlaneShape.cpp */, + B6CAB08C1AF9AA1900B9B856 /* btStaticPlaneShape.h */, + B6CAB08D1AF9AA1900B9B856 /* btStridingMeshInterface.cpp */, + B6CAB08E1AF9AA1900B9B856 /* btStridingMeshInterface.h */, + B6CAB08F1AF9AA1900B9B856 /* btTetrahedronShape.cpp */, + B6CAB0901AF9AA1900B9B856 /* btTetrahedronShape.h */, + B6CAB0911AF9AA1900B9B856 /* btTriangleBuffer.cpp */, + B6CAB0921AF9AA1900B9B856 /* btTriangleBuffer.h */, + B6CAB0931AF9AA1900B9B856 /* btTriangleCallback.cpp */, + B6CAB0941AF9AA1900B9B856 /* btTriangleCallback.h */, + B6CAB0951AF9AA1900B9B856 /* btTriangleIndexVertexArray.cpp */, + B6CAB0961AF9AA1900B9B856 /* btTriangleIndexVertexArray.h */, + B6CAB0971AF9AA1900B9B856 /* btTriangleIndexVertexMaterialArray.cpp */, + B6CAB0981AF9AA1900B9B856 /* btTriangleIndexVertexMaterialArray.h */, + B6CAB0991AF9AA1900B9B856 /* btTriangleInfoMap.h */, + B6CAB09A1AF9AA1900B9B856 /* btTriangleMesh.cpp */, + B6CAB09B1AF9AA1900B9B856 /* btTriangleMesh.h */, + B6CAB09C1AF9AA1900B9B856 /* btTriangleMeshShape.cpp */, + B6CAB09D1AF9AA1900B9B856 /* btTriangleMeshShape.h */, + B6CAB09E1AF9AA1900B9B856 /* btTriangleShape.h */, + B6CAB09F1AF9AA1900B9B856 /* btUniformScalingShape.cpp */, + B6CAB0A01AF9AA1900B9B856 /* btUniformScalingShape.h */, + ); + path = CollisionShapes; + sourceTree = ""; + }; + B6CAB0A11AF9AA1900B9B856 /* Gimpact */ = { + isa = PBXGroup; + children = ( + B6CAB0A21AF9AA1900B9B856 /* btBoxCollision.h */, + B6CAB0A31AF9AA1900B9B856 /* btClipPolygon.h */, + B6CAB0A41AF9AA1900B9B856 /* btCompoundFromGimpact.h */, + B6CAB0A51AF9AA1900B9B856 /* btContactProcessing.cpp */, + B6CAB0A61AF9AA1900B9B856 /* btContactProcessing.h */, + B6CAB0A71AF9AA1900B9B856 /* btGenericPoolAllocator.cpp */, + B6CAB0A81AF9AA1900B9B856 /* btGenericPoolAllocator.h */, + B6CAB0A91AF9AA1900B9B856 /* btGeometryOperations.h */, + B6CAB0AA1AF9AA1900B9B856 /* btGImpactBvh.cpp */, + B6CAB0AB1AF9AA1900B9B856 /* btGImpactBvh.h */, + B6CAB0AC1AF9AA1900B9B856 /* btGImpactCollisionAlgorithm.cpp */, + B6CAB0AD1AF9AA1900B9B856 /* btGImpactCollisionAlgorithm.h */, + B6CAB0AE1AF9AA1900B9B856 /* btGImpactMassUtil.h */, + B6CAB0AF1AF9AA1900B9B856 /* btGImpactQuantizedBvh.cpp */, + B6CAB0B01AF9AA1900B9B856 /* btGImpactQuantizedBvh.h */, + B6CAB0B11AF9AA1900B9B856 /* btGImpactShape.cpp */, + B6CAB0B21AF9AA1900B9B856 /* btGImpactShape.h */, + B6CAB0B31AF9AA1900B9B856 /* btQuantization.h */, + B6CAB0B41AF9AA1900B9B856 /* btTriangleShapeEx.cpp */, + B6CAB0B51AF9AA1900B9B856 /* btTriangleShapeEx.h */, + B6CAB0B61AF9AA1900B9B856 /* gim_array.h */, + B6CAB0B71AF9AA1900B9B856 /* gim_basic_geometry_operations.h */, + B6CAB0B81AF9AA1900B9B856 /* gim_bitset.h */, + B6CAB0B91AF9AA1900B9B856 /* gim_box_collision.h */, + B6CAB0BA1AF9AA1900B9B856 /* gim_box_set.cpp */, + B6CAB0BB1AF9AA1900B9B856 /* gim_box_set.h */, + B6CAB0BC1AF9AA1900B9B856 /* gim_clip_polygon.h */, + B6CAB0BD1AF9AA1900B9B856 /* gim_contact.cpp */, + B6CAB0BE1AF9AA1900B9B856 /* gim_contact.h */, + B6CAB0BF1AF9AA1900B9B856 /* gim_geom_types.h */, + B6CAB0C01AF9AA1900B9B856 /* gim_geometry.h */, + B6CAB0C11AF9AA1900B9B856 /* gim_hash_table.h */, + B6CAB0C21AF9AA1900B9B856 /* gim_linear_math.h */, + B6CAB0C31AF9AA1900B9B856 /* gim_math.h */, + B6CAB0C41AF9AA1900B9B856 /* gim_memory.cpp */, + B6CAB0C51AF9AA1900B9B856 /* gim_memory.h */, + B6CAB0C61AF9AA1900B9B856 /* gim_radixsort.h */, + B6CAB0C71AF9AA1900B9B856 /* gim_tri_collision.cpp */, + B6CAB0C81AF9AA1900B9B856 /* gim_tri_collision.h */, + ); + path = Gimpact; + sourceTree = ""; + }; + B6CAB0C91AF9AA1900B9B856 /* NarrowPhaseCollision */ = { + isa = PBXGroup; + children = ( + B6CAB0CA1AF9AA1900B9B856 /* btContinuousConvexCollision.cpp */, + B6CAB0CB1AF9AA1900B9B856 /* btContinuousConvexCollision.h */, + B6CAB0CC1AF9AA1900B9B856 /* btConvexCast.cpp */, + B6CAB0CD1AF9AA1900B9B856 /* btConvexCast.h */, + B6CAB0CE1AF9AA1900B9B856 /* btConvexPenetrationDepthSolver.h */, + B6CAB0CF1AF9AA1900B9B856 /* btDiscreteCollisionDetectorInterface.h */, + B6CAB0D01AF9AA1900B9B856 /* btGjkConvexCast.cpp */, + B6CAB0D11AF9AA1900B9B856 /* btGjkConvexCast.h */, + B6CAB0D21AF9AA1900B9B856 /* btGjkEpa2.cpp */, + B6CAB0D31AF9AA1900B9B856 /* btGjkEpa2.h */, + B6CAB0D41AF9AA1900B9B856 /* btGjkEpaPenetrationDepthSolver.cpp */, + B6CAB0D51AF9AA1900B9B856 /* btGjkEpaPenetrationDepthSolver.h */, + B6CAB0D61AF9AA1900B9B856 /* btGjkPairDetector.cpp */, + B6CAB0D71AF9AA1900B9B856 /* btGjkPairDetector.h */, + B6CAB0D81AF9AA1900B9B856 /* btManifoldPoint.h */, + B6CAB0D91AF9AA1900B9B856 /* btMinkowskiPenetrationDepthSolver.cpp */, + B6CAB0DA1AF9AA1900B9B856 /* btMinkowskiPenetrationDepthSolver.h */, + B6CAB0DB1AF9AA1900B9B856 /* btPersistentManifold.cpp */, + B6CAB0DC1AF9AA1900B9B856 /* btPersistentManifold.h */, + B6CAB0DD1AF9AA1900B9B856 /* btPointCollector.h */, + B6CAB0DE1AF9AA1900B9B856 /* btPolyhedralContactClipping.cpp */, + B6CAB0DF1AF9AA1900B9B856 /* btPolyhedralContactClipping.h */, + B6CAB0E01AF9AA1900B9B856 /* btRaycastCallback.cpp */, + B6CAB0E11AF9AA1900B9B856 /* btRaycastCallback.h */, + B6CAB0E21AF9AA1900B9B856 /* btSimplexSolverInterface.h */, + B6CAB0E31AF9AA1900B9B856 /* btSubSimplexConvexCast.cpp */, + B6CAB0E41AF9AA1900B9B856 /* btSubSimplexConvexCast.h */, + B6CAB0E51AF9AA1900B9B856 /* btVoronoiSimplexSolver.cpp */, + B6CAB0E61AF9AA1900B9B856 /* btVoronoiSimplexSolver.h */, + ); + path = NarrowPhaseCollision; + sourceTree = ""; + }; + B6CAB0E71AF9AA1900B9B856 /* BulletDynamics */ = { + isa = PBXGroup; + children = ( + B6CAB0E81AF9AA1900B9B856 /* Character */, + B6CAB0EC1AF9AA1900B9B856 /* ConstraintSolver */, + B6CAB10E1AF9AA1900B9B856 /* Dynamics */, + B6CAB1181AF9AA1900B9B856 /* Featherstone */, + B6CAB12A1AF9AA1900B9B856 /* MLCPSolvers */, + B6CAB1331AF9AA1900B9B856 /* Vehicle */, + ); + name = BulletDynamics; + path = ../external/bullet/BulletDynamics; + sourceTree = ""; + }; + B6CAB0E81AF9AA1900B9B856 /* Character */ = { + isa = PBXGroup; + children = ( + B6CAB0E91AF9AA1900B9B856 /* btCharacterControllerInterface.h */, + B6CAB0EA1AF9AA1900B9B856 /* btKinematicCharacterController.cpp */, + B6CAB0EB1AF9AA1900B9B856 /* btKinematicCharacterController.h */, + ); + path = Character; + sourceTree = ""; + }; + B6CAB0EC1AF9AA1900B9B856 /* ConstraintSolver */ = { + isa = PBXGroup; + children = ( + B6CAB0ED1AF9AA1900B9B856 /* btConeTwistConstraint.cpp */, + B6CAB0EE1AF9AA1900B9B856 /* btConeTwistConstraint.h */, + B6CAB0EF1AF9AA1900B9B856 /* btConstraintSolver.h */, + B6CAB0F01AF9AA1900B9B856 /* btContactConstraint.cpp */, + B6CAB0F11AF9AA1900B9B856 /* btContactConstraint.h */, + B6CAB0F21AF9AA1900B9B856 /* btContactSolverInfo.h */, + B6CAB0F31AF9AA1900B9B856 /* btFixedConstraint.cpp */, + B6CAB0F41AF9AA1900B9B856 /* btFixedConstraint.h */, + B6CAB0F51AF9AA1900B9B856 /* btGearConstraint.cpp */, + B6CAB0F61AF9AA1900B9B856 /* btGearConstraint.h */, + B6CAB0F71AF9AA1900B9B856 /* btGeneric6DofConstraint.cpp */, + B6CAB0F81AF9AA1900B9B856 /* btGeneric6DofConstraint.h */, + B6CAB0F91AF9AA1900B9B856 /* btGeneric6DofSpringConstraint.cpp */, + B6CAB0FA1AF9AA1900B9B856 /* btGeneric6DofSpringConstraint.h */, + B6CAB0FB1AF9AA1900B9B856 /* btHinge2Constraint.cpp */, + B6CAB0FC1AF9AA1900B9B856 /* btHinge2Constraint.h */, + B6CAB0FD1AF9AA1900B9B856 /* btHingeConstraint.cpp */, + B6CAB0FE1AF9AA1900B9B856 /* btHingeConstraint.h */, + B6CAB0FF1AF9AA1900B9B856 /* btJacobianEntry.h */, + B6CAB1001AF9AA1900B9B856 /* btPoint2PointConstraint.cpp */, + B6CAB1011AF9AA1900B9B856 /* btPoint2PointConstraint.h */, + B6CAB1021AF9AA1900B9B856 /* btSequentialImpulseConstraintSolver.cpp */, + B6CAB1031AF9AA1900B9B856 /* btSequentialImpulseConstraintSolver.h */, + B6CAB1041AF9AA1900B9B856 /* btSliderConstraint.cpp */, + B6CAB1051AF9AA1900B9B856 /* btSliderConstraint.h */, + B6CAB1061AF9AA1900B9B856 /* btSolve2LinearConstraint.cpp */, + B6CAB1071AF9AA1900B9B856 /* btSolve2LinearConstraint.h */, + B6CAB1081AF9AA1900B9B856 /* btSolverBody.h */, + B6CAB1091AF9AA1900B9B856 /* btSolverConstraint.h */, + B6CAB10A1AF9AA1900B9B856 /* btTypedConstraint.cpp */, + B6CAB10B1AF9AA1900B9B856 /* btTypedConstraint.h */, + B6CAB10C1AF9AA1900B9B856 /* btUniversalConstraint.cpp */, + B6CAB10D1AF9AA1900B9B856 /* btUniversalConstraint.h */, + ); + path = ConstraintSolver; + sourceTree = ""; + }; + B6CAB10E1AF9AA1900B9B856 /* Dynamics */ = { + isa = PBXGroup; + children = ( + B6CAB10F1AF9AA1900B9B856 /* btActionInterface.h */, + B6CAB1101AF9AA1900B9B856 /* btDiscreteDynamicsWorld.cpp */, + B6CAB1111AF9AA1900B9B856 /* btDiscreteDynamicsWorld.h */, + B6CAB1121AF9AA1900B9B856 /* btDynamicsWorld.h */, + B6CAB1131AF9AA1900B9B856 /* btRigidBody.cpp */, + B6CAB1141AF9AA1900B9B856 /* btRigidBody.h */, + B6CAB1151AF9AA1900B9B856 /* btSimpleDynamicsWorld.cpp */, + B6CAB1161AF9AA1900B9B856 /* btSimpleDynamicsWorld.h */, + B6CAB1171AF9AA1900B9B856 /* Bullet-C-API.cpp */, + ); + path = Dynamics; + sourceTree = ""; + }; + B6CAB1181AF9AA1900B9B856 /* Featherstone */ = { + isa = PBXGroup; + children = ( + B6CAB1191AF9AA1900B9B856 /* btMultiBody.cpp */, + B6CAB11A1AF9AA1900B9B856 /* btMultiBody.h */, + B6CAB11B1AF9AA1900B9B856 /* btMultiBodyConstraint.cpp */, + B6CAB11C1AF9AA1900B9B856 /* btMultiBodyConstraint.h */, + B6CAB11D1AF9AA1900B9B856 /* btMultiBodyConstraintSolver.cpp */, + B6CAB11E1AF9AA1900B9B856 /* btMultiBodyConstraintSolver.h */, + B6CAB11F1AF9AA1900B9B856 /* btMultiBodyDynamicsWorld.cpp */, + B6CAB1201AF9AA1900B9B856 /* btMultiBodyDynamicsWorld.h */, + B6CAB1211AF9AA1900B9B856 /* btMultiBodyJointLimitConstraint.cpp */, + B6CAB1221AF9AA1900B9B856 /* btMultiBodyJointLimitConstraint.h */, + B6CAB1231AF9AA1900B9B856 /* btMultiBodyJointMotor.cpp */, + B6CAB1241AF9AA1900B9B856 /* btMultiBodyJointMotor.h */, + B6CAB1251AF9AA1900B9B856 /* btMultiBodyLink.h */, + B6CAB1261AF9AA1900B9B856 /* btMultiBodyLinkCollider.h */, + B6CAB1271AF9AA1900B9B856 /* btMultiBodyPoint2Point.cpp */, + B6CAB1281AF9AA1900B9B856 /* btMultiBodyPoint2Point.h */, + B6CAB1291AF9AA1900B9B856 /* btMultiBodySolverConstraint.h */, + ); + path = Featherstone; + sourceTree = ""; + }; + B6CAB12A1AF9AA1900B9B856 /* MLCPSolvers */ = { + isa = PBXGroup; + children = ( + B6CAB12B1AF9AA1900B9B856 /* btDantzigLCP.cpp */, + B6CAB12C1AF9AA1900B9B856 /* btDantzigLCP.h */, + B6CAB12D1AF9AA1900B9B856 /* btDantzigSolver.h */, + B6CAB12E1AF9AA1900B9B856 /* btMLCPSolver.cpp */, + B6CAB12F1AF9AA1900B9B856 /* btMLCPSolver.h */, + B6CAB1301AF9AA1900B9B856 /* btMLCPSolverInterface.h */, + B6CAB1311AF9AA1900B9B856 /* btPATHSolver.h */, + B6CAB1321AF9AA1900B9B856 /* btSolveProjectedGaussSeidel.h */, + ); + path = MLCPSolvers; + sourceTree = ""; + }; + B6CAB1331AF9AA1900B9B856 /* Vehicle */ = { + isa = PBXGroup; + children = ( + B6CAB1341AF9AA1900B9B856 /* btRaycastVehicle.cpp */, + B6CAB1351AF9AA1900B9B856 /* btRaycastVehicle.h */, + B6CAB1361AF9AA1900B9B856 /* btVehicleRaycaster.h */, + B6CAB1371AF9AA1900B9B856 /* btWheelInfo.cpp */, + B6CAB1381AF9AA1900B9B856 /* btWheelInfo.h */, + ); + path = Vehicle; + sourceTree = ""; + }; + B6CAB1391AF9AA1900B9B856 /* BulletMultiThreaded */ = { + isa = PBXGroup; + children = ( + B6CAB13A1AF9AA1900B9B856 /* btGpu3DGridBroadphase.cpp */, + B6CAB13B1AF9AA1900B9B856 /* btGpu3DGridBroadphase.h */, + B6CAB13C1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedCode.h */, + B6CAB13D1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedDefs.h */, + B6CAB13E1AF9AA1900B9B856 /* btGpu3DGridBroadphaseSharedTypes.h */, + B6CAB13F1AF9AA1900B9B856 /* btGpuDefines.h */, + B6CAB1401AF9AA1900B9B856 /* btGpuUtilsSharedCode.h */, + B6CAB1411AF9AA1900B9B856 /* btGpuUtilsSharedDefs.h */, + B6CAB1421AF9AA1900B9B856 /* btParallelConstraintSolver.cpp */, + B6CAB1431AF9AA1900B9B856 /* btParallelConstraintSolver.h */, + B6CAB1441AF9AA1900B9B856 /* btThreadSupportInterface.cpp */, + B6CAB1451AF9AA1900B9B856 /* btThreadSupportInterface.h */, + B6CAB1841AF9AA1A00B9B856 /* HeapManager.h */, + B6CAB1851AF9AA1A00B9B856 /* PlatformDefinitions.h */, + B6CAB1861AF9AA1A00B9B856 /* PosixThreadSupport.cpp */, + B6CAB1871AF9AA1A00B9B856 /* PosixThreadSupport.h */, + B6CAB1881AF9AA1A00B9B856 /* PpuAddressSpace.h */, + B6CAB1891AF9AA1A00B9B856 /* SequentialThreadSupport.cpp */, + B6CAB18A1AF9AA1A00B9B856 /* SequentialThreadSupport.h */, + B6CAB18B1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.cpp */, + B6CAB18C1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.h */, + B6CAB18D1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp */, + B6CAB18E1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.h */, + B6CAB18F1AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp */, + B6CAB1901AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.h */, + B6CAB1911AF9AA1A00B9B856 /* SpuDoubleBuffer.h */, + B6CAB1921AF9AA1A00B9B856 /* SpuFakeDma.cpp */, + B6CAB1931AF9AA1A00B9B856 /* SpuFakeDma.h */, + B6CAB1941AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.cpp */, + B6CAB1951AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.h */, + B6CAB1961AF9AA1A00B9B856 /* SpuLibspe2Support.cpp */, + B6CAB1971AF9AA1A00B9B856 /* SpuLibspe2Support.h */, + B6CAB1981AF9AA1A00B9B856 /* SpuNarrowPhaseCollisionTask */, + B6CAB1A71AF9AA1A00B9B856 /* SpuSampleTask */, + B6CAB1AA1AF9AA1A00B9B856 /* SpuSampleTaskProcess.cpp */, + B6CAB1AB1AF9AA1A00B9B856 /* SpuSampleTaskProcess.h */, + B6CAB1AC1AF9AA1A00B9B856 /* SpuSync.h */, + B6CAB1AD1AF9AA1A00B9B856 /* TrbDynBody.h */, + B6CAB1AE1AF9AA1A00B9B856 /* TrbStateVec.h */, + B6CAB1AF1AF9AA1A00B9B856 /* vectormath2bullet.h */, + B6CAB1B01AF9AA1A00B9B856 /* Win32ThreadSupport.cpp */, + B6CAB1B11AF9AA1A00B9B856 /* Win32ThreadSupport.h */, + ); + name = BulletMultiThreaded; + path = ../external/bullet/BulletMultiThreaded; + sourceTree = ""; + }; + B6CAB1981AF9AA1A00B9B856 /* SpuNarrowPhaseCollisionTask */ = { + isa = PBXGroup; + children = ( + B6CAB1991AF9AA1A00B9B856 /* Box.h */, + B6CAB19A1AF9AA1A00B9B856 /* boxBoxDistance.cpp */, + B6CAB19B1AF9AA1A00B9B856 /* boxBoxDistance.h */, + B6CAB19C1AF9AA1A00B9B856 /* SpuCollisionShapes.cpp */, + B6CAB19D1AF9AA1A00B9B856 /* SpuCollisionShapes.h */, + B6CAB19E1AF9AA1A00B9B856 /* SpuContactResult.cpp */, + B6CAB19F1AF9AA1A00B9B856 /* SpuContactResult.h */, + B6CAB1A01AF9AA1A00B9B856 /* SpuConvexPenetrationDepthSolver.h */, + B6CAB1A11AF9AA1A00B9B856 /* SpuGatheringCollisionTask.cpp */, + B6CAB1A21AF9AA1A00B9B856 /* SpuGatheringCollisionTask.h */, + B6CAB1A31AF9AA1A00B9B856 /* SpuLocalSupport.h */, + B6CAB1A41AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.cpp */, + B6CAB1A51AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.h */, + B6CAB1A61AF9AA1A00B9B856 /* SpuPreferredPenetrationDirections.h */, + ); + path = SpuNarrowPhaseCollisionTask; + sourceTree = ""; + }; + B6CAB1A71AF9AA1A00B9B856 /* SpuSampleTask */ = { + isa = PBXGroup; + children = ( + B6CAB1A81AF9AA1A00B9B856 /* SpuSampleTask.cpp */, + B6CAB1A91AF9AA1A00B9B856 /* SpuSampleTask.h */, + ); + path = SpuSampleTask; + sourceTree = ""; + }; + B6CAB1B21AF9AA1A00B9B856 /* LinearMath */ = { + isa = PBXGroup; + children = ( + B6CAB1B31AF9AA1A00B9B856 /* btAabbUtil2.h */, + B6CAB1B41AF9AA1A00B9B856 /* btAlignedAllocator.cpp */, + B6CAB1B51AF9AA1A00B9B856 /* btAlignedAllocator.h */, + B6CAB1B61AF9AA1A00B9B856 /* btAlignedObjectArray.h */, + B6CAB1B71AF9AA1A00B9B856 /* btConvexHull.cpp */, + B6CAB1B81AF9AA1A00B9B856 /* btConvexHull.h */, + B6CAB1B91AF9AA1A00B9B856 /* btConvexHullComputer.cpp */, + B6CAB1BA1AF9AA1A00B9B856 /* btConvexHullComputer.h */, + B6CAB1BB1AF9AA1A00B9B856 /* btDefaultMotionState.h */, + B6CAB1BC1AF9AA1A00B9B856 /* btGeometryUtil.cpp */, + B6CAB1BD1AF9AA1A00B9B856 /* btGeometryUtil.h */, + B6CAB1BE1AF9AA1A00B9B856 /* btGrahamScan2dConvexHull.h */, + B6CAB1BF1AF9AA1A00B9B856 /* btHashMap.h */, + B6CAB1C01AF9AA1A00B9B856 /* btIDebugDraw.h */, + B6CAB1C11AF9AA1A00B9B856 /* btList.h */, + B6CAB1C21AF9AA1A00B9B856 /* btMatrix3x3.h */, + B6CAB1C31AF9AA1A00B9B856 /* btMatrixX.h */, + B6CAB1C41AF9AA1A00B9B856 /* btMinMax.h */, + B6CAB1C51AF9AA1A00B9B856 /* btMotionState.h */, + B6CAB1C61AF9AA1A00B9B856 /* btPolarDecomposition.cpp */, + B6CAB1C71AF9AA1A00B9B856 /* btPolarDecomposition.h */, + B6CAB1C81AF9AA1A00B9B856 /* btPoolAllocator.h */, + B6CAB1C91AF9AA1A00B9B856 /* btQuadWord.h */, + B6CAB1CA1AF9AA1A00B9B856 /* btQuaternion.h */, + B6CAB1CB1AF9AA1A00B9B856 /* btQuickprof.cpp */, + B6CAB1CC1AF9AA1A00B9B856 /* btQuickprof.h */, + B6CAB1CD1AF9AA1A00B9B856 /* btRandom.h */, + B6CAB1CE1AF9AA1A00B9B856 /* btScalar.h */, + B6CAB1CF1AF9AA1A00B9B856 /* btSerializer.cpp */, + B6CAB1D01AF9AA1A00B9B856 /* btSerializer.h */, + B6CAB1D11AF9AA1A00B9B856 /* btStackAlloc.h */, + B6CAB1D21AF9AA1A00B9B856 /* btTransform.h */, + B6CAB1D31AF9AA1A00B9B856 /* btTransformUtil.h */, + B6CAB1D41AF9AA1A00B9B856 /* btVector3.cpp */, + B6CAB1D51AF9AA1A00B9B856 /* btVector3.h */, + ); + name = LinearMath; + path = ../external/bullet/LinearMath; + sourceTree = ""; + }; + B6CAB1D61AF9AA1A00B9B856 /* MiniCL */ = { + isa = PBXGroup; + children = ( + B6CAB1D71AF9AA1A00B9B856 /* cl.h */, + B6CAB1D81AF9AA1A00B9B856 /* cl_gl.h */, + B6CAB1D91AF9AA1A00B9B856 /* cl_MiniCL_Defs.h */, + B6CAB1DA1AF9AA1A00B9B856 /* cl_platform.h */, + B6CAB1DB1AF9AA1A00B9B856 /* MiniCL.cpp */, + B6CAB1DC1AF9AA1A00B9B856 /* MiniCLTask */, + B6CAB1DF1AF9AA1A00B9B856 /* MiniCLTaskScheduler.cpp */, + B6CAB1E01AF9AA1A00B9B856 /* MiniCLTaskScheduler.h */, + ); + name = MiniCL; + path = ../external/bullet/MiniCL; + sourceTree = ""; + }; + B6CAB1DC1AF9AA1A00B9B856 /* MiniCLTask */ = { + isa = PBXGroup; + children = ( + B6CAB1DD1AF9AA1A00B9B856 /* MiniCLTask.cpp */, + B6CAB1DE1AF9AA1A00B9B856 /* MiniCLTask.h */, + ); + path = MiniCLTask; + sourceTree = ""; + }; D0FD03391A3B51AA00825BB5 /* allocator */ = { isa = PBXGroup; children = ( @@ -6688,17 +8529,26 @@ 50ABBE9B1925AB6F00A911A9 /* CCRef.h in Headers */, 50ABBE851925AB6F00A911A9 /* ccFPSImages.h in Headers */, B665E2701AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h in Headers */, + B6CAB4251AF9AA1A00B9B856 /* btPATHSolver.h in Headers */, 15AE1A5319AAD40300C27E9E /* b2Draw.h in Headers */, B665E25C1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h in Headers */, + B6CAB33B1AF9AA1A00B9B856 /* btTriangleShapeEx.h in Headers */, + B6CAB4C71AF9AA1A00B9B856 /* boxBoxDistance.h in Headers */, 38B8E2E319E671D2002D7CE7 /* UILayoutComponent.h in Headers */, B6D38B8C1AC3AFAC00043997 /* CCSkybox.h in Headers */, 5034CA39191D591100CE6051 /* ccShader_PositionColorLengthTexture.frag in Headers */, 292DB14B19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */, + B6CAB39D1AF9AA1A00B9B856 /* btCharacterControllerInterface.h in Headers */, B29A7E3F19EE1B7700872B35 /* AnimationState.h in Headers */, + B6CAB50F1AF9AA1A00B9B856 /* btList.h in Headers */, D0FD03591A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h in Headers */, B665E2901AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h in Headers */, + B6CAB3531AF9AA1A00B9B856 /* gim_hash_table.h in Headers */, 50ABBE891925AB6F00A911A9 /* CCMap.h in Headers */, + B6CAB3131AF9AA1A00B9B856 /* btUniformScalingShape.h in Headers */, 50ABBE8D1925AB6F00A911A9 /* CCNS.h in Headers */, + B6CAB1E91AF9AA1A00B9B856 /* btAxisSweep3.h in Headers */, + B6CAB2331AF9AA1A00B9B856 /* btCollisionWorld.h in Headers */, B29A7DFD19EE1B7700872B35 /* IkConstraintData.h in Headers */, 50ABBEA51925AB6F00A911A9 /* CCScriptSupport.h in Headers */, 292DB14519B4574100A80320 /* UIEditBoxImpl-android.h in Headers */, @@ -6706,30 +8556,40 @@ B665E2E41AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h in Headers */, B665E2781AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h in Headers */, 15AE18EB19AAD35000C27E9E /* CCActionNode.h in Headers */, + B6CAB2151AF9AA1A00B9B856 /* btActivatingCollisionAlgorithm.h in Headers */, B665E2501AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h in Headers */, B665E3901AA80A6500DDB1C5 /* CCPUPlaneCollider.h in Headers */, + B6CAB4A71AF9AA1A00B9B856 /* SequentialThreadSupport.h in Headers */, + B6CAB31D1AF9AA1A00B9B856 /* btContactProcessing.h in Headers */, 15AE1A3819AAD3D500C27E9E /* b2Shape.h in Headers */, 15AE18FC19AAD35000C27E9E /* CCComBase.h in Headers */, 1ABA68B01888D700007D1BB4 /* CCFontCharMap.h in Headers */, 15AE1B5219AADA9900C27E9E /* UIPageView.h in Headers */, + B6CAB3911AF9AA1A00B9B856 /* btRaycastCallback.h in Headers */, 5091A7A319BFABA800AC8789 /* CCPlatformDefine.h in Headers */, + B6CAB4F71AF9AA1A00B9B856 /* btAlignedAllocator.h in Headers */, 5034CA3F191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, B665E4381AA80A6600DDB1C5 /* CCPUVortexAffector.h in Headers */, B29A7DD319EE1B7700872B35 /* Skin.h in Headers */, 50ABBD461925AB0000A911A9 /* CCVertex.h in Headers */, B63990CE1A490AFE00B07923 /* CCAsyncTaskPool.h in Headers */, + B6CAAFF81AF9A9E100B9B856 /* CCPhysics3DShape.h in Headers */, B665E2201AA80A6500DDB1C5 /* CCPUBehaviourManager.h in Headers */, 15AE180A19AAD2F700C27E9E /* CCAABB.h in Headers */, B665E28C1AA80A6500DDB1C5 /* CCPUDynamicAttribute.h in Headers */, B665E3941AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.h in Headers */, 46A170E71807CECA005B8026 /* CCPhysicsBody.h in Headers */, B665E22C1AA80A6500DDB1C5 /* CCPUBoxCollider.h in Headers */, + B6CAB4011AF9AA1A00B9B856 /* btMultiBodyConstraintSolver.h in Headers */, + B6CAB2FB1AF9AA1A00B9B856 /* btTriangleCallback.h in Headers */, 15AE1A5A19AAD40300C27E9E /* b2StackAllocator.h in Headers */, B665E4101AA80A6600DDB1C5 /* CCPUTechniqueTranslator.h in Headers */, + B6CAB3691AF9AA1A00B9B856 /* btConvexCast.h in Headers */, 38F526401A48363B000DB7F7 /* ArmatureNodeReader.h in Headers */, B665E2E81AA80A6500DDB1C5 /* CCPULinearForceAffector.h in Headers */, B29A7E3119EE1B7700872B35 /* SkinnedMeshAttachment.h in Headers */, 15AE1B6F19AADA9900C27E9E /* GUIDefine.h in Headers */, + B6CAB25F1AF9AA1A00B9B856 /* btInternalEdgeUtility.h in Headers */, 15AE1A8119AAD40300C27E9E /* b2FrictionJoint.h in Headers */, 15AE18DD19AAD35000C27E9E /* CocoLoader.h in Headers */, 46A170EB1807CECA005B8026 /* CCPhysicsJoint.h in Headers */, @@ -6738,6 +8598,7 @@ 15AE184619AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, B68779061A8CA82E00643ABF /* CCParticleSystem3D.h in Headers */, 50ABBD3E1925AB0000A911A9 /* CCGeometry.h in Headers */, + B6CAB34F1AF9AA1A00B9B856 /* gim_geom_types.h in Headers */, 15AE1A7719AAD40300C27E9E /* b2EdgeAndPolygonContact.h in Headers */, 15AE18F719AAD35000C27E9E /* CCBatchNode.h in Headers */, 15AE181419AAD2F700C27E9E /* CCAnimationCurve.h in Headers */, @@ -6746,14 +8607,17 @@ B665E2601AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h in Headers */, 15AE1C1419AAE2C600C27E9E /* CCPhysicsSprite.h in Headers */, 46A170EE1807CECA005B8026 /* CCPhysicsShape.h in Headers */, + B6CAB3D91AF9AA1A00B9B856 /* btSolverBody.h in Headers */, 15AE1A5C19AAD40300C27E9E /* b2Timer.h in Headers */, B665E1FC1AA80A6500DDB1C5 /* CCPUAffectorTranslator.h in Headers */, 50ABBED31925AB6F00A911A9 /* uthash.h in Headers */, + B6CAB4B51AF9AA1A00B9B856 /* SpuDoubleBuffer.h in Headers */, 46A170E91807CECA005B8026 /* CCPhysicsContact.h in Headers */, 15AE1A2219AAD3D500C27E9E /* Box2D.h in Headers */, 15AE191419AAD35000C27E9E /* CCSGUIReader.h in Headers */, B29A7E0119EE1B7700872B35 /* extension.h in Headers */, 15AE196D19AAD35700C27E9E /* CCActionTimeline.h in Headers */, + B6CAB2BD1AF9AA1A00B9B856 /* btCylinderShape.h in Headers */, 15AE1A6D19AAD40300C27E9E /* b2ChainAndPolygonContact.h in Headers */, 3E2F27A719CFBFE400E7C490 /* AudioEngine.h in Headers */, 15AE183A19AAD2F700C27E9E /* CCRay.h in Headers */, @@ -6762,6 +8626,7 @@ B665E2C41AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h in Headers */, 46A170F01807CECA005B8026 /* CCPhysicsWorld.h in Headers */, 15AE199D19AAD39600C27E9E /* ScrollViewReader.h in Headers */, + B6CAB3471AF9AA1A00B9B856 /* gim_box_set.h in Headers */, DABC9FAB19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */, B68778FE1A8CA82E00643ABF /* CCParticle3DEmitter.h in Headers */, 50ABBEC11925AB6F00A911A9 /* CCValue.h in Headers */, @@ -6772,19 +8637,25 @@ 15B3708A19EE414C00ABE682 /* Manifest.h in Headers */, 50ABBE731925AB6F00A911A9 /* CCEventListenerMouse.h in Headers */, 1A570063180BC5A10088DEC7 /* CCAction.h in Headers */, + B6CAB40F1AF9AA1A00B9B856 /* btMultiBodyLink.h in Headers */, 1A570067180BC5A10088DEC7 /* CCActionCamera.h in Headers */, 15AE1AD919AAD41000C27E9E /* b2Rope.h in Headers */, 15AE187B19AAD33D00C27E9E /* CCBAnimationManager.h in Headers */, B665E2841AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h in Headers */, + B6CAB52D1AF9AA1A00B9B856 /* btSerializer.h in Headers */, B665E3E01AA80A6600DDB1C5 /* CCPUSimpleSpline.h in Headers */, B665E42C1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.h in Headers */, B665E3B41AA80A6500DDB1C5 /* CCPURendererTranslator.h in Headers */, + B6CAAFF01AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h in Headers */, 1A57006B180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */, B665E3BC1AA80A6500DDB1C5 /* CCPURibbonTrailRender.h in Headers */, + B6CAB3371AF9AA1A00B9B856 /* btQuantization.h in Headers */, + B6CAB4371AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedCode.h in Headers */, B665E2A81AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h in Headers */, 4D76BE3C1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */, B665E27C1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h in Headers */, 1A57006F180BC5A10088DEC7 /* CCActionEase.h in Headers */, + B6CAB2CB1AF9AA1A00B9B856 /* btMinkowskiSumShape.h in Headers */, B665E29C1AA80A6500DDB1C5 /* CCPUEmitterTranslator.h in Headers */, 15AE1BD719AAE01E00C27E9E /* CCControlSlider.h in Headers */, 15AE1BE519AAE01E00C27E9E /* CCTableView.h in Headers */, @@ -6792,18 +8663,25 @@ 15AE1BD319AAE01E00C27E9E /* CCControlPotentiometer.h in Headers */, 15AE1B6E19AADA9900C27E9E /* UIHelper.h in Headers */, B230ED7319B417AE00364AA8 /* CCTrianglesCommand.h in Headers */, + B6CAB2F71AF9AA1A00B9B856 /* btTriangleBuffer.h in Headers */, B665E2D41AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h in Headers */, 15AE187F19AAD33D00C27E9E /* CCBKeyframe.h in Headers */, B665E2B41AA80A6500DDB1C5 /* CCPUForceField.h in Headers */, 1A570073180BC5A10088DEC7 /* CCActionGrid.h in Headers */, 15AE1BCC19AAE01E00C27E9E /* CCControlButton.h in Headers */, + B6CAB3D71AF9AA1A00B9B856 /* btSolve2LinearConstraint.h in Headers */, + B6CAB3E51AF9AA1A00B9B856 /* btActionInterface.h in Headers */, 5034CA3B191D591100CE6051 /* ccShader_PositionColor.vert in Headers */, B665E3101AA80A6500DDB1C5 /* CCPUObserver.h in Headers */, + B6CAB2071AF9AA1A00B9B856 /* btOverlappingPairCache.h in Headers */, 1A570077180BC5A10088DEC7 /* CCActionGrid3D.h in Headers */, 1A57007B180BC5A10088DEC7 /* CCActionInstant.h in Headers */, + B6CAB38D1AF9AA1A00B9B856 /* btPolyhedralContactClipping.h in Headers */, 15AE182A19AAD2F700C27E9E /* CCMeshSkin.h in Headers */, B276EF5F1988D1D500CD400F /* CCVertexIndexData.h in Headers */, 1A57007F180BC5A10088DEC7 /* CCActionInterval.h in Headers */, + B6CAB3491AF9AA1A00B9B856 /* gim_clip_polygon.h in Headers */, + B6CAAFE41AF9A9E100B9B856 /* CCPhysics3D.h in Headers */, 15AE1A7F19AAD40300C27E9E /* b2DistanceJoint.h in Headers */, B665E3301AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h in Headers */, 15AE188719AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */, @@ -6811,25 +8689,40 @@ 1A01C69A18F57BE800EFE3A6 /* CCSet.h in Headers */, 182C5CB31A95964700C30D34 /* Node3DReader.h in Headers */, 1A570083180BC5A10088DEC7 /* CCActionManager.h in Headers */, + B6CAB2251AF9AA1A00B9B856 /* btCollisionCreateFunc.h in Headers */, 1A570087180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */, 50ABBD911925AB4100A911A9 /* CCGLProgramCache.h in Headers */, 50ED2BDA19BE76D300A0AB90 /* UIVideoPlayer.h in Headers */, + B6CAB3AB1AF9AA1A00B9B856 /* btContactConstraint.h in Headers */, + B6CAB4391AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedDefs.h in Headers */, 15AE199919AAD39600C27E9E /* LoadingBarReader.h in Headers */, + B6CAB4E71AF9AA1A00B9B856 /* SpuSync.h in Headers */, 15AE1A8F19AAD40300C27E9E /* b2RopeJoint.h in Headers */, 15AE18ED19AAD35000C27E9E /* CCActionObject.h in Headers */, + B6CAB4F31AF9AA1A00B9B856 /* btAabbUtil2.h in Headers */, ED9C6A9618599AD8000A5232 /* CCNodeGrid.h in Headers */, + B6CAB4151AF9AA1A00B9B856 /* btMultiBodyPoint2Point.h in Headers */, + B6CAB4491AF9AA1A00B9B856 /* btThreadSupportInterface.h in Headers */, 15AE18A719AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */, 15FB20891AE7C57D00C31518 /* shapes.h in Headers */, 15AE184819AAD2F700C27E9E /* cocos3d.h in Headers */, + B6CAB2531AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.h in Headers */, 50ABBEC31925AB6F00A911A9 /* CCVector.h in Headers */, 1A57008B180BC5A10088DEC7 /* CCActionProgressTimer.h in Headers */, + B6CAB2A51AF9AA1A00B9B856 /* btConvexHullShape.h in Headers */, B665E2EC1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h in Headers */, 382384151A259092002C4610 /* NodeReaderProtocol.h in Headers */, B665E2DC1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h in Headers */, 382384111A259092002C4610 /* NodeReaderDefine.h in Headers */, 50ABBD8D1925AB4100A911A9 /* CCGLProgram.h in Headers */, 50ABBEA11925AB6F00A911A9 /* CCScheduler.h in Headers */, + B6CAB2211AF9AA1A00B9B856 /* btBoxBoxDetector.h in Headers */, + B6CAB5271AF9AA1A00B9B856 /* btRandom.h in Headers */, + B6CAB28D1AF9AA1A00B9B856 /* btCollisionMargin.h in Headers */, + B6CAB1FB1AF9AA1A00B9B856 /* btDbvtBroadphase.h in Headers */, 15AE1B6219AADA9900C27E9E /* UIButton.h in Headers */, + B6CAB4CF1AF9AA1A00B9B856 /* SpuContactResult.h in Headers */, + B6CAB4E11AF9AA1A00B9B856 /* SpuSampleTask.h in Headers */, 50ABBDB71925AB4100A911A9 /* CCTexture2D.h in Headers */, 50ABBE811925AB6F00A911A9 /* CCEventType.h in Headers */, B665E2B81AA80A6500DDB1C5 /* CCPUForceFieldAffector.h in Headers */, @@ -6841,33 +8734,44 @@ B665E2F41AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h in Headers */, B665E2D81AA80A6500DDB1C5 /* CCPUJetAffector.h in Headers */, 1A570093180BC5A10088DEC7 /* CCActionTween.h in Headers */, + B6CAB3CF1AF9AA1A00B9B856 /* btSequentialImpulseConstraintSolver.h in Headers */, 50ABBD4A1925AB0000A911A9 /* Mat4.h in Headers */, + B6CAB36B1AF9AA1A00B9B856 /* btConvexPenetrationDepthSolver.h in Headers */, 15AE1A6919AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, 29394CF419B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */, B665E3C01AA80A6500DDB1C5 /* CCPUScaleAffector.h in Headers */, B665E2401AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h in Headers */, + B6CAB3C71AF9AA1A00B9B856 /* btJacobianEntry.h in Headers */, B29A7E1719EE1B7700872B35 /* Atlas.h in Headers */, + B6CAB30D1AF9AA1A00B9B856 /* btTriangleMeshShape.h in Headers */, 1A57009A180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, + B6CAB3211AF9AA1A00B9B856 /* btGenericPoolAllocator.h in Headers */, D0FD035B1A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h in Headers */, + B6CAB5031AF9AA1A00B9B856 /* btDefaultMotionState.h in Headers */, 15AE190819AAD35000C27E9E /* CCDatas.h in Headers */, B665E3281AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h in Headers */, B29A7E1119EE1B7700872B35 /* EventData.h in Headers */, 1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */, 50ABC0671926664800A911A9 /* CCPlatformDefine-mac.h in Headers */, + B6CAB34D1AF9AA1A00B9B856 /* gim_contact.h in Headers */, B665E40C1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h in Headers */, 15AE189A19AAD33D00C27E9E /* CCMenuLoader.h in Headers */, 46C02E0918E91123004B7456 /* xxhash.h in Headers */, 15AE1A6B19AAD40300C27E9E /* b2ChainAndCircleContact.h in Headers */, + B6CAB4451AF9AA1A00B9B856 /* btParallelConstraintSolver.h in Headers */, 1A570110180BC8EE0088DEC7 /* CCDrawingPrimitives.h in Headers */, + B6CAB5091AF9AA1A00B9B856 /* btGrahamScan2dConvexHull.h in Headers */, 50CB247D19D9C5A100687767 /* AudioPlayer.h in Headers */, 1A570114180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, B665E3141AA80A6500DDB1C5 /* CCPUObserverManager.h in Headers */, B665E2E01AA80A6500DDB1C5 /* CCPULineAffector.h in Headers */, 15AE1A6019AAD40300C27E9E /* b2ContactManager.h in Headers */, 15B3707A19EE414C00ABE682 /* AssetsManagerEx.h in Headers */, + B6CAB2A11AF9AA1A00B9B856 /* btConvex2dShape.h in Headers */, 15AE188319AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, B29A7E2719EE1B7700872B35 /* spine-cocos2dx.h in Headers */, B665E2F01AA80A6500DDB1C5 /* CCPULineEmitter.h in Headers */, + B6CAB49D1AF9AA1A00B9B856 /* PlatformDefinitions.h in Headers */, 15AE1B5819AADA9900C27E9E /* UISlider.h in Headers */, 1A57011D180BC90D0088DEC7 /* CCGrabber.h in Headers */, B665E3C81AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.h in Headers */, @@ -6882,29 +8786,44 @@ B29A7E2919EE1B7700872B35 /* SkeletonData.h in Headers */, 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */, 15AE1A7119AAD40300C27E9E /* b2Contact.h in Headers */, + B6CAB23B1AF9AA1A00B9B856 /* btCompoundCompoundCollisionAlgorithm.h in Headers */, 50ABBED11925AB6F00A911A9 /* TGAlib.h in Headers */, 1A57019F180BCB590088DEC7 /* CCFont.h in Headers */, + B6CAB20D1AF9AA1A00B9B856 /* btQuantizedBvh.h in Headers */, DA8C62A419E52C6400000516 /* ioapi_mem.h in Headers */, + B6CAB53B1AF9AA1A00B9B856 /* cl_gl.h in Headers */, 1A5701A3180BCB590088DEC7 /* CCFontAtlas.h in Headers */, 15AE18E919AAD35000C27E9E /* CCActionManagerEx.h in Headers */, 1A01C68618F57BE800EFE3A6 /* CCArray.h in Headers */, 1A5701A7180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */, + B6CAB3D31AF9AA1A00B9B856 /* btSliderConstraint.h in Headers */, 15AE1A7D19AAD40300C27E9E /* b2MotorJoint.h in Headers */, B68779021A8CA82E00643ABF /* CCParticle3DRender.h in Headers */, + B6CAB2471AF9AA1A00B9B856 /* btConvexConvexAlgorithm.h in Headers */, + B6CAB3A71AF9AA1A00B9B856 /* btConstraintSolver.h in Headers */, + B6CAB3EF1AF9AA1A00B9B856 /* btRigidBody.h in Headers */, 15AE1B6C19AADA9900C27E9E /* UIWidget.h in Headers */, B665E2681AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h in Headers */, 15FB208B1AE7C57D00C31518 /* utils.h in Headers */, + B6CAB3411AF9AA1A00B9B856 /* gim_bitset.h in Headers */, 15AE180E19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, 1A5701B3180BCB590088DEC7 /* CCFontFNT.h in Headers */, 38F526421A48363B000DB7F7 /* CSArmatureNode_generated.h in Headers */, + B6CAB2771AF9AA1A00B9B856 /* btUnionFind.h in Headers */, + B6CAB2111AF9AA1A00B9B856 /* btSimpleBroadphase.h in Headers */, 15AE1BD919AAE01E00C27E9E /* CCControlStepper.h in Headers */, 15AE192119AAD35000C27E9E /* CocoStudio.h in Headers */, + B6CAB3891AF9AA1A00B9B856 /* btPointCollector.h in Headers */, 15AE18A119AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */, 5034CA47191D591100CE6051 /* ccShader_Label_normal.frag in Headers */, 15AE182219AAD2F700C27E9E /* CCBundleReader.h in Headers */, 15AE18A519AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */, 5E9F61281A3FFE3D0038DE01 /* CCFrustum.h in Headers */, + B6CAB3E91AF9AA1A00B9B856 /* btDiscreteDynamicsWorld.h in Headers */, + B6CAB2F31AF9AA1A00B9B856 /* btTetrahedronShape.h in Headers */, + B6CAB4231AF9AA1A00B9B856 /* btMLCPSolverInterface.h in Headers */, 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */, + B6CAB5011AF9AA1A00B9B856 /* btConvexHullComputer.h in Headers */, 15AE197119AAD35700C27E9E /* CCFrame.h in Headers */, 15AE1A6519AAD40300C27E9E /* b2TimeStep.h in Headers */, 15AE182E19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */, @@ -6913,59 +8832,79 @@ B665E3B81AA80A6500DDB1C5 /* CCPURibbonTrail.h in Headers */, 1A5701B7180BCB5A0088DEC7 /* CCFontFreeType.h in Headers */, B665E20C1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.h in Headers */, + B6CAB3711AF9AA1A00B9B856 /* btGjkConvexCast.h in Headers */, D0FD03551A3B51AA00825BB5 /* CCAllocatorMacros.h in Headers */, 3823842A1A2590F9002C4610 /* NodeReader.h in Headers */, 1A5701BB180BCB5A0088DEC7 /* CCLabel.h in Headers */, + B6CAB3231AF9AA1A00B9B856 /* btGeometryOperations.h in Headers */, D0FD035D1A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h in Headers */, + B6CAB41B1AF9AA1A00B9B856 /* btDantzigLCP.h in Headers */, 15AE182619AAD2F700C27E9E /* CCMesh.h in Headers */, 15AE192019AAD35000C27E9E /* CCUtilMath.h in Headers */, + B6CAB25B1AF9AA1A00B9B856 /* btHashedSimplePairCache.h in Headers */, B665E4201AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.h in Headers */, 15AE1BC119AADFFB00C27E9E /* cocos-ext.h in Headers */, 1A5701BF180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */, 50ABBED91925AB6F00A911A9 /* ZipUtils.h in Headers */, 50643BDB19BFAF4400EF68ED /* CCStdC.h in Headers */, 1A5701C3180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */, + B6CAB33F1AF9AA1A00B9B856 /* gim_basic_geometry_operations.h in Headers */, + B6CAAFFC1AF9A9E100B9B856 /* CCPhysics3DWorld.h in Headers */, 50ABBE5F1925AB6F00A911A9 /* CCEventListener.h in Headers */, 15AE197519AAD35700C27E9E /* CCTimeLine.h in Headers */, 1A5701C9180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */, 5034CA37191D591100CE6051 /* ccShader_PositionColorLengthTexture.vert in Headers */, + B6CAB32D1AF9AA1A00B9B856 /* btGImpactMassUtil.h in Headers */, 15AE1B6419AADA9900C27E9E /* UICheckBox.h in Headers */, 1A5701CD180BCB5A0088DEC7 /* CCLabelTTF.h in Headers */, 15AE1A3319AAD3D500C27E9E /* b2CircleShape.h in Headers */, 1A5701E0180BCB8C0088DEC7 /* CCLayer.h in Headers */, 1A5701E4180BCB8C0088DEC7 /* CCScene.h in Headers */, 15FB20701AE7BE7400C31518 /* SpritePolygonCache.h in Headers */, + B6CAB2C11AF9AA1A00B9B856 /* btEmptyShape.h in Headers */, B665E3D81AA80A6600DDB1C5 /* CCPUScriptParser.h in Headers */, 382384091A25900F002C4610 /* FlatBuffersSerialize.h in Headers */, + B6CAB2A91AF9AA1A00B9B856 /* btConvexInternalShape.h in Headers */, 15AE1BDD19AAE01E00C27E9E /* CCControlUtils.h in Headers */, + B6CAB3271AF9AA1A00B9B856 /* btGImpactBvh.h in Headers */, 15AE198D19AAD36E00C27E9E /* CheckBoxReader.h in Headers */, B29A7E0919EE1B7700872B35 /* AttachmentLoader.h in Headers */, 1A01C68818F57BE800EFE3A6 /* CCBool.h in Headers */, B29A7E3319EE1B7700872B35 /* SlotData.h in Headers */, B665E2741AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h in Headers */, + B6CAB2FF1AF9AA1A00B9B856 /* btTriangleIndexVertexArray.h in Headers */, 15AE18E519AAD35000C27E9E /* CCActionFrame.h in Headers */, 50ABBEAD1925AB6F00A911A9 /* ccTypes.h in Headers */, 1A087AEA1860400400196EF5 /* edtaa3func.h in Headers */, + B6CAB43D1AF9AA1A00B9B856 /* btGpuDefines.h in Headers */, 15AE181C19AAD2F700C27E9E /* CCBundle3D.h in Headers */, 15AE189919AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */, + B6CAB35D1AF9AA1A00B9B856 /* gim_radixsort.h in Headers */, + B6CAB4AB1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.h in Headers */, 15AE1B5E19AADA9900C27E9E /* UITextBMFont.h in Headers */, B665E3601AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h in Headers */, 15AE18E719AAD35000C27E9E /* CCActionFrameEasing.h in Headers */, + B6CAB3511AF9AA1A00B9B856 /* gim_geometry.h in Headers */, 1A5701E8180BCB8C0088DEC7 /* CCTransition.h in Headers */, 1A5701EC180BCB8C0088DEC7 /* CCTransitionPageTurn.h in Headers */, + B6CAB37D1AF9AA1A00B9B856 /* btGjkPairDetector.h in Headers */, + B6CAB3031AF9AA1A00B9B856 /* btTriangleIndexVertexMaterialArray.h in Headers */, B665E35C1AA80A6500DDB1C5 /* CCPUOnRandomObserver.h in Headers */, 15AE196F19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */, 1A5701F0180BCB8C0088DEC7 /* CCTransitionProgress.h in Headers */, 1A5701F9180BCBAD0088DEC7 /* CCMenu.h in Headers */, + B6CAB4A11AF9AA1A00B9B856 /* PosixThreadSupport.h in Headers */, B665E3001AA80A6500DDB1C5 /* CCPUMaterialTranslator.h in Headers */, B665E33C1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h in Headers */, 50ABBD401925AB0000A911A9 /* CCMath.h in Headers */, B29A7E1F19EE1B7700872B35 /* BoneData.h in Headers */, + B6CAB3191AF9AA1A00B9B856 /* btCompoundFromGimpact.h in Headers */, 15AE1A9319AAD40300C27E9E /* b2WheelJoint.h in Headers */, ED74D7691A5B8A2600157FD4 /* CCPhysicsHelper.h in Headers */, B665E3F01AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.h in Headers */, 15AE1A3119AAD3D500C27E9E /* b2ChainShape.h in Headers */, 1A5701FD180BCBAD0088DEC7 /* CCMenuItem.h in Headers */, + B6CAB2AD1AF9AA1A00B9B856 /* btConvexPointCloudShape.h in Headers */, 1A570204180BCBD40088DEC7 /* CCClippingNode.h in Headers */, 15AE1A7B19AAD40300C27E9E /* b2PolygonContact.h in Headers */, 15AE1A2919AAD3D500C27E9E /* b2Collision.h in Headers */, @@ -6975,39 +8914,54 @@ B665E3081AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h in Headers */, 15AE184219AAD2F700C27E9E /* CCSprite3D.h in Headers */, B665E3181AA80A6500DDB1C5 /* CCPUObserverTranslator.h in Headers */, + B6CAB5111AF9AA1A00B9B856 /* btMatrix3x3.h in Headers */, B665E3201AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h in Headers */, B665E2A01AA80A6500DDB1C5 /* CCPUEventHandler.h in Headers */, + B6CAB5291AF9AA1A00B9B856 /* btScalar.h in Headers */, 15AE18A019AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */, + B6CAB3311AF9AA1A00B9B856 /* btGImpactQuantizedBvh.h in Headers */, B665E3B01AA80A6500DDB1C5 /* CCPURender.h in Headers */, + B6CAB2291AF9AA1A00B9B856 /* btCollisionDispatcher.h in Headers */, 1A01C6A618F58F7500EFE3A6 /* CCNotificationCenter.h in Headers */, B665E3A81AA80A6500DDB1C5 /* CCPURandomiser.h in Headers */, 1A57020A180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, 1A570212180BCBF40088DEC7 /* CCProgressTimer.h in Headers */, + B6CAB2E71AF9AA1A00B9B856 /* btSphereShape.h in Headers */, 1A570216180BCBF40088DEC7 /* CCRenderTexture.h in Headers */, 1A01C69618F57BE800EFE3A6 /* CCInteger.h in Headers */, B665E3F41AA80A6600DDB1C5 /* CCPUSlaveEmitter.h in Headers */, 15AE1B6919AADA9900C27E9E /* UIDeprecated.h in Headers */, 1A570223180BCC1A0088DEC7 /* CCParticleBatchNode.h in Headers */, + B6CAB53F1AF9AA1A00B9B856 /* cl_platform.h in Headers */, 15AE1A8319AAD40300C27E9E /* b2GearJoint.h in Headers */, 15AE1BD519AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */, + B6CAB30F1AF9AA1A00B9B856 /* btTriangleShape.h in Headers */, 15AE186919AAD31D00C27E9E /* CocosDenshion.h in Headers */, B29A7DE719EE1B7700872B35 /* spine.h in Headers */, B665E3841AA80A6500DDB1C5 /* CCPUPathFollower.h in Headers */, B665E3F81AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.h in Headers */, 50ABBD891925AB4100A911A9 /* CCCustomCommand.h in Headers */, 15AE1A8719AAD40300C27E9E /* b2MouseJoint.h in Headers */, + B6CAB5171AF9AA1A00B9B856 /* btMotionState.h in Headers */, + B6CAB4D11AF9AA1A00B9B856 /* SpuConvexPenetrationDepthSolver.h in Headers */, + B6CAB3171AF9AA1A00B9B856 /* btClipPolygon.h in Headers */, 5034CA43191D591100CE6051 /* ccShader_Label.vert in Headers */, + B6CAB1E11AF9AA1A00B9B856 /* btBulletCollisionCommon.h in Headers */, 15AE189719AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */, B665E2001AA80A6500DDB1C5 /* CCPUAlignAffector.h in Headers */, 15AE189319AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */, B29A7DF919EE1B7700872B35 /* Json.h in Headers */, + B6CAB3971AF9AA1A00B9B856 /* btSubSimplexConvexCast.h in Headers */, 15AE18EF19AAD35000C27E9E /* CCArmature.h in Headers */, B665E3981AA80A6500DDB1C5 /* CCPUPointEmitter.h in Headers */, 15AE19A719AAD39600C27E9E /* TextReader.h in Headers */, + B6CAB27F1AF9AA1A00B9B856 /* btBox2dShape.h in Headers */, 1A570227180BCC1A0088DEC7 /* CCParticleExamples.h in Headers */, 1A57022B180BCC1A0088DEC7 /* CCParticleSystem.h in Headers */, 15AE190E19AAD35000C27E9E /* CCDisplayManager.h in Headers */, + B6CAB50B1AF9AA1A00B9B856 /* btHashMap.h in Headers */, 15AE1A6719AAD40300C27E9E /* b2World.h in Headers */, + B6CAB3571AF9AA1A00B9B856 /* gim_math.h in Headers */, 15AE199B19AAD39600C27E9E /* PageViewReader.h in Headers */, B665E2A41AA80A6500DDB1C5 /* CCPUEventHandlerManager.h in Headers */, 15AE1A6219AAD40300C27E9E /* b2Fixture.h in Headers */, @@ -7023,63 +8977,97 @@ 50ABBE4F1925AB6F00A911A9 /* CCEventCustom.h in Headers */, 50ABBD521925AB0000A911A9 /* Quaternion.h in Headers */, 15AE186219AAD31D00C27E9E /* CDAudioManager.h in Headers */, + B6CAB3931AF9AA1A00B9B856 /* btSimplexSolverInterface.h in Headers */, + B6CAB22D1AF9AA1A00B9B856 /* btCollisionObject.h in Headers */, + B6CAB2CF1AF9AA1A00B9B856 /* btMultimaterialTriangleMeshShape.h in Headers */, 15AE18F119AAD35000C27E9E /* CCArmatureAnimation.h in Headers */, 1A57022F180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, + B6CAB4EB1AF9AA1A00B9B856 /* TrbStateVec.h in Headers */, + B6CAB2831AF9AA1A00B9B856 /* btBoxShape.h in Headers */, B665E37C1AA80A6500DDB1C5 /* CCPUParticleSystem3D.h in Headers */, 15AE188519AAD33D00C27E9E /* CCBSequence.h in Headers */, 15FB20951AE7C57D00C31518 /* cdt.h in Headers */, B665E3541AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h in Headers */, + B6CAB4F11AF9AA1A00B9B856 /* Win32ThreadSupport.h in Headers */, 50643BE219BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, B29A7DF519EE1B7700872B35 /* Skeleton.h in Headers */, + B6CAB4DB1AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.h in Headers */, 382384031A259005002C4610 /* CSParseBinary_generated.h in Headers */, + B6CAB4F91AF9AA1A00B9B856 /* btAlignedObjectArray.h in Headers */, 5034CA49191D591100CE6051 /* ccShader_Label_df.frag in Headers */, 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */, B29A7DD919EE1B7700872B35 /* SkeletonRenderer.h in Headers */, 50CB247919D9C5A100687767 /* AudioEngine-inl.h in Headers */, 1A01C68C18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, + B6CAB0001AF9A9E100B9B856 /* CCPhysicsSprite3D.h in Headers */, + B6CAB4411AF9AA1A00B9B856 /* btGpuUtilsSharedDefs.h in Headers */, 50ABBD561925AB0000A911A9 /* TransformUtils.h in Headers */, + B6CAB4DD1AF9AA1A00B9B856 /* SpuPreferredPenetrationDirections.h in Headers */, + B6CAB2431AF9AA1A00B9B856 /* btConvexConcaveCollisionAlgorithm.h in Headers */, 299754F6193EC95400A54AC3 /* ObjectFactory.h in Headers */, 38ACD1FE1A27111900C3093D /* WidgetCallBackHandlerProtocol.h in Headers */, 50ABBD991925AB4100A911A9 /* CCGLProgramStateCache.h in Headers */, B665E41C1AA80A6600DDB1C5 /* CCPUTextureRotator.h in Headers */, + B6CAB2231AF9AA1A00B9B856 /* btCollisionConfiguration.h in Headers */, + B6CAB2191AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.h in Headers */, 5034CA3D191D591100CE6051 /* ccShader_PositionColor.frag in Headers */, 15AE18FB19AAD35000C27E9E /* CCColliderDetector.h in Headers */, 1A570280180BCC900088DEC7 /* CCSprite.h in Headers */, 292DB14719B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */, B665E3FC1AA80A6600DDB1C5 /* CCPUSphere.h in Headers */, + B6CAB51B1AF9AA1A00B9B856 /* btPolarDecomposition.h in Headers */, 15AE1A9119AAD40300C27E9E /* b2WeldJoint.h in Headers */, 15AE1A5419AAD40300C27E9E /* b2GrowableStack.h in Headers */, 15AE1B4E19AADA9900C27E9E /* UIListView.h in Headers */, 1A570284180BCC900088DEC7 /* CCSpriteBatchNode.h in Headers */, 5034CA2B191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */, B665E2041AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h in Headers */, + B6CAB3A11AF9AA1A00B9B856 /* btKinematicCharacterController.h in Headers */, 15AE1BCE19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */, 382384461A25915C002C4610 /* SpriteReader.h in Headers */, B665E2481AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h in Headers */, 1A570288180BCC900088DEC7 /* CCSpriteFrame.h in Headers */, + B6CAB43B1AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedTypes.h in Headers */, B665E3AC1AA80A6500DDB1C5 /* CCPURandomiserTranslator.h in Headers */, B665E2CC1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h in Headers */, 15AE189519AAD33D00C27E9E /* CCLayerLoader.h in Headers */, 1A57028C180BCC900088DEC7 /* CCSpriteFrameCache.h in Headers */, + B6CAB21D1AF9AA1A00B9B856 /* btBoxBoxCollisionAlgorithm.h in Headers */, + B6CAAFEC1AF9A9E100B9B856 /* CCPhysics3DConstraint.h in Headers */, 5027253A190BF1B900AAF4ED /* cocos2d.h in Headers */, B665E3041AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h in Headers */, 15AE1B5A19AADA9900C27E9E /* UIText.h in Headers */, B665E21C1AA80A6500DDB1C5 /* CCPUBehaviour.h in Headers */, 15AE184A19AAD30500C27E9E /* Export.h in Headers */, + B6CAB3051AF9AA1A00B9B856 /* btTriangleInfoMap.h in Headers */, + B6CAB2C51AF9AA1A00B9B856 /* btHeightfieldTerrainShape.h in Headers */, B665E3501AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h in Headers */, B68778FA1A8CA82E00643ABF /* CCParticle3DAffector.h in Headers */, 15AE1BA019AADFDF00C27E9E /* UILayout.h in Headers */, 1A570294180BCCAB0088DEC7 /* CCAnimation.h in Headers */, B665E4081AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.h in Headers */, + B6CAB28B1AF9AA1A00B9B856 /* btCapsuleShape.h in Headers */, 382384001A258FA7002C4610 /* util.h in Headers */, 50ABBD421925AB0000A911A9 /* CCMathBase.h in Headers */, + B6CAB5491AF9AA1A00B9B856 /* MiniCLTaskScheduler.h in Headers */, + B6CAB2031AF9AA1A00B9B856 /* btMultiSapBroadphase.h in Headers */, 1A570298180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */, + B6CAB43F1AF9AA1A00B9B856 /* btGpuUtilsSharedCode.h in Headers */, B665E4181AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.h in Headers */, + B6CAB3CB1AF9AA1A00B9B856 /* btPoint2PointConstraint.h in Headers */, B665E2C81AA80A6500DDB1C5 /* CCPUGravityAffector.h in Headers */, 501216A21AC473AD009A4BEA /* CCMaterial.h in Headers */, 50ABC05D1926664800A911A9 /* CCApplication-mac.h in Headers */, + B6CAB2871AF9AA1A00B9B856 /* btBvhTriangleMeshShape.h in Headers */, + B6CAB51D1AF9AA1A00B9B856 /* btPoolAllocator.h in Headers */, + B6CAB3EB1AF9AA1A00B9B856 /* btDynamicsWorld.h in Headers */, + B6CAB29D1AF9AA1A00B9B856 /* btConeShape.h in Headers */, + B6CAB4A31AF9AA1A00B9B856 /* PpuAddressSpace.h in Headers */, 15AE190019AAD35000C27E9E /* CCComAudio.h in Headers */, + B6CAB3DB1AF9AA1A00B9B856 /* btSolverConstraint.h in Headers */, + B6CAB2911AF9AA1A00B9B856 /* btCollisionShape.h in Headers */, B665E3481AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h in Headers */, + B6CAB2B11AF9AA1A00B9B856 /* btConvexPolyhedron.h in Headers */, 15AE190419AAD35000C27E9E /* CCComRender.h in Headers */, B29A7E1919EE1B7700872B35 /* Event.h in Headers */, 15AE18AA19AAD33D00C27E9E /* CocosBuilder.h in Headers */, @@ -7087,20 +9075,28 @@ B665E2181AA80A6500DDB1C5 /* CCPUBeamRender.h in Headers */, 15AE1A7919AAD40300C27E9E /* b2PolygonAndCircleContact.h in Headers */, B665E2081AA80A6500DDB1C5 /* CCPUBaseCollider.h in Headers */, + B6CAB40D1AF9AA1A00B9B856 /* btMultiBodyJointMotor.h in Headers */, 15AE199719AAD39600C27E9E /* ListViewReader.h in Headers */, B29A7E1D19EE1B7700872B35 /* PolygonBatch.h in Headers */, B665E3441AA80A6500DDB1C5 /* CCPUOnExpireObserver.h in Headers */, 50ABBD4E1925AB0000A911A9 /* MathUtil.h in Headers */, 15AE1A7319AAD40300C27E9E /* b2ContactSolver.h in Headers */, + B6CAB3B91AF9AA1A00B9B856 /* btGeneric6DofConstraint.h in Headers */, + B6CAB24B1AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.h in Headers */, + B6CAB5391AF9AA1A00B9B856 /* cl.h in Headers */, 15AE1BC219AADFFB00C27E9E /* ExtensionMacros.h in Headers */, B665E4001AA80A6600DDB1C5 /* CCPUSphereCollider.h in Headers */, + B6CAB42D1AF9AA1A00B9B856 /* btVehicleRaycaster.h in Headers */, 15AE1BDF19AAE01E00C27E9E /* CCInvocation.h in Headers */, 50ABBE431925AB6F00A911A9 /* CCDirector.h in Headers */, 15AE1A5819AAD40300C27E9E /* b2Settings.h in Headers */, 15AE181819AAD2F700C27E9E /* CCAttachNode.h in Headers */, + B6CAB4CB1AF9AA1A00B9B856 /* SpuCollisionShapes.h in Headers */, 1A12775B18DFCC540005F345 /* CCTweenFunction.h in Headers */, + B6CAB4271AF9AA1A00B9B856 /* btSolveProjectedGaussSeidel.h in Headers */, 1A5702CA180BCE370088DEC7 /* CCTextFieldTTF.h in Headers */, 15EFA213198A2BB5000C57D3 /* CCProtectedNode.h in Headers */, + B6CAB3551AF9AA1A00B9B856 /* gim_linear_math.h in Headers */, 1A5702EC180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */, 15AE18E019AAD35000C27E9E /* TriggerBase.h in Headers */, 15AE187D19AAD33D00C27E9E /* CCBFileLoader.h in Headers */, @@ -7111,19 +9107,26 @@ 50ABC01B1926664800A911A9 /* CCSAXParser.h in Headers */, 50ABBED51925AB6F00A911A9 /* utlist.h in Headers */, 1A5702F4180BCE750088DEC7 /* CCTMXObjectGroup.h in Headers */, + B6CAB1EF1AF9AA1A00B9B856 /* btBroadphaseProxy.h in Headers */, + B6CAB3871AF9AA1A00B9B856 /* btPersistentManifold.h in Headers */, 50ABBDAF1925AB4100A911A9 /* CCRenderer.h in Headers */, B665E30C1AA80A6500DDB1C5 /* CCPUNoise.h in Headers */, + B6CAB3A51AF9AA1A00B9B856 /* btConeTwistConstraint.h in Headers */, 15AE181E19AAD2F700C27E9E /* CCBundle3DData.h in Headers */, 1A5702F8180BCE750088DEC7 /* CCTMXTiledMap.h in Headers */, B665E2801AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h in Headers */, 5034CA21191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */, D0FD03491A3B51AA00825BB5 /* CCAllocatorBase.h in Headers */, + B6CAB4FD1AF9AA1A00B9B856 /* btConvexHull.h in Headers */, 15AE1A2419AAD3D500C27E9E /* b2BroadPhase.h in Headers */, B29A7E3919EE1B7700872B35 /* Animation.h in Headers */, B665E2B01AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h in Headers */, + B6CAB2EF1AF9AA1A00B9B856 /* btStridingMeshInterface.h in Headers */, + B6CAB23F1AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.h in Headers */, 382384381A259126002C4610 /* ProjectNodeReader.h in Headers */, 15FB20991AE7C57D00C31518 /* sweep.h in Headers */, B665E3C41AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.h in Headers */, + B6CAB2631AF9AA1A00B9B856 /* btManifoldResult.h in Headers */, 15AE191019AAD35000C27E9E /* CCInputDelegate.h in Headers */, B665E4301AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h in Headers */, 15AE184C19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, @@ -7131,26 +9134,45 @@ B665E24C1AA80A6500DDB1C5 /* CCPUColorAffector.h in Headers */, 29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */, 15AE186519AAD31D00C27E9E /* CDOpenALSupport.h in Headers */, + B6CAAFE81AF9A9E100B9B856 /* CCPhysics3DComponent.h in Headers */, 15AE1B5C19AADA9900C27E9E /* UITextAtlas.h in Headers */, 1A5702FC180BCE750088DEC7 /* CCTMXXMLParser.h in Headers */, 15AE1B6019AADA9900C27E9E /* UITextField.h in Headers */, 15AE190619AAD35000C27E9E /* CCDataReaderHelper.h in Headers */, 15AE1A6419AAD40300C27E9E /* b2Island.h in Headers */, 382383EE1A258FA7002C4610 /* flatbuffers.h in Headers */, + B6CAB4B31AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.h in Headers */, 15AE1B5619AADA9900C27E9E /* UIScrollView.h in Headers */, + B6CAB2731AF9AA1A00B9B856 /* btSphereTriangleCollisionAlgorithm.h in Headers */, + B6CAB3AD1AF9AA1A00B9B856 /* btContactSolverInfo.h in Headers */, 50ABBDBB1925AB4100A911A9 /* CCTextureAtlas.h in Headers */, 15FB20911AE7C57D00C31518 /* advancing_front.h in Headers */, 1A570302180BCE890088DEC7 /* CCParallaxNode.h in Headers */, 50ABBE4B1925AB6F00A911A9 /* CCEventAcceleration.h in Headers */, + B6CAB5151AF9AA1A00B9B856 /* btMinMax.h in Headers */, + B6CAB5311AF9AA1A00B9B856 /* btTransform.h in Headers */, + B6CAB2571AF9AA1A00B9B856 /* btGhostObject.h in Headers */, + B6CAB4BD1AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.h in Headers */, 1A57030E180BCF190088DEC7 /* CCComponent.h in Headers */, + B6CAB33D1AF9AA1A00B9B856 /* gim_array.h in Headers */, + B6CAB2DB1AF9AA1A00B9B856 /* btPolyhedralConvexShape.h in Headers */, + B6CAB5251AF9AA1A00B9B856 /* btQuickprof.h in Headers */, B665E2AC1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h in Headers */, + B6CAB4E91AF9AA1A00B9B856 /* TrbDynBody.h in Headers */, 1A570312180BCF190088DEC7 /* CCComponentContainer.h in Headers */, 15AE1B7119AADA9900C27E9E /* CocosGUI.h in Headers */, B665E2381AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h in Headers */, + B6CAB4211AF9AA1A00B9B856 /* btMLCPSolver.h in Headers */, 15AE1A2D19AAD3D500C27E9E /* b2DynamicTree.h in Headers */, + B6CAB3E31AF9AA1A00B9B856 /* btUniversalConstraint.h in Headers */, B665E39C1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h in Headers */, + B6CAB41D1AF9AA1A00B9B856 /* btDantzigSolver.h in Headers */, 50ABBD851925AB4100A911A9 /* CCBatchCommand.h in Headers */, + B6CAB3351AF9AA1A00B9B856 /* btGImpactShape.h in Headers */, 15AE1A6F19AAD40300C27E9E /* b2CircleContact.h in Headers */, + B6CAB3431AF9AA1A00B9B856 /* gim_box_collision.h in Headers */, + B6CAB39B1AF9AA1A00B9B856 /* btVoronoiSimplexSolver.h in Headers */, + B6CAB1EB1AF9AA1A00B9B856 /* btBroadphaseInterface.h in Headers */, B665E3E81AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.h in Headers */, 15AE191619AAD35000C27E9E /* CCSkin.h in Headers */, 50ABC0651926664800A911A9 /* CCGL-mac.h in Headers */, @@ -7159,23 +9181,29 @@ 15AE1A8B19AAD40300C27E9E /* b2PulleyJoint.h in Headers */, 15AE1A5119AAD40300C27E9E /* b2BlockAllocator.h in Headers */, 15AE199119AAD37200C27E9E /* ImageViewReader.h in Headers */, + B6CAB42B1AF9AA1A00B9B856 /* btRaycastVehicle.h in Headers */, 15AE18FE19AAD35000C27E9E /* CCComAttribute.h in Headers */, B665E38C1AA80A6500DDB1C5 /* CCPUPlane.h in Headers */, B665E3801AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h in Headers */, 50ABBD621925AB0000A911A9 /* Vec4.h in Headers */, + B6CAB4E51AF9AA1A00B9B856 /* SpuSampleTaskProcess.h in Headers */, + B6CAB2B51AF9AA1A00B9B856 /* btConvexShape.h in Headers */, B60C5BD619AC68B10056FBDE /* CCBillBoard.h in Headers */, 15AE1BA419AADFDF00C27E9E /* UILayoutManager.h in Headers */, B6D38B901AC3AFAC00043997 /* CCTextureCube.h in Headers */, 1A01C69418F57BE800EFE3A6 /* CCFloat.h in Headers */, 1A57034D180BD09B0088DEC7 /* tinyxml2.h in Headers */, + B6CAB4C31AF9AA1A00B9B856 /* Box.h in Headers */, 15AE18F519AAD35000C27E9E /* CCArmatureDefine.h in Headers */, 15AE188219AAD33D00C27E9E /* CCBReader.h in Headers */, 1A570356180BD0B00088DEC7 /* ioapi.h in Headers */, 15AE191819AAD35000C27E9E /* CCSpriteFrameCacheHelper.h in Headers */, 15AE1BA219AADFDF00C27E9E /* UILayoutParameter.h in Headers */, + B6CAB4351AF9AA1A00B9B856 /* btGpu3DGridBroadphase.h in Headers */, 50ABBE331925AB6F00A911A9 /* CCConfiguration.h in Headers */, B665E2101AA80A6500DDB1C5 /* CCPUBaseForceAffector.h in Headers */, 382F7ADE1AB1292A002EBECF /* CCObjectExtensionData.h in Headers */, + B6CAB4D51AF9AA1A00B9B856 /* SpuGatheringCollisionTask.h in Headers */, 15AE199519AAD39600C27E9E /* LayoutReader.h in Headers */, 15AE183219AAD2F700C27E9E /* CCOBB.h in Headers */, 15AE1BE319AAE01E00C27E9E /* CCScrollView.h in Headers */, @@ -7184,24 +9212,38 @@ 50CB247519D9C5A100687767 /* AudioCache.h in Headers */, 3823841C1A2590D2002C4610 /* ComAudioReader.h in Headers */, 50ABC01F1926664800A911A9 /* CCThread.h in Headers */, + 5053850E1B02819E00793096 /* CCVertexAttribBinding.h in Headers */, B665E4141AA80A6600DDB1C5 /* CCPUTextureAnimator.h in Headers */, + B6CAB3F31AF9AA1A00B9B856 /* btSimpleDynamicsWorld.h in Headers */, 1A57035A180BD0B00088DEC7 /* unzip.h in Headers */, + B6CAB1FF1AF9AA1A00B9B856 /* btDispatcher.h in Headers */, 15AE188B19AAD33D00C27E9E /* CCControlLoader.h in Headers */, B29A7DF719EE1B7700872B35 /* Attachment.h in Headers */, 15FB208D1AE7C57D00C31518 /* poly2tri.h in Headers */, + B6CAB3091AF9AA1A00B9B856 /* btTriangleMesh.h in Headers */, + B6CAB4AF1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.h in Headers */, 15AE1BCA19AAE01E00C27E9E /* CCControl.h in Headers */, + B6CAB3C11AF9AA1A00B9B856 /* btHinge2Constraint.h in Headers */, 50ABBDBF1925AB4100A911A9 /* CCTextureCache.h in Headers */, + B6CAB2E31AF9AA1A00B9B856 /* btShapeHull.h in Headers */, B29A7E0D19EE1B7700872B35 /* Bone.h in Headers */, 15AE186719AAD31D00C27E9E /* CDXMacOSXSupport.h in Headers */, + B6CAB5131AF9AA1A00B9B856 /* btMatrixX.h in Headers */, + B6CAB4091AF9AA1A00B9B856 /* btMultiBodyJointLimitConstraint.h in Headers */, + B6CAB4B91AF9AA1A00B9B856 /* SpuFakeDma.h in Headers */, B29A7DCD19EE1B7700872B35 /* Slot.h in Headers */, + B6CAB1E31AF9AA1A00B9B856 /* btBulletDynamicsCommon.h in Headers */, 382384311A259112002C4610 /* ParticleReader.h in Headers */, + B6CAB3BD1AF9AA1A00B9B856 /* btGeneric6DofSpringConstraint.h in Headers */, B665E3D01AA80A6600DDB1C5 /* CCPUScriptCompiler.h in Headers */, 5034CA35191D591100CE6051 /* ccShader_PositionTexture.frag in Headers */, 15AE1BB219AADFEF00C27E9E /* HttpClient.h in Headers */, + B6CAB3FD1AF9AA1A00B9B856 /* btMultiBodyConstraint.h in Headers */, 15AE197619AAD35700C27E9E /* CCTimelineMacro.h in Headers */, 50ABBE6F1925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */, 15AE1A5619AAD40300C27E9E /* b2Math.h in Headers */, 18956BB41A9DFBFD006E9155 /* Particle3DReader.h in Headers */, + B6CAB5071AF9AA1A00B9B856 /* btGeometryUtil.h in Headers */, 50ABBE9D1925AB6F00A911A9 /* CCRefPtr.h in Headers */, 15AE198319AAD36400C27E9E /* WidgetReader.h in Headers */, B257B461198A353E00D9A687 /* CCPrimitiveCommand.h in Headers */, @@ -7217,34 +9259,53 @@ 15AE1A8D19AAD40300C27E9E /* b2RevoluteJoint.h in Headers */, 50ABBE291925AB6F00A911A9 /* CCAutoreleasePool.h in Headers */, 299CF1FD19A434BC00C378C1 /* ccRandom.h in Headers */, + B6CAB5451AF9AA1A00B9B856 /* MiniCLTask.h in Headers */, 15AE1A2F19AAD3D500C27E9E /* b2TimeOfImpact.h in Headers */, 15AE18F319AAD35000C27E9E /* CCArmatureDataManager.h in Headers */, + 505385021B01887A00793096 /* CCProperties.h in Headers */, B665E2C01AA80A6500DDB1C5 /* CCPUGeometryRotator.h in Headers */, 50ABBE471925AB6F00A911A9 /* CCEvent.h in Headers */, 5012169C1AC473A3009A4BEA /* CCTechnique.h in Headers */, 15AE1B9E19AADFDF00C27E9E /* UIVBox.h in Headers */, 15AE192319AAD35000C27E9E /* DictionaryHelper.h in Headers */, + B6CAB2DF1AF9AA1A00B9B856 /* btScaledBvhTriangleMeshShape.h in Headers */, + B6CAB3B51AF9AA1A00B9B856 /* btGearConstraint.h in Headers */, + B6CAB4051AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.h in Headers */, B665E3D41AA80A6600DDB1C5 /* CCPUScriptLexer.h in Headers */, B257B4501989D5E800D9A687 /* CCPrimitive.h in Headers */, + B6CAB2C71AF9AA1A00B9B856 /* btMaterial.h in Headers */, B29A7DCF19EE1B7700872B35 /* RegionAttachment.h in Headers */, 15B3707E19EE414C00ABE682 /* CCEventAssetsManagerEx.h in Headers */, 50ABBE6B1925AB6F00A911A9 /* CCEventListenerFocus.h in Headers */, + B6CAAFF41AF9A9E100B9B856 /* CCPhysics3DObject.h in Headers */, + B6CAB4D71AF9AA1A00B9B856 /* SpuLocalSupport.h in Headers */, + B6CAB2671AF9AA1A00B9B856 /* btSimulationIslandManager.h in Headers */, 50ABBDA51925AB4100A911A9 /* CCQuadCommand.h in Headers */, + B6CAB3751AF9AA1A00B9B856 /* btGjkEpa2.h in Headers */, 15AE1BCF19AAE01E00C27E9E /* CCControlExtensions.h in Headers */, + B6CAB1F31AF9AA1A00B9B856 /* btCollisionAlgorithm.h in Headers */, 15AE1A3519AAD3D500C27E9E /* b2EdgeShape.h in Headers */, + B6CAB3151AF9AA1A00B9B856 /* btBoxCollision.h in Headers */, 50643BD919BFAF4400EF68ED /* CCApplication.h in Headers */, B665E3581AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h in Headers */, + B6CAB2371AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.h in Headers */, B665E3DC1AA80A6600DDB1C5 /* CCPUScriptTranslator.h in Headers */, + B6CAB49B1AF9AA1A00B9B856 /* HeapManager.h in Headers */, 15AE183619AAD2F700C27E9E /* CCObjLoader.h in Headers */, 15AE1BE719AAE01E00C27E9E /* CCTableViewCell.h in Headers */, 15AE1A8919AAD40300C27E9E /* b2PrismaticJoint.h in Headers */, + B6CAB5211AF9AA1A00B9B856 /* btQuaternion.h in Headers */, B665E2341AA80A6500DDB1C5 /* CCPUBoxEmitter.h in Headers */, + B6CAB26F1AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.h in Headers */, B665E3EC1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.h in Headers */, 50ABBD3A1925AB0000A911A9 /* CCAffineTransform.h in Headers */, 15AE186C19AAD31D00C27E9E /* SimpleAudioEngine_objc.h in Headers */, B29A7E2319EE1B7700872B35 /* IkConstraint.h in Headers */, 15AE1BB319AADFEF00C27E9E /* HttpRequest.h in Headers */, + B6CAB3B11AF9AA1A00B9B856 /* btFixedConstraint.h in Headers */, 3823843F1A259140002C4610 /* SingleNodeReader.h in Headers */, + B6CAB35B1AF9AA1A00B9B856 /* gim_memory.h in Headers */, + B6CAB3DF1AF9AA1A00B9B856 /* btTypedConstraint.h in Headers */, 50ABBE571925AB6F00A911A9 /* CCEventFocus.h in Headers */, 1A01C69218F57BE800EFE3A6 /* CCDouble.h in Headers */, 15AE18F919AAD35000C27E9E /* CCBone.h in Headers */, @@ -7257,17 +9318,21 @@ B665E2281AA80A6500DDB1C5 /* CCPUBillboardChain.h in Headers */, 15AE18A919AAD33D00C27E9E /* CCSpriteLoader.h in Headers */, 15AE198419AAD36400C27E9E /* WidgetReaderProtocol.h in Headers */, + B6CAB53D1AF9AA1A00B9B856 /* cl_MiniCL_Defs.h in Headers */, 50ABBEC91925AB6F00A911A9 /* firePngData.h in Headers */, 292DB16119B461CA00A80320 /* ExtensionDeprecated.h in Headers */, 503DD8F51926B0DB00CD74DD /* CCIMEDelegate.h in Headers */, 3EACC9A619F5014D00EB3C5E /* CCLight.h in Headers */, 50ABBD5A1925AB0000A911A9 /* Vec2.h in Headers */, B665E2581AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h in Headers */, + B6CAB50D1AF9AA1A00B9B856 /* btIDebugDraw.h in Headers */, B665E2F81AA80A6500DDB1C5 /* CCPUListener.h in Headers */, + B6CAB3F91AF9AA1A00B9B856 /* btMultiBody.h in Headers */, 15AE1BDB19AAE01E00C27E9E /* CCControlSwitch.h in Headers */, B24AA987195A675C007B4522 /* CCFastTMXLayer.h in Headers */, 15AE188F19AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */, 50ABBEBD1925AB6F00A911A9 /* ccUtils.h in Headers */, + B6CAB4171AF9AA1A00B9B856 /* btMultiBodySolverConstraint.h in Headers */, 15AE19A119AAD39600C27E9E /* TextAtlasReader.h in Headers */, 50ABC0231926664800A911A9 /* CCGLViewImpl-desktop.h in Headers */, 382384231A2590DA002C4610 /* GameMapReader.h in Headers */, @@ -7278,14 +9343,19 @@ 15AE1B5019AADA9900C27E9E /* UILoadingBar.h in Headers */, 50ABBFFD1926664800A911A9 /* CCFileUtils-apple.h in Headers */, 15B3708219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */, + B6CAB2951AF9AA1A00B9B856 /* btCompoundShape.h in Headers */, B665E23C1AA80A6500DDB1C5 /* CCPUCircleEmitter.h in Headers */, + B6CAB2991AF9AA1A00B9B856 /* btConcaveShape.h in Headers */, + B6CAB1E51AF9AA1A00B9B856 /* Bullet-C-Api.h in Headers */, 15B3708619EE414C00ABE682 /* Downloader.h in Headers */, + B6CAB4111AF9AA1A00B9B856 /* btMultiBodyLinkCollider.h in Headers */, B665E36C1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h in Headers */, B665E26C1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.h in Headers */, 5E9F612C1A3FFE3D0038DE01 /* CCPlane.h in Headers */, 5034CA41191D591100CE6051 /* ccShader_Position_uColor.frag in Headers */, 50ABBE7F1925AB6F00A911A9 /* CCEventTouch.h in Headers */, 50ABBE5B1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, + B6CAB2D31AF9AA1A00B9B856 /* btMultiSphereShape.h in Headers */, B665E1F41AA80A6500DDB1C5 /* CCPUAffector.h in Headers */, 1A01C69E18F57BE800EFE3A6 /* CCString.h in Headers */, 15FB206C1AE7BE7400C31518 /* SpritePolygon.h in Headers */, @@ -7301,10 +9371,16 @@ 50ABBE3F1925AB6F00A911A9 /* CCDataVisitor.h in Headers */, 15AE199F19AAD39600C27E9E /* SliderReader.h in Headers */, B665E2641AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h in Headers */, + B6CAB2B91AF9AA1A00B9B856 /* btConvexTriangleMeshShape.h in Headers */, + B6CAB32B1AF9AA1A00B9B856 /* btGImpactCollisionAlgorithm.h in Headers */, + B6CAB24F1AF9AA1A00B9B856 /* btDefaultCollisionConfiguration.h in Headers */, 50ABBD9D1925AB4100A911A9 /* ccGLStateCache.h in Headers */, B665E3241AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h in Headers */, + B6CAB4C11AF9AA1A00B9B856 /* SpuLibspe2Support.h in Headers */, + B6CAB26B1AF9AA1A00B9B856 /* btSphereBoxCollisionAlgorithm.h in Headers */, B29A7E0319EE1B7700872B35 /* BoundingBoxAttachment.h in Headers */, 50ABBEB91925AB6F00A911A9 /* ccUTF8.h in Headers */, + B6CAB3C51AF9AA1A00B9B856 /* btHingeConstraint.h in Headers */, 15AE191A19AAD35000C27E9E /* CCSSceneReader.h in Headers */, B665E2241AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h in Headers */, 292DB13F19B4574100A80320 /* UIEditBox.h in Headers */, @@ -7313,10 +9389,12 @@ 50ABBE671925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */, 15AE18E219AAD35000C27E9E /* TriggerMng.h in Headers */, B665E3CC1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h in Headers */, + B6CAB2D71AF9AA1A00B9B856 /* btOptimizedBvh.h in Headers */, 50ABBE2F1925AB6F00A911A9 /* ccConfig.h in Headers */, 15AE188019AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, 1AAF5851180E40B9000584C8 /* LocalStorage.h in Headers */, 1A01C69018F57BE800EFE3A6 /* CCDictionary.h in Headers */, + B6CAB4ED1AF9AA1A00B9B856 /* vectormath2bullet.h in Headers */, 1A9DCA29180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */, 50ABC0031926664800A911A9 /* CCLock-apple.h in Headers */, 50ABBE2D1925AB6F00A911A9 /* ccCArray.h in Headers */, @@ -7335,37 +9413,53 @@ 15AE189C19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.h in Headers */, 15AE190A19AAD35000C27E9E /* CCDecorativeDisplay.h in Headers */, 50ABBDB31925AB4100A911A9 /* ccShaders.h in Headers */, + B6CAB3831AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.h in Headers */, 50ABBDAB1925AB4100A911A9 /* CCRenderCommandPool.h in Headers */, 5034CA45191D591100CE6051 /* ccShader_Label_outline.frag in Headers */, + B6CAB4311AF9AA1A00B9B856 /* btWheelInfo.h in Headers */, D0FD035F1A3B51AA00825BB5 /* CCAllocatorStrategyPool.h in Headers */, + B6CAB3611AF9AA1A00B9B856 /* gim_tri_collision.h in Headers */, B665E3741AA80A6500DDB1C5 /* CCPUParticleFollower.h in Headers */, 50ABBEB11925AB6F00A911A9 /* CCUserDefault.h in Headers */, B29A7DEF19EE1B7700872B35 /* SkeletonBounds.h in Headers */, D0FD034D1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h in Headers */, 50ABBEC71925AB6F00A911A9 /* etc1.h in Headers */, + B6CAB27B1AF9AA1A00B9B856 /* SphereTriangleDetector.h in Headers */, B29A7E3519EE1B7700872B35 /* AnimationStateData.h in Headers */, B665E2FC1AA80A6500DDB1C5 /* CCPUMaterialManager.h in Headers */, 15AE1BC619AAE00000C27E9E /* AssetsManager.h in Headers */, 50ABBEA91925AB6F00A911A9 /* CCTouch.h in Headers */, + B6CAB51F1AF9AA1A00B9B856 /* btQuadWord.h in Headers */, 15AE1A5E19AAD40300C27E9E /* b2Body.h in Headers */, + B6CAB22F1AF9AA1A00B9B856 /* btCollisionObjectWrapper.h in Headers */, 50ABBE971925AB6F00A911A9 /* CCProtocols.h in Headers */, 50ABC0691926664800A911A9 /* CCStdC-mac.h in Headers */, + B6CAB52F1AF9AA1A00B9B856 /* btStackAlloc.h in Headers */, + B6CAB1F71AF9AA1A00B9B856 /* btDbvt.h in Headers */, B665E34C1AA80A6500DDB1C5 /* CCPUOnPositionObserver.h in Headers */, 501216901AC47380009A4BEA /* CCRenderState.h in Headers */, + B6CAB2091AF9AA1A00B9B856 /* btOverlappingPairCallback.h in Headers */, 15AE1A2B19AAD3D500C27E9E /* b2Distance.h in Headers */, 15AE198919AAD36A00C27E9E /* ButtonReader.h in Headers */, 15AE190219AAD35000C27E9E /* CCComController.h in Headers */, + B6CAB37F1AF9AA1A00B9B856 /* btManifoldPoint.h in Headers */, 15AE18DE19AAD35000C27E9E /* TriggerObj.h in Headers */, 15AE183E19AAD2F700C27E9E /* CCSkeleton3D.h in Headers */, + B6CAB5371AF9AA1A00B9B856 /* btVector3.h in Headers */, + B6CAB2EB1AF9AA1A00B9B856 /* btStaticPlaneShape.h in Headers */, 3EACC9A219F5014D00EB3C5E /* CCCamera.h in Headers */, + B6CAB5331AF9AA1A00B9B856 /* btTransformUtil.h in Headers */, 50ABBECD1925AB6F00A911A9 /* s3tc.h in Headers */, + B6CAB3651AF9AA1A00B9B856 /* btContinuousConvexCollision.h in Headers */, 15AE1BD119AAE01E00C27E9E /* CCControlHuePicker.h in Headers */, D0FD03571A3B51AA00825BB5 /* CCAllocatorMutex.h in Headers */, + B6CAB36D1AF9AA1A00B9B856 /* btDiscreteCollisionDetectorInterface.h in Headers */, 50ABBE771925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */, 5034CA33191D591100CE6051 /* ccShader_PositionTexture_uColor.frag in Headers */, B665E4341AA80A6600DDB1C5 /* CCPUVertexEmitter.h in Headers */, 50ABC0171926664800A911A9 /* CCImage.h in Headers */, 50ABBDA91925AB4100A911A9 /* CCRenderCommand.h in Headers */, + B6CAB3791AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.h in Headers */, 50ABBD951925AB4100A911A9 /* CCGLProgramState.h in Headers */, 50ABC0091926664800A911A9 /* CCCommon.h in Headers */, 50ABBE531925AB6F00A911A9 /* CCEventDispatcher.h in Headers */, @@ -7380,23 +9474,32 @@ files = ( 503DD8F01926736A00CD74DD /* CCStdC-ios.h in Headers */, 15AE1A9A19AAD40300C27E9E /* b2Math.h in Headers */, + B6CAB3221AF9AA1A00B9B856 /* btGenericPoolAllocator.h in Headers */, B665E3851AA80A6500DDB1C5 /* CCPUPathFollower.h in Headers */, 46A170FF1807CECB005B8026 /* CCPhysicsContact.h in Headers */, + B6CAB37E1AF9AA1A00B9B856 /* btGjkPairDetector.h in Headers */, + B6CAB3101AF9AA1A00B9B856 /* btTriangleShape.h in Headers */, + B6CAB5141AF9AA1A00B9B856 /* btMatrixX.h in Headers */, 3EACC9A319F5014D00EB3C5E /* CCCamera.h in Headers */, B29A7E1A19EE1B7700872B35 /* Event.h in Headers */, 15AE1AC719AAD40300C27E9E /* b2GearJoint.h in Headers */, B665E2ED1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.h in Headers */, + B6CAB20A1AF9AA1A00B9B856 /* btOverlappingPairCallback.h in Headers */, 50ABBDA21925AB4100A911A9 /* CCGroupCommand.h in Headers */, 15AE18C219AAD33D00C27E9E /* CCLayerColorLoader.h in Headers */, 50643BDA19BFAF4400EF68ED /* CCApplication.h in Headers */, + B6CAB53A1AF9AA1A00B9B856 /* cl.h in Headers */, 15AE181519AAD2F700C27E9E /* CCAnimationCurve.h in Headers */, + B6CAB28C1AF9AA1A00B9B856 /* btCapsuleShape.h in Headers */, B665E4191AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.h in Headers */, 503DD8EF1926736A00CD74DD /* CCPlatformDefine-ios.h in Headers */, 15AE196919AAD35100C27E9E /* CocoStudio.h in Headers */, 46A171041807CECB005B8026 /* CCPhysicsShape.h in Headers */, 15AE183319AAD2F700C27E9E /* CCOBB.h in Headers */, + B6CAB3E61AF9AA1A00B9B856 /* btActionInterface.h in Headers */, B665E33D1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.h in Headers */, 15AE18B119AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, + B6CAB2AA1AF9AA1A00B9B856 /* btConvexInternalShape.h in Headers */, B665E3791AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.h in Headers */, 292DB14019B4574100A80320 /* UIEditBox.h in Headers */, 50ABBD3B1925AB0000A911A9 /* CCAffineTransform.h in Headers */, @@ -7405,9 +9508,13 @@ B29A7E3A19EE1B7700872B35 /* Animation.h in Headers */, 15FB208C1AE7C57D00C31518 /* utils.h in Headers */, B665E2B51AA80A6500DDB1C5 /* CCPUForceField.h in Headers */, + B6CAB36E1AF9AA1A00B9B856 /* btDiscreteCollisionDetectorInterface.h in Headers */, B665E2D91AA80A6500DDB1C5 /* CCPUJetAffector.h in Headers */, 15B3708319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */, + B6CAB4361AF9AA1A00B9B856 /* btGpu3DGridBroadphase.h in Headers */, D0FD03521A3B51AA00825BB5 /* CCAllocatorGlobal.h in Headers */, + B6CAB3DC1AF9AA1A00B9B856 /* btSolverConstraint.h in Headers */, + B6CAB4B61AF9AA1A00B9B856 /* SpuDoubleBuffer.h in Headers */, B665E3D11AA80A6600DDB1C5 /* CCPUScriptCompiler.h in Headers */, B665E3B91AA80A6500DDB1C5 /* CCPURibbonTrail.h in Headers */, 50ABBE7C1925AB6F00A911A9 /* CCEventMouse.h in Headers */, @@ -7427,54 +9534,81 @@ 15AE19B319AAD39700C27E9E /* SliderReader.h in Headers */, 15AE1B7919AADA9A00C27E9E /* UIRichText.h in Headers */, B665E3C11AA80A6500DDB1C5 /* CCPUScaleAffector.h in Headers */, + B6CAB3BA1AF9AA1A00B9B856 /* btGeneric6DofConstraint.h in Headers */, + B6CAB2F81AF9AA1A00B9B856 /* btTriangleBuffer.h in Headers */, 15AE1A4A19AAD3D500C27E9E /* b2CircleShape.h in Headers */, + B6CAB2A61AF9AA1A00B9B856 /* btConvexHullShape.h in Headers */, 50ABBE861925AB6F00A911A9 /* ccFPSImages.h in Headers */, 15B3708719EE414C00ABE682 /* Downloader.h in Headers */, + B6CAB2BE1AF9AA1A00B9B856 /* btCylinderShape.h in Headers */, + B6CAB3F01AF9AA1A00B9B856 /* btRigidBody.h in Headers */, 15AE192619AAD35100C27E9E /* TriggerObj.h in Headers */, B665E2E51AA80A6500DDB1C5 /* CCPULineAffectorTranslator.h in Headers */, 50ABBE2E1925AB6F00A911A9 /* ccCArray.h in Headers */, + B6CAB2C81AF9AA1A00B9B856 /* btMaterial.h in Headers */, 15B3707B19EE414C00ABE682 /* AssetsManagerEx.h in Headers */, B665E3E91AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.h in Headers */, + B6CAB2001AF9AA1A00B9B856 /* btDispatcher.h in Headers */, + B6CAB2641AF9AA1A00B9B856 /* btManifoldResult.h in Headers */, + B6CAB5161AF9AA1A00B9B856 /* btMinMax.h in Headers */, 15AE1B9119AADA9A00C27E9E /* UIWidget.h in Headers */, + B6CAB4CC1AF9AA1A00B9B856 /* SpuCollisionShapes.h in Headers */, B665E2611AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h in Headers */, 50ABC0041926664800A911A9 /* CCLock-apple.h in Headers */, B29A7DFE19EE1B7700872B35 /* IkConstraintData.h in Headers */, 382384401A259140002C4610 /* SingleNodeReader.h in Headers */, B665E2751AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.h in Headers */, + B6CAB35C1AF9AA1A00B9B856 /* gim_memory.h in Headers */, + B6CAB43A1AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedDefs.h in Headers */, 15AE1A4019AAD3D500C27E9E /* b2Collision.h in Headers */, B665E36D1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.h in Headers */, + B6CAB4061AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.h in Headers */, ED74D76A1A5B8A2600157FD4 /* CCPhysicsHelper.h in Headers */, 5034CA40191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, B665E2891AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */, 15AE184719AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, + B6CAB5101AF9AA1A00B9B856 /* btList.h in Headers */, 15AE1BFC19AAE01E00C27E9E /* CCControlUtils.h in Headers */, 15AE193519AAD35100C27E9E /* CCActionObject.h in Headers */, 15AE1AA919AAD40300C27E9E /* b2TimeStep.h in Headers */, B665E2C91AA80A6500DDB1C5 /* CCPUGravityAffector.h in Headers */, 15AE197A19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */, + B6CAB5301AF9AA1A00B9B856 /* btStackAlloc.h in Headers */, 15AE19B919AAD39700C27E9E /* TextFieldReader.h in Headers */, 15AE181319AAD2F700C27E9E /* CCAnimation3D.h in Headers */, 50ABBEC21925AB6F00A911A9 /* CCValue.h in Headers */, + B6CAB4FE1AF9AA1A00B9B856 /* btConvexHull.h in Headers */, 50ABBECA1925AB6F00A911A9 /* firePngData.h in Headers */, B257B4511989D5E800D9A687 /* CCPrimitive.h in Headers */, 50643BE319BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, B665E27D1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h in Headers */, + B6CAB29E1AF9AA1A00B9B856 /* btConeShape.h in Headers */, 15AE181F19AAD2F700C27E9E /* CCBundle3DData.h in Headers */, 15AE193119AAD35100C27E9E /* CCActionManagerEx.h in Headers */, 15AE185B19AAD31200C27E9E /* CDOpenALSupport.h in Headers */, 50ABBE401925AB6F00A911A9 /* CCDataVisitor.h in Headers */, + B6CAB3401AF9AA1A00B9B856 /* gim_basic_geometry_operations.h in Headers */, 15AE19B719AAD39700C27E9E /* TextBMFontReader.h in Headers */, 1A570064180BC5A10088DEC7 /* CCAction.h in Headers */, + B6CAB4BA1AF9AA1A00B9B856 /* SpuFakeDma.h in Headers */, + B6CAB4BE1AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.h in Headers */, 15AE1BA819AADFDF00C27E9E /* UIRelativeBox.h in Headers */, 503DD8EC1926736A00CD74DD /* CCGLViewImpl-ios.h in Headers */, 15AE18D819AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */, + B6CAB4B41AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.h in Headers */, 15AE18DB19AAD33D00C27E9E /* CocosBuilder.h in Headers */, + B6CAB2601AF9AA1A00B9B856 /* btInternalEdgeUtility.h in Headers */, B665E1F51AA80A6500DDB1C5 /* CCPUAffector.h in Headers */, 15AE1ACD19AAD40300C27E9E /* b2PrismaticJoint.h in Headers */, + B6CAB2B21AF9AA1A00B9B856 /* btConvexPolyhedron.h in Headers */, 50ABBEBA1925AB6F00A911A9 /* ccUTF8.h in Headers */, + B6CAB3A61AF9AA1A00B9B856 /* btConeTwistConstraint.h in Headers */, + B6CAB32E1AF9AA1A00B9B856 /* btGImpactMassUtil.h in Headers */, + B6CAB43C1AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedTypes.h in Headers */, 50643BD619BFAEDA00EF68ED /* CCPlatformDefine.h in Headers */, 1A570068180BC5A10088DEC7 /* CCActionCamera.h in Headers */, B29A7E1E19EE1B7700872B35 /* PolygonBatch.h in Headers */, + B6CAB4E61AF9AA1A00B9B856 /* SpuSampleTaskProcess.h in Headers */, 15AE18BC19AAD33D00C27E9E /* CCControlLoader.h in Headers */, 15AE18C019AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */, 1A57006C180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */, @@ -7482,16 +9616,20 @@ 5034CA3A191D591100CE6051 /* ccShader_PositionColorLengthTexture.frag in Headers */, D0FD034E1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h in Headers */, B665E2A51AA80A6500DDB1C5 /* CCPUEventHandlerManager.h in Headers */, + B6CAB1FC1AF9AA1A00B9B856 /* btDbvtBroadphase.h in Headers */, DABC9FAC19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */, B665E4311AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h in Headers */, + B6CAB2C21AF9AA1A00B9B856 /* btEmptyShape.h in Headers */, B665E3C51AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.h in Headers */, B665E4351AA80A6600DDB1C5 /* CCPUVertexEmitter.h in Headers */, B665E2451AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h in Headers */, + B6CAB3381AF9AA1A00B9B856 /* btQuantization.h in Headers */, 50ABBEC41925AB6F00A911A9 /* CCVector.h in Headers */, 15FB20711AE7BE7400C31518 /* SpritePolygonCache.h in Headers */, 50ABBE501925AB6F00A911A9 /* CCEventCustom.h in Headers */, 15AE1AD719AAD40300C27E9E /* b2WheelJoint.h in Headers */, B665E3311AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h in Headers */, + B6CAB41C1AF9AA1A00B9B856 /* btDantzigLCP.h in Headers */, B665E2051AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h in Headers */, 1A570070180BC5A10088DEC7 /* CCActionEase.h in Headers */, 1A570074180BC5A10088DEC7 /* CCActionGrid.h in Headers */, @@ -7502,7 +9640,10 @@ 50ABBD631925AB0000A911A9 /* Vec4.h in Headers */, B665E3A91AA80A6500DDB1C5 /* CCPURandomiser.h in Headers */, 15AE19AF19AAD39700C27E9E /* PageViewReader.h in Headers */, + B6CAB29A1AF9AA1A00B9B856 /* btConcaveShape.h in Headers */, + B6CAB2AE1AF9AA1A00B9B856 /* btConvexPointCloudShape.h in Headers */, B29A7DD419EE1B7700872B35 /* Skin.h in Headers */, + B6CAB2221AF9AA1A00B9B856 /* btBoxBoxDetector.h in Headers */, B29A7E2419EE1B7700872B35 /* IkConstraint.h in Headers */, 1A01C68918F57BE800EFE3A6 /* CCBool.h in Headers */, B665E2851AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h in Headers */, @@ -7515,8 +9656,10 @@ 382384121A259092002C4610 /* NodeReaderDefine.h in Headers */, 50ABBE781925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */, 15AE1BC019AADFF000C27E9E /* WebSocket.h in Headers */, + B6CAB1E21AF9AA1A00B9B856 /* btBulletCollisionCommon.h in Headers */, B665E2FD1AA80A6500DDB1C5 /* CCPUMaterialManager.h in Headers */, 3823840A1A25900F002C4610 /* FlatBuffersSerialize.h in Headers */, + B6CAB3C61AF9AA1A00B9B856 /* btHingeConstraint.h in Headers */, 1A570080180BC5A10088DEC7 /* CCActionInterval.h in Headers */, B665E2A11AA80A6500DDB1C5 /* CCPUEventHandler.h in Headers */, 15AE192D19AAD35100C27E9E /* CCActionFrame.h in Headers */, @@ -7524,8 +9667,15 @@ 1A570084180BC5A10088DEC7 /* CCActionManager.h in Headers */, B665E3151AA80A6500DDB1C5 /* CCPUObserverManager.h in Headers */, 15AE18C619AAD33D00C27E9E /* CCLayerLoader.h in Headers */, + B6CAB4A41AF9AA1A00B9B856 /* PpuAddressSpace.h in Headers */, + B6CAB2041AF9AA1A00B9B856 /* btMultiSapBroadphase.h in Headers */, B665E2C51AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.h in Headers */, + B6CAB2781AF9AA1A00B9B856 /* btUnionFind.h in Headers */, + B6CAB4A81AF9AA1A00B9B856 /* SequentialThreadSupport.h in Headers */, + B6CAB2D81AF9AA1A00B9B856 /* btOptimizedBvh.h in Headers */, + B6CAB3DA1AF9AA1A00B9B856 /* btSolverBody.h in Headers */, 50ABC0141926664800A911A9 /* CCGLView.h in Headers */, + B6CAB5341AF9AA1A00B9B856 /* btTransformUtil.h in Headers */, 1A570088180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */, 15AE1B9319AADA9A00C27E9E /* UIHelper.h in Headers */, 50ABBD9E1925AB4100A911A9 /* ccGLStateCache.h in Headers */, @@ -7533,25 +9683,32 @@ B665E30D1AA80A6500DDB1C5 /* CCPUNoise.h in Headers */, 15AE1B9619AADA9A00C27E9E /* CocosGUI.h in Headers */, 1A57008C180BC5A10088DEC7 /* CCActionProgressTimer.h in Headers */, + B6CAB3FE1AF9AA1A00B9B856 /* btMultiBodyConstraint.h in Headers */, B665E21D1AA80A6500DDB1C5 /* CCPUBehaviour.h in Headers */, 1A570090180BC5A10088DEC7 /* CCActionTiledGrid.h in Headers */, B665E2A91AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h in Headers */, + B6CAB41E1AF9AA1A00B9B856 /* btDantzigSolver.h in Headers */, DA8C62A519E52C6400000516 /* ioapi_mem.h in Headers */, + B6CAB2B61AF9AA1A00B9B856 /* btConvexShape.h in Headers */, 1A570094180BC5A10088DEC7 /* CCActionTween.h in Headers */, 1A57009B180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, 15AE184919AAD2F700C27E9E /* cocos3d.h in Headers */, 1A5700A1180BC5D20088DEC7 /* CCNode.h in Headers */, 15AE181919AAD2F700C27E9E /* CCAttachNode.h in Headers */, + B6CAB23C1AF9AA1A00B9B856 /* btCompoundCompoundCollisionAlgorithm.h in Headers */, 292DB14C19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */, 15AE1BF019AAE01E00C27E9E /* CCControlHuePicker.h in Headers */, B665E3611AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.h in Headers */, B665E3111AA80A6500DDB1C5 /* CCPUObserver.h in Headers */, 15AE18B819AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */, B665E2311AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.h in Headers */, + B6CAB4DE1AF9AA1A00B9B856 /* SpuPreferredPenetrationDirections.h in Headers */, 503DD8E41926736A00CD74DD /* CCDirectorCaller-ios.h in Headers */, 15AE198119AAD35700C27E9E /* CCTimelineMacro.h in Headers */, B29A7E0219EE1B7700872B35 /* extension.h in Headers */, + B6CAB2A21AF9AA1A00B9B856 /* btConvex2dShape.h in Headers */, B665E24D1AA80A6500DDB1C5 /* CCPUColorAffector.h in Headers */, + B6CAB4D61AF9AA1A00B9B856 /* SpuGatheringCollisionTask.h in Headers */, 15AE1B7719AADA9A00C27E9E /* UIPageView.h in Headers */, 50ABBD8A1925AB4100A911A9 /* CCCustomCommand.h in Headers */, 299754F7193EC95400A54AC3 /* ObjectFactory.h in Headers */, @@ -7560,32 +9717,45 @@ B665E3991AA80A6500DDB1C5 /* CCPUPointEmitter.h in Headers */, B29A7E4019EE1B7700872B35 /* AnimationState.h in Headers */, 50ABC0101926664800A911A9 /* CCFileUtils.h in Headers */, + B6CAB53C1AF9AA1A00B9B856 /* cl_gl.h in Headers */, 15AE19A919AAD39700C27E9E /* LayoutReader.h in Headers */, B665E29D1AA80A6500DDB1C5 /* CCPUEmitterTranslator.h in Headers */, 15AE1B7B19AADA9A00C27E9E /* UIScrollView.h in Headers */, 5034CA30191D591100CE6051 /* ccShader_PositionTexture.vert in Headers */, 382384391A259126002C4610 /* ProjectNodeReader.h in Headers */, 1A570111180BC8EE0088DEC7 /* CCDrawingPrimitives.h in Headers */, + B6CAB5121AF9AA1A00B9B856 /* btMatrix3x3.h in Headers */, 50ABBE381925AB6F00A911A9 /* CCConsole.h in Headers */, + B6CAB3EA1AF9AA1A00B9B856 /* btDiscreteDynamicsWorld.h in Headers */, 50ABBE8A1925AB6F00A911A9 /* CCMap.h in Headers */, B665E32D1AA80A6500DDB1C5 /* CCPUOnCountObserver.h in Headers */, 503DD8E61926736A00CD74DD /* CCEAGLView-ios.h in Headers */, 50ABBE4C1925AB6F00A911A9 /* CCEventAcceleration.h in Headers */, B665E2F91AA80A6500DDB1C5 /* CCPUListener.h in Headers */, + B6CAB4F41AF9AA1A00B9B856 /* btAabbUtil2.h in Headers */, 50ABBD571925AB0000A911A9 /* TransformUtils.h in Headers */, B665E2711AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h in Headers */, 1A570115180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, + B6CAB2341AF9AA1A00B9B856 /* btCollisionWorld.h in Headers */, 1A57011E180BC90D0088DEC7 /* CCGrabber.h in Headers */, + B6CAB4A21AF9AA1A00B9B856 /* PosixThreadSupport.h in Headers */, + B6CAB3061AF9AA1A00B9B856 /* btTriangleInfoMap.h in Headers */, 1A570122180BC90D0088DEC7 /* CCGrid.h in Headers */, 15AE1AB319AAD40300C27E9E /* b2CircleContact.h in Headers */, + B6CAB3161AF9AA1A00B9B856 /* btBoxCollision.h in Headers */, 5034CA2E191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, + B6CAB31A1AF9AA1A00B9B856 /* btCompoundFromGimpact.h in Headers */, 15AE1A4F19AAD3D500C27E9E /* b2Shape.h in Headers */, 29394CF519B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */, 50ABBD5B1925AB0000A911A9 /* Vec2.h in Headers */, D0FD035E1A3B51AA00825BB5 /* CCAllocatorStrategyGlobalSmallBlock.h in Headers */, 50ABBD411925AB0000A911A9 /* CCMath.h in Headers */, 1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */, + B6CAB2EC1AF9AA1A00B9B856 /* btStaticPlaneShape.h in Headers */, + B6CAB2DC1AF9AA1A00B9B856 /* btPolyhedralConvexShape.h in Headers */, 292DB14819B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */, + B6CAB54A1AF9AA1A00B9B856 /* MiniCLTaskScheduler.h in Headers */, + B6CAB3621AF9AA1A00B9B856 /* gim_tri_collision.h in Headers */, 3E2BDADE19C030ED0055CDCD /* AudioEngine.h in Headers */, B665E3011AA80A6500DDB1C5 /* CCPUMaterialTranslator.h in Headers */, 50ABBD9A1925AB4100A911A9 /* CCGLProgramStateCache.h in Headers */, @@ -7597,35 +9767,47 @@ B60C5BD719AC68B10056FBDE /* CCBillBoard.h in Headers */, B230ED7419B417AE00364AA8 /* CCTrianglesCommand.h in Headers */, B665E2911AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.h in Headers */, + B6CAB3D01AF9AA1A00B9B856 /* btSequentialImpulseConstraintSolver.h in Headers */, 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */, 15AE1ACB19AAD40300C27E9E /* b2MouseJoint.h in Headers */, B665E3491AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.h in Headers */, 50ABBD3F1925AB0000A911A9 /* CCGeometry.h in Headers */, + B6CAB4F21AF9AA1A00B9B856 /* Win32ThreadSupport.h in Headers */, B665E3291AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.h in Headers */, B29A7DD019EE1B7700872B35 /* RegionAttachment.h in Headers */, D0FD034A1A3B51AA00825BB5 /* CCAllocatorBase.h in Headers */, + B6CAB51E1AF9AA1A00B9B856 /* btPoolAllocator.h in Headers */, 15AE1AD319AAD40300C27E9E /* b2RopeJoint.h in Headers */, + B6CAB3581AF9AA1A00B9B856 /* gim_math.h in Headers */, 50ABBFFE1926664800A911A9 /* CCFileUtils-apple.h in Headers */, 15AE1AAD19AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, 1A5701A4180BCB590088DEC7 /* CCFontAtlas.h in Headers */, + B6CAB4C41AF9AA1A00B9B856 /* Box.h in Headers */, 15AE1C0219AAE01E00C27E9E /* CCScrollView.h in Headers */, 1A5701A8180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */, B665E3E51AA80A6600DDB1C5 /* CCPUSineForceAffector.h in Headers */, 182C5CE81A9D725400C30D34 /* UserCameraReader.h in Headers */, 15AE1A4C19AAD3D500C27E9E /* b2EdgeShape.h in Headers */, + B6CAB39C1AF9AA1A00B9B856 /* btVoronoiSimplexSolver.h in Headers */, + B6CAB2701AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.h in Headers */, 1A5701B4180BCB590088DEC7 /* CCFontFNT.h in Headers */, 15AE18D419AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */, B665E3411AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h in Headers */, + B6CAB5041AF9AA1A00B9B856 /* btDefaultMotionState.h in Headers */, + B6CAB52A1AF9AA1A00B9B856 /* btScalar.h in Headers */, B29A7DFA19EE1B7700872B35 /* Json.h in Headers */, 3823842B1A2590F9002C4610 /* NodeReader.h in Headers */, + B6CAB3241AF9AA1A00B9B856 /* btGeometryOperations.h in Headers */, 1A5701B8180BCB5A0088DEC7 /* CCFontFreeType.h in Headers */, 15AE182719AAD2F700C27E9E /* CCMesh.h in Headers */, + B6CAB1EC1AF9AA1A00B9B856 /* btBroadphaseInterface.h in Headers */, 15AE199319AAD37300C27E9E /* ImageViewReader.h in Headers */, B665E2791AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.h in Headers */, 15AE1A4819AAD3D500C27E9E /* b2ChainShape.h in Headers */, B665E3091AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h in Headers */, 15AE18CB19AAD33D00C27E9E /* CCMenuLoader.h in Headers */, B665E4011AA80A6600DDB1C5 /* CCPUSphereCollider.h in Headers */, + B6CAB31E1AF9AA1A00B9B856 /* btContactProcessing.h in Headers */, 1A5701BC180BCB5A0088DEC7 /* CCLabel.h in Headers */, B665E2D51AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h in Headers */, 1A5701C0180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */, @@ -7633,34 +9815,55 @@ 50ABBE681925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */, B665E2AD1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.h in Headers */, 15AE196B19AAD35100C27E9E /* DictionaryHelper.h in Headers */, + B6CAB4C21AF9AA1A00B9B856 /* SpuLibspe2Support.h in Headers */, + B6CAB5021AF9AA1A00B9B856 /* btConvexHullComputer.h in Headers */, B665E2411AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.h in Headers */, + B6CAB2BA1AF9AA1A00B9B856 /* btConvexTriangleMeshShape.h in Headers */, 15AE1AA619AAD40300C27E9E /* b2Fixture.h in Headers */, + B6CAB3C21AF9AA1A00B9B856 /* btHinge2Constraint.h in Headers */, + B6CAB2121AF9AA1A00B9B856 /* btSimpleBroadphase.h in Headers */, + B6CAB4EE1AF9AA1A00B9B856 /* vectormath2bullet.h in Headers */, 15AE1BBA19AADFF000C27E9E /* HttpClient.h in Headers */, + B6CAB2241AF9AA1A00B9B856 /* btCollisionConfiguration.h in Headers */, 292DB14619B4574100A80320 /* UIEditBoxImpl-android.h in Headers */, + B6CAB49E1AF9AA1A00B9B856 /* PlatformDefinitions.h in Headers */, B665E2DD1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h in Headers */, 15AE1B9419AADA9A00C27E9E /* GUIDefine.h in Headers */, + B6CAB3E41AF9AA1A00B9B856 /* btUniversalConstraint.h in Headers */, 15AE183B19AAD2F700C27E9E /* CCRay.h in Headers */, 5034CA42191D591100CE6051 /* ccShader_Position_uColor.frag in Headers */, 1A5701C4180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */, + B6CAB4D01AF9AA1A00B9B856 /* SpuContactResult.h in Headers */, 15AE193F19AAD35100C27E9E /* CCBatchNode.h in Headers */, B665E37D1AA80A6500DDB1C5 /* CCPUParticleSystem3D.h in Headers */, B665E25D1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.h in Headers */, + B6CAB3141AF9AA1A00B9B856 /* btUniformScalingShape.h in Headers */, B665E39D1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.h in Headers */, + B6CAB4261AF9AA1A00B9B856 /* btPATHSolver.h in Headers */, 15AE1C1819AAE2C700C27E9E /* CCPhysicsSprite.h in Headers */, 15AE1BC819AAE00000C27E9E /* AssetsManager.h in Headers */, B665E2E11AA80A6500DDB1C5 /* CCPULineAffector.h in Headers */, B29A7E0419EE1B7700872B35 /* BoundingBoxAttachment.h in Headers */, + B6CAB51C1AF9AA1A00B9B856 /* btPolarDecomposition.h in Headers */, 52B47A2E1A5349A3004E4C60 /* HttpAsynConnection.h in Headers */, + B6CAB2E41AF9AA1A00B9B856 /* btShapeHull.h in Headers */, 15AE1BBC19AADFF000C27E9E /* HttpResponse.h in Headers */, 15AE186019AAD31200C27E9E /* SimpleAudioEngine_objc.h in Headers */, 50ABBDA61925AB4100A911A9 /* CCQuadCommand.h in Headers */, 15AE1BB019AADFDF00C27E9E /* UILayoutManager.h in Headers */, + B6CAB2E01AF9AA1A00B9B856 /* btScaledBvhTriangleMeshShape.h in Headers */, 50ABBE9E1925AB6F00A911A9 /* CCRefPtr.h in Headers */, 15AE18DA19AAD33D00C27E9E /* CCSpriteLoader.h in Headers */, + B6CAB4401AF9AA1A00B9B856 /* btGpuUtilsSharedCode.h in Headers */, 15AE196219AAD35100C27E9E /* CCSSceneReader.h in Headers */, 1A01C69518F57BE800EFE3A6 /* CCFloat.h in Headers */, B665E2011AA80A6500DDB1C5 /* CCPUAlignAffector.h in Headers */, + B6CAB49C1AF9AA1A00B9B856 /* HeapManager.h in Headers */, 1A5701CA180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */, + B6CAB25C1AF9AA1A00B9B856 /* btHashedSimplePairCache.h in Headers */, + B6CAB5201AF9AA1A00B9B856 /* btQuadWord.h in Headers */, + B6CAB4E21AF9AA1A00B9B856 /* SpuSampleTask.h in Headers */, + B6CAB5221AF9AA1A00B9B856 /* btQuaternion.h in Headers */, 50643BDC19BFAF4400EF68ED /* CCStdC.h in Headers */, 5034CA22191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */, 15AE1B8E19AADA9A00C27E9E /* UIDeprecated.h in Headers */, @@ -7682,17 +9885,24 @@ 15AE1AB119AAD40300C27E9E /* b2ChainAndPolygonContact.h in Headers */, B665E4211AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.h in Headers */, 501216911AC47380009A4BEA /* CCRenderState.h in Headers */, + B6CAB2081AF9AA1A00B9B856 /* btOverlappingPairCache.h in Headers */, 1A5701E1180BCB8C0088DEC7 /* CCLayer.h in Headers */, + B6CAB40E1AF9AA1A00B9B856 /* btMultiBodyJointMotor.h in Headers */, + B6CAB2801AF9AA1A00B9B856 /* btBox2dShape.h in Headers */, + B6CAB2541AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.h in Headers */, B665E3691AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.h in Headers */, 15AE1BEE19AAE01E00C27E9E /* CCControlExtensions.h in Headers */, 1A5701E5180BCB8C0088DEC7 /* CCScene.h in Headers */, + B6CAB2F41AF9AA1A00B9B856 /* btTetrahedronShape.h in Headers */, 1A5701E9180BCB8C0088DEC7 /* CCTransition.h in Headers */, 15AE198F19AAD36E00C27E9E /* CheckBoxReader.h in Headers */, B665E3911AA80A6500DDB1C5 /* CCPUPlaneCollider.h in Headers */, 382384011A258FA7002C4610 /* util.h in Headers */, 18956BB51A9DFBFD006E9155 /* Particle3DReader.h in Headers */, + B6CAB34A1AF9AA1A00B9B856 /* gim_clip_polygon.h in Headers */, B665E3F91AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.h in Headers */, B665E2551AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h in Headers */, + B6CAB4161AF9AA1A00B9B856 /* btMultiBodyPoint2Point.h in Headers */, 50ABBED41925AB6F00A911A9 /* uthash.h in Headers */, B665E3AD1AA80A6500DDB1C5 /* CCPURandomiserTranslator.h in Headers */, B29A7E0A19EE1B7700872B35 /* AttachmentLoader.h in Headers */, @@ -7705,9 +9915,12 @@ 1A5701FE180BCBAD0088DEC7 /* CCMenuItem.h in Headers */, 50ABC00C1926664800A911A9 /* CCDevice.h in Headers */, 1A570205180BCBD40088DEC7 /* CCClippingNode.h in Headers */, + B6CAB3041AF9AA1A00B9B856 /* btTriangleIndexVertexMaterialArray.h in Headers */, 15AE1B8919AADA9A00C27E9E /* UICheckBox.h in Headers */, + B6CAB2161AF9AA1A00B9B856 /* btActivatingCollisionAlgorithm.h in Headers */, 5034CA34191D591100CE6051 /* ccShader_PositionTexture_uColor.frag in Headers */, B665E40D1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.h in Headers */, + B6CAB38A1AF9AA1A00B9B856 /* btPointCollector.h in Headers */, B29A7DF819EE1B7700872B35 /* Attachment.h in Headers */, 15AE197C19AAD35700C27E9E /* CCFrame.h in Headers */, B665E31D1AA80A6500DDB1C5 /* CCPUOnClearObserver.h in Headers */, @@ -7718,11 +9931,15 @@ B665E2651AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.h in Headers */, 15FB208A1AE7C57D00C31518 /* shapes.h in Headers */, 50ABBEA21925AB6F00A911A9 /* CCScheduler.h in Headers */, + B6CAB38E1AF9AA1A00B9B856 /* btPolyhedralContactClipping.h in Headers */, 1A57020B180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, B665E2211AA80A6500DDB1C5 /* CCPUBehaviourManager.h in Headers */, 15AE195219AAD35100C27E9E /* CCDecorativeDisplay.h in Headers */, 15AE196619AAD35100C27E9E /* CCTween.h in Headers */, 15AE194619AAD35100C27E9E /* CCComAttribute.h in Headers */, + B6CAB5181AF9AA1A00B9B856 /* btMotionState.h in Headers */, + B6CAAFE51AF9A9E100B9B856 /* CCPhysics3D.h in Headers */, + B6CAB1F41AF9AA1A00B9B856 /* btCollisionAlgorithm.h in Headers */, 382384241A2590DA002C4610 /* GameMapReader.h in Headers */, 15AE1ABD19AAD40300C27E9E /* b2PolygonAndCircleContact.h in Headers */, 15AE1AA819AAD40300C27E9E /* b2Island.h in Headers */, @@ -7733,11 +9950,14 @@ 38F526431A48363B000DB7F7 /* CSArmatureNode_generated.h in Headers */, 1A570217180BCBF40088DEC7 /* CCRenderTexture.h in Headers */, B603F1AB1AC8EA0900A9579C /* CCTerrain.h in Headers */, + B6CAB5461AF9AA1A00B9B856 /* MiniCLTask.h in Headers */, 15AE1ABB19AAD40300C27E9E /* b2EdgeAndPolygonContact.h in Headers */, 15AE198719AAD36400C27E9E /* WidgetReaderProtocol.h in Headers */, B665E3ED1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.h in Headers */, + B6CAB42C1AF9AA1A00B9B856 /* btRaycastVehicle.h in Headers */, 15AE198619AAD36400C27E9E /* WidgetReader.h in Headers */, 1A570224180BCC1A0088DEC7 /* CCParticleBatchNode.h in Headers */, + B6CAB32C1AF9AA1A00B9B856 /* btGImpactCollisionAlgorithm.h in Headers */, 15FB20961AE7C57D00C31518 /* cdt.h in Headers */, 15AE1AC919AAD40300C27E9E /* b2Joint.h in Headers */, 382383EF1A258FA7002C4610 /* flatbuffers.h in Headers */, @@ -7746,38 +9966,53 @@ 15AE196819AAD35100C27E9E /* CCUtilMath.h in Headers */, B29A7E2019EE1B7700872B35 /* BoneData.h in Headers */, 503DD8F61926B0DB00CD74DD /* CCIMEDelegate.h in Headers */, + B6CAAFED1AF9A9E100B9B856 /* CCPhysics3DConstraint.h in Headers */, 1A570228180BCC1A0088DEC7 /* CCParticleExamples.h in Headers */, B665E4391AA80A6600DDB1C5 /* CCPUVortexAffector.h in Headers */, 1A57022C180BCC1A0088DEC7 /* CCParticleSystem.h in Headers */, + B6CAB26C1AF9AA1A00B9B856 /* btSphereBoxCollisionAlgorithm.h in Headers */, B665E4291AA80A6600DDB1C5 /* CCPUUtil.h in Headers */, 15AE1BAC19AADFDF00C27E9E /* UILayout.h in Headers */, 1A570230180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 382383F31A258FA7002C4610 /* idl.h in Headers */, 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */, + B6CAB4EC1AF9AA1A00B9B856 /* TrbStateVec.h in Headers */, 15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */, 15AE1AB919AAD40300C27E9E /* b2EdgeAndCircleContact.h in Headers */, 15AE1B7319AADA9A00C27E9E /* UIListView.h in Headers */, 15AE192A19AAD35100C27E9E /* TriggerMng.h in Headers */, 5034CA2C191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */, + B6CAB2741AF9AA1A00B9B856 /* btSphereTriangleCollisionAlgorithm.h in Headers */, 50ABBE981925AB6F00A911A9 /* CCProtocols.h in Headers */, + B6CAB3801AF9AA1A00B9B856 /* btManifoldPoint.h in Headers */, 50CB247A19D9C5A100687767 /* AudioEngine-inl.h in Headers */, 52B47A321A5349A3004E4C60 /* HttpCookie.h in Headers */, 50ABBD431925AB0000A911A9 /* CCMathBase.h in Headers */, 15EFA214198A2BB5000C57D3 /* CCProtectedNode.h in Headers */, + B6CAB2261AF9AA1A00B9B856 /* btCollisionCreateFunc.h in Headers */, 15AE194419AAD35100C27E9E /* CCComBase.h in Headers */, 15AE1A3B19AAD3D500C27E9E /* b2BroadPhase.h in Headers */, 15AE195619AAD35100C27E9E /* CCDisplayManager.h in Headers */, 15AE1B8719AADA9A00C27E9E /* UIButton.h in Headers */, 38F526411A48363B000DB7F7 /* ArmatureNodeReader.h in Headers */, + B6CAB3981AF9AA1A00B9B856 /* btSubSimplexConvexCast.h in Headers */, 50ABBE441925AB6F00A911A9 /* CCDirector.h in Headers */, + B6CAB3321AF9AA1A00B9B856 /* btGImpactQuantizedBvh.h in Headers */, 5034CA4A191D591100CE6051 /* ccShader_Label_df.frag in Headers */, + B6CAB1E41AF9AA1A00B9B856 /* btBulletDynamicsCommon.h in Headers */, + B6CAB2301AF9AA1A00B9B856 /* btCollisionObjectWrapper.h in Headers */, + B6CAB3B61AF9AA1A00B9B856 /* btGearConstraint.h in Headers */, + B6CAB20E1AF9AA1A00B9B856 /* btQuantizedBvh.h in Headers */, B665E2591AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.h in Headers */, B665E1F91AA80A6500DDB1C5 /* CCPUAffectorManager.h in Headers */, B665E2351AA80A6500DDB1C5 /* CCPUBoxEmitter.h in Headers */, + B6CAB36C1AF9AA1A00B9B856 /* btConvexPenetrationDepthSolver.h in Headers */, + B6CAB4281AF9AA1A00B9B856 /* btSolveProjectedGaussSeidel.h in Headers */, 15AE1B7519AADA9A00C27E9E /* UILoadingBar.h in Headers */, 15AE1BF219AAE01E00C27E9E /* CCControlPotentiometer.h in Headers */, 15AE1BEB19AAE01E00C27E9E /* CCControlButton.h in Headers */, + B6CAB1F81AF9AA1A00B9B856 /* btDbvt.h in Headers */, B665E35D1AA80A6500DDB1C5 /* CCPUOnRandomObserver.h in Headers */, 1A570281180BCC900088DEC7 /* CCSprite.h in Headers */, 1A570285180BCC900088DEC7 /* CCSpriteBatchNode.h in Headers */, @@ -7785,37 +10020,51 @@ 1A570289180BCC900088DEC7 /* CCSpriteFrame.h in Headers */, 15AE1B7F19AADA9A00C27E9E /* UIText.h in Headers */, B29A7E3419EE1B7700872B35 /* SlotData.h in Headers */, + B6CAAFF91AF9A9E100B9B856 /* CCPhysics3DShape.h in Headers */, B665E3D51AA80A6600DDB1C5 /* CCPUScriptLexer.h in Headers */, 50ABBE701925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */, 15AE18B619AAD33D00C27E9E /* CCBSequence.h in Headers */, 15AE1A9819AAD40300C27E9E /* b2GrowableStack.h in Headers */, 1A57028D180BCC900088DEC7 /* CCSpriteFrameCache.h in Headers */, 1A570295180BCCAB0088DEC7 /* CCAnimation.h in Headers */, + B6CAB21E1AF9AA1A00B9B856 /* btBoxBoxCollisionAlgorithm.h in Headers */, + B6CAB50A1AF9AA1A00B9B856 /* btGrahamScan2dConvexHull.h in Headers */, B665E2D11AA80A6500DDB1C5 /* CCPUInterParticleCollider.h in Headers */, 50ABBDB81925AB4100A911A9 /* CCTexture2D.h in Headers */, + B6CAB2581AF9AA1A00B9B856 /* btGhostObject.h in Headers */, 15AE1AAB19AAD40300C27E9E /* b2World.h in Headers */, 15AE180F19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, 50ABBE341925AB6F00A911A9 /* CCConfiguration.h in Headers */, B68778FF1A8CA82E00643ABF /* CCParticle3DEmitter.h in Headers */, 1A570299180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */, + B6CAB42E1AF9AA1A00B9B856 /* btVehicleRaycaster.h in Headers */, B665E2B11AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.h in Headers */, + B6CAB2E81AF9AA1A00B9B856 /* btSphereShape.h in Headers */, 15AE1ABF19AAD40300C27E9E /* b2PolygonContact.h in Headers */, 50ABBEAA1925AB6F00A911A9 /* CCTouch.h in Headers */, 15AE1BAE19AADFDF00C27E9E /* UILayoutParameter.h in Headers */, 15AE18C819AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */, + B6CAB3AC1AF9AA1A00B9B856 /* btContactConstraint.h in Headers */, B665E2491AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.h in Headers */, + B6CAB4461AF9AA1A00B9B856 /* btParallelConstraintSolver.h in Headers */, 15AE18D119AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */, 15AE1AC319AAD40300C27E9E /* b2DistanceJoint.h in Headers */, + B6CAB5261AF9AA1A00B9B856 /* btQuickprof.h in Headers */, 50ABBE741925AB6F00A911A9 /* CCEventListenerMouse.h in Headers */, D0FD03581A3B51AA00825BB5 /* CCAllocatorMutex.h in Headers */, B29A7E1219EE1B7700872B35 /* EventData.h in Headers */, 1A5702CB180BCE370088DEC7 /* CCTextFieldTTF.h in Headers */, 1A5702ED180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */, 15AE195E19AAD35100C27E9E /* CCSkin.h in Headers */, + B6CAB3CC1AF9AA1A00B9B856 /* btPoint2PointConstraint.h in Headers */, + B6CAB5081AF9AA1A00B9B856 /* btGeometryUtil.h in Headers */, 1A5702F1180BCE750088DEC7 /* CCTMXLayer.h in Headers */, 15FB20771AE7BF8600C31518 /* MarchingSquare.h in Headers */, + B6CAB4F81AF9AA1A00B9B856 /* btAlignedAllocator.h in Headers */, 15AE18AE19AAD33D00C27E9E /* CCBFileLoader.h in Headers */, + B6CAB2D41AF9AA1A00B9B856 /* btMultiSphereShape.h in Headers */, 15AE197819AAD35700C27E9E /* CCActionTimeline.h in Headers */, + B6CAAFF11AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h in Headers */, 15FB206D1AE7BE7400C31518 /* SpritePolygon.h in Headers */, 15AE1AA019AAD40300C27E9E /* b2Timer.h in Headers */, 5034CA44191D591100CE6051 /* ccShader_Label.vert in Headers */, @@ -7830,102 +10079,153 @@ 15AE1AC519AAD40300C27E9E /* b2FrictionJoint.h in Headers */, 15AE1B8D19AADA9A00C27E9E /* UIScale9Sprite.h in Headers */, 15AE18AC19AAD33D00C27E9E /* CCBAnimationManager.h in Headers */, + B6CAB2841AF9AA1A00B9B856 /* btBoxShape.h in Headers */, 292DB14219B4574100A80320 /* UIEditBoxImpl.h in Headers */, + B6CAB5321AF9AA1A00B9B856 /* btTransform.h in Headers */, 1A570303180BCE890088DEC7 /* CCParallaxNode.h in Headers */, 50ABBE2A1925AB6F00A911A9 /* CCAutoreleasePool.h in Headers */, + B6CAAFFD1AF9A9E100B9B856 /* CCPhysics3DWorld.h in Headers */, 501216971AC47393009A4BEA /* CCPass.h in Headers */, 1A57030F180BCF190088DEC7 /* CCComponent.h in Headers */, B665E22D1AA80A6500DDB1C5 /* CCPUBoxCollider.h in Headers */, + B6CAB22E1AF9AA1A00B9B856 /* btCollisionObject.h in Headers */, 15AE1AD519AAD40300C27E9E /* b2WeldJoint.h in Headers */, 15AE18B019AAD33D00C27E9E /* CCBKeyframe.h in Headers */, 15AE18C419AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */, + B6CAB1EA1AF9AA1A00B9B856 /* btAxisSweep3.h in Headers */, B665E3511AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h in Headers */, + B6CAB3A21AF9AA1A00B9B856 /* btKinematicCharacterController.h in Headers */, 1A570313180BCF190088DEC7 /* CCComponentContainer.h in Headers */, + B6CAB5381AF9AA1A00B9B856 /* btVector3.h in Headers */, + B6CAB4DC1AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.h in Headers */, B665E2F51AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h in Headers */, 1A087AEB1860400400196EF5 /* edtaa3func.h in Headers */, B665E3751AA80A6500DDB1C5 /* CCPUParticleFollower.h in Headers */, + B6CAB4B01AF9AA1A00B9B856 /* SpuCollisionTaskProcess.h in Headers */, 15AE185D19AAD31200C27E9E /* CocosDenshion.h in Headers */, + B6CAB3661AF9AA1A00B9B856 /* btContinuousConvexCollision.h in Headers */, 15AE194319AAD35100C27E9E /* CCColliderDetector.h in Headers */, 382F7ADF1AB1292A002EBECF /* CCObjectExtensionData.h in Headers */, + B6CAB3A81AF9AA1A00B9B856 /* btConstraintSolver.h in Headers */, D0FD035C1A3B51AA00825BB5 /* CCAllocatorStrategyFixedBlock.h in Headers */, 15AE1BC419AADFFB00C27E9E /* ExtensionMacros.h in Headers */, 15AE185A19AAD31200C27E9E /* CDConfig.h in Headers */, B29A7DE819EE1B7700872B35 /* spine.h in Headers */, + B6CAB50E1AF9AA1A00B9B856 /* btIDebugDraw.h in Headers */, 1A57034E180BD09B0088DEC7 /* tinyxml2.h in Headers */, 15AE1BFE19AAE01E00C27E9E /* CCInvocation.h in Headers */, 15AE1A9E19AAD40300C27E9E /* b2StackAllocator.h in Headers */, 1A570357180BD0B00088DEC7 /* ioapi.h in Headers */, + B6CAB3AE1AF9AA1A00B9B856 /* btContactSolverInfo.h in Headers */, 50ABBD4B1925AB0000A911A9 /* Mat4.h in Headers */, B665E3891AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.h in Headers */, + B6CAB53E1AF9AA1A00B9B856 /* cl_MiniCL_Defs.h in Headers */, + B6CAB22A1AF9AA1A00B9B856 /* btCollisionDispatcher.h in Headers */, + B6CAB0011AF9A9E100B9B856 /* CCPhysicsSprite3D.h in Headers */, 15AE1BBE19AADFF000C27E9E /* SocketIO.h in Headers */, B665E3351AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h in Headers */, B665E3811AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h in Headers */, + B6CAB4D21AF9AA1A00B9B856 /* SpuConvexPenetrationDepthSolver.h in Headers */, B665E2151AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h in Headers */, 1A01C69B18F57BE800EFE3A6 /* CCSet.h in Headers */, B665E4051AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.h in Headers */, 50ABBED61925AB6F00A911A9 /* utlist.h in Headers */, 1A57035B180BD0B00088DEC7 /* unzip.h in Headers */, + B6CAB44A1AF9AA1A00B9B856 /* btThreadSupportInterface.h in Headers */, + B6CAB3FA1AF9AA1A00B9B856 /* btMultiBody.h in Headers */, 15AE1BA619AADFDF00C27E9E /* UIHBox.h in Headers */, + B6CAB2881AF9AA1A00B9B856 /* btBvhTriangleMeshShape.h in Headers */, + 505385031B01887A00793096 /* CCProperties.h in Headers */, 15AE1A9519AAD40300C27E9E /* b2BlockAllocator.h in Headers */, 5034CA48191D591100CE6051 /* ccShader_Label_normal.frag in Headers */, + B6CAB30A1AF9AA1A00B9B856 /* btTriangleMesh.h in Headers */, + B6CAB4241AF9AA1A00B9B856 /* btMLCPSolverInterface.h in Headers */, + B6CAB4421AF9AA1A00B9B856 /* btGpuUtilsSharedDefs.h in Headers */, 15AE183F19AAD2F700C27E9E /* CCSkeleton3D.h in Headers */, 50ABBD531925AB0000A911A9 /* Quaternion.h in Headers */, 5012169D1AC473A3009A4BEA /* CCTechnique.h in Headers */, + B6CAB5281AF9AA1A00B9B856 /* btRandom.h in Headers */, 15AE19B119AAD39700C27E9E /* ScrollViewReader.h in Headers */, 503DD8E81926736A00CD74DD /* CCES2Renderer-ios.h in Headers */, B665E41D1AA80A6600DDB1C5 /* CCPUTextureRotator.h in Headers */, B665E34D1AA80A6500DDB1C5 /* CCPUOnPositionObserver.h in Headers */, + B6CAB4181AF9AA1A00B9B856 /* btMultiBodySolverConstraint.h in Headers */, + B6CAB3B21AF9AA1A00B9B856 /* btFixedConstraint.h in Headers */, 50ABBE6C1925AB6F00A911A9 /* CCEventListenerFocus.h in Headers */, 5034CA3E191D591100CE6051 /* ccShader_PositionColor.frag in Headers */, + B6CAB3761AF9AA1A00B9B856 /* btGjkEpa2.h in Headers */, 182C5CD91A98F30500C30D34 /* Sprite3DReader.h in Headers */, 50ABBE301925AB6F00A911A9 /* ccConfig.h in Headers */, 15AE195819AAD35100C27E9E /* CCInputDelegate.h in Headers */, + B6CAB3281AF9AA1A00B9B856 /* btGImpactBvh.h in Headers */, 50ABBDAC1925AB4100A911A9 /* CCRenderCommandPool.h in Headers */, + B6CAB24C1AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.h in Headers */, B665E3CD1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h in Headers */, + B6CAB4321AF9AA1A00B9B856 /* btWheelInfo.h in Headers */, B665E3711AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.h in Headers */, 5034CA3C191D591100CE6051 /* ccShader_PositionColor.vert in Headers */, B665E3F51AA80A6600DDB1C5 /* CCPUSlaveEmitter.h in Headers */, 50ABC0181926664800A911A9 /* CCImage.h in Headers */, B665E2B91AA80A6500DDB1C5 /* CCPUForceFieldAffector.h in Headers */, + B6CAB4221AF9AA1A00B9B856 /* btMLCPSolver.h in Headers */, 15AE1A4E19AAD3D500C27E9E /* b2PolygonShape.h in Headers */, + B6CAB3481AF9AA1A00B9B856 /* gim_box_set.h in Headers */, 382384471A25915C002C4610 /* SpriteReader.h in Headers */, 50ABBE8E1925AB6F00A911A9 /* CCNS.h in Headers */, B665E3051AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.h in Headers */, 15AE1AB519AAD40300C27E9E /* b2Contact.h in Headers */, B665E23D1AA80A6500DDB1C5 /* CCPUCircleEmitter.h in Headers */, 50ABBEA61925AB6F00A911A9 /* CCScriptSupport.h in Headers */, + B6CAB33C1AF9AA1A00B9B856 /* btTriangleShapeEx.h in Headers */, 46C02E0A18E91123004B7456 /* xxhash.h in Headers */, + B6CAB39E1AF9AA1A00B9B856 /* btCharacterControllerInterface.h in Headers */, 5034CA4C191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */, + B6CAB2441AF9AA1A00B9B856 /* btConvexConcaveCollisionAlgorithm.h in Headers */, 503DD8EB1926736A00CD74DD /* CCGL-ios.h in Headers */, B665E4091AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.h in Headers */, + B6CAB2F01AF9AA1A00B9B856 /* btStridingMeshInterface.h in Headers */, 50ABBE3C1925AB6F00A911A9 /* CCData.h in Headers */, + B6CAB33E1AF9AA1A00B9B856 /* gim_array.h in Headers */, + B6CAB4AC1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.h in Headers */, + B6CAB2501AF9AA1A00B9B856 /* btDefaultCollisionConfiguration.h in Headers */, 503DD8FA1926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */, + B6CAB3921AF9AA1A00B9B856 /* btRaycastCallback.h in Headers */, + B6CAB3721AF9AA1A00B9B856 /* btGjkConvexCast.h in Headers */, + B6CAB4FA1AF9AA1A00B9B856 /* btAlignedObjectArray.h in Headers */, B29A7DE619EE1B7700872B35 /* SkeletonAnimation.h in Headers */, B665E3591AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.h in Headers */, 50ABBEC81925AB6F00A911A9 /* etc1.h in Headers */, + B6CAB3D81AF9AA1A00B9B856 /* btSolve2LinearConstraint.h in Headers */, 50ABBDB01925AB4100A911A9 /* CCRenderer.h in Headers */, + B6CAB3421AF9AA1A00B9B856 /* gim_bitset.h in Headers */, B29594B71926D5EC003EEF37 /* CCMeshCommand.h in Headers */, 3E6176771960F89B00DE83F5 /* CCEventListenerController.h in Headers */, 50ABBD861925AB4100A911A9 /* CCBatchCommand.h in Headers */, 15AE18CA19AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */, + B6CAB28E1AF9AA1A00B9B856 /* btCollisionMargin.h in Headers */, 50ABBE481925AB6F00A911A9 /* CCEvent.h in Headers */, 5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */, 15AE1A9719AAD40300C27E9E /* b2Draw.h in Headers */, 3E6176691960F89B00DE83F5 /* CCController.h in Headers */, + B6CAB43E1AF9AA1A00B9B856 /* btGpuDefines.h in Headers */, 3823841D1A2590D2002C4610 /* ComAudioReader.h in Headers */, 3E6176781960F89B00DE83F5 /* CCGameController.h in Headers */, + B6CAB4C81AF9AA1A00B9B856 /* boxBoxDistance.h in Headers */, 15AE19BB19AAD39700C27E9E /* TextReader.h in Headers */, 50ABBE641925AB6F00A911A9 /* CCEventListenerAcceleration.h in Headers */, 15AE180B19AAD2F700C27E9E /* CCAABB.h in Headers */, 50ABBD921925AB4100A911A9 /* CCGLProgramCache.h in Headers */, + B6CAB30E1AF9AA1A00B9B856 /* btTriangleMeshShape.h in Headers */, 50ABBE961925AB6F00A911A9 /* CCProfiling.h in Headers */, 15AE19B519AAD39700C27E9E /* TextAtlasReader.h in Headers */, 15AE18D619AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */, 15AE182B19AAD2F700C27E9E /* CCMeshSkin.h in Headers */, B665E2251AA80A6500DDB1C5 /* CCPUBehaviourTranslator.h in Headers */, B665E3651AA80A6500DDB1C5 /* CCPUOnTimeObserver.h in Headers */, + B6CAB1E61AF9AA1A00B9B856 /* Bullet-C-Api.h in Headers */, 15AE1B7D19AADA9A00C27E9E /* UISlider.h in Headers */, 503DD8E01926736A00CD74DD /* CCApplication-ios.h in Headers */, + B6CAB4021AF9AA1A00B9B856 /* btMultiBodyConstraintSolver.h in Headers */, B665E4111AA80A6600DDB1C5 /* CCPUTechniqueTranslator.h in Headers */, 15AE1B8319AADA9A00C27E9E /* UITextBMFont.h in Headers */, B29A7E2A19EE1B7700872B35 /* SkeletonData.h in Headers */, @@ -7937,6 +10237,7 @@ D0FD03601A3B51AA00825BB5 /* CCAllocatorStrategyPool.h in Headers */, 15AE198019AAD35700C27E9E /* CCTimeLine.h in Headers */, 38B8E2E419E671D2002D7CE7 /* UILayoutComponent.h in Headers */, + B6CAB2481AF9AA1A00B9B856 /* btConvexConvexAlgorithm.h in Headers */, B665E2CD1AA80A6500DDB1C5 /* CCPUGravityAffectorTranslator.h in Headers */, 50ABBD4F1925AB0000A911A9 /* MathUtil.h in Headers */, 1A01C69718F57BE800EFE3A6 /* CCInteger.h in Headers */, @@ -7944,6 +10245,8 @@ 15AE1C0619AAE01E00C27E9E /* CCTableViewCell.h in Headers */, B665E4251AA80A6600DDB1C5 /* CCPUTranslateManager.h in Headers */, 15AE19AB19AAD39700C27E9E /* ListViewReader.h in Headers */, + 5053850F1B02819E00793096 /* CCVertexAttribBinding.h in Headers */, + B6CAB4121AF9AA1A00B9B856 /* btMultiBodyLinkCollider.h in Headers */, 50ABBEBE1925AB6F00A911A9 /* ccUtils.h in Headers */, 15AE183719AAD2F700C27E9E /* CCObjLoader.h in Headers */, 15AE18CF19AAD33D00C27E9E /* CCNodeLoader.h in Headers */, @@ -7952,11 +10255,14 @@ 299CF1FE19A434BC00C378C1 /* ccRandom.h in Headers */, B665E3BD1AA80A6500DDB1C5 /* CCPURibbonTrailRender.h in Headers */, 50ABBDBC1925AB4100A911A9 /* CCTextureAtlas.h in Headers */, + B6CAAFE91AF9A9E100B9B856 /* CCPhysics3DComponent.h in Headers */, 15AE182319AAD2F700C27E9E /* CCBundleReader.h in Headers */, 182C5CB51A95964F00C30D34 /* Node3DReader.h in Headers */, 50ABBE541925AB6F00A911A9 /* CCEventDispatcher.h in Headers */, 1A12775A18DFCC4F0005F345 /* CCTweenFunction.h in Headers */, 15AE192819AAD35100C27E9E /* TriggerBase.h in Headers */, + B6CAB2401AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.h in Headers */, + B6CAB3441AF9AA1A00B9B856 /* gim_box_collision.h in Headers */, B665E3F11AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.h in Headers */, 15AE1BF419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */, 15AE1AD119AAD40300C27E9E /* b2RevoluteJoint.h in Headers */, @@ -7967,25 +10273,38 @@ B276EF601988D1D500CD400F /* CCVertexIndexData.h in Headers */, 50ABBD5F1925AB0000A911A9 /* Vec3.h in Headers */, 50ABBE821925AB6F00A911A9 /* CCEventType.h in Headers */, + B6CAB4101AF9AA1A00B9B856 /* btMultiBodyLink.h in Headers */, + B6CAB36A1AF9AA1A00B9B856 /* btConvexCast.h in Headers */, 15AE194C19AAD35100C27E9E /* CCComRender.h in Headers */, B665E2C11AA80A6500DDB1C5 /* CCPUGeometryRotator.h in Headers */, 1AAF5852180E40B9000584C8 /* LocalStorage.h in Headers */, 50CB247619D9C5A100687767 /* AudioCache.h in Headers */, + B6CAB2C61AF9AA1A00B9B856 /* btHeightfieldTerrainShape.h in Headers */, B29A7DDA19EE1B7700872B35 /* SkeletonRenderer.h in Headers */, 15AE194119AAD35100C27E9E /* CCBone.h in Headers */, D0FD035A1A3B51AA00825BB5 /* CCAllocatorStrategyDefault.h in Headers */, 50ABBD471925AB0000A911A9 /* CCVertex.h in Headers */, + B6CAB4D81AF9AA1A00B9B856 /* SpuLocalSupport.h in Headers */, + B6CAB2921AF9AA1A00B9B856 /* btCollisionShape.h in Headers */, + B6CAB2681AF9AA1A00B9B856 /* btSimulationIslandManager.h in Headers */, B665E3251AA80A6500DDB1C5 /* CCPUOnCollisionObserver.h in Headers */, + B6CAB3181AF9AA1A00B9B856 /* btClipPolygon.h in Headers */, + B6CAB3001AF9AA1A00B9B856 /* btTriangleIndexVertexArray.h in Headers */, + B6CAB3881AF9AA1A00B9B856 /* btPersistentManifold.h in Headers */, B68779031A8CA82E00643ABF /* CCParticle3DRender.h in Headers */, 15AE195A19AAD35100C27E9E /* CCProcessBase.h in Headers */, 15AE193D19AAD35100C27E9E /* CCArmatureDefine.h in Headers */, + B6CAB37A1AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.h in Headers */, + B6CAB21A1AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.h in Headers */, 382384041A259005002C4610 /* CSParseBinary_generated.h in Headers */, + B6CAB5401AF9AA1A00B9B856 /* cl_platform.h in Headers */, 15AE1A4219AAD3D500C27E9E /* b2Distance.h in Headers */, 15AE195419AAD35100C27E9E /* CCDisplayFactory.h in Headers */, 1A9DCA2A180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */, 1A01C69F18F57BE800EFE3A6 /* CCString.h in Headers */, 464AD6E8197EBB1400E502D8 /* pvr.h in Headers */, 15AE1AC119AAD40300C27E9E /* b2MotorJoint.h in Headers */, + B6CAB40A1AF9AA1A00B9B856 /* btMultiBodyJointLimitConstraint.h in Headers */, 15AE194819AAD35100C27E9E /* CCComAudio.h in Headers */, 1A01C69118F57BE800EFE3A6 /* CCDictionary.h in Headers */, B665E3211AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h in Headers */, @@ -7993,12 +10312,21 @@ B24AA98C195A675C007B4522 /* CCFastTMXTiledMap.h in Headers */, B29A7DEC19EE1B7700872B35 /* MeshAttachment.h in Headers */, 50ABBEAE1925AB6F00A911A9 /* ccTypes.h in Headers */, + B6CAB50C1AF9AA1A00B9B856 /* btHashMap.h in Headers */, 15AE185819AAD31200C27E9E /* CDAudioManager.h in Headers */, + B6CAB3841AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.h in Headers */, B665E38D1AA80A6500DDB1C5 /* CCPUPlane.h in Headers */, + B6CAB3501AF9AA1A00B9B856 /* gim_geom_types.h in Headers */, + B6CAB3941AF9AA1A00B9B856 /* btSimplexSolverInterface.h in Headers */, 15AE1BF819AAE01E00C27E9E /* CCControlStepper.h in Headers */, 50ABBE261925AB6F00A911A9 /* base64.h in Headers */, + B6CAB4E81AF9AA1A00B9B856 /* SpuSync.h in Headers */, + B6CAB2381AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.h in Headers */, 15AE1C1619AAE2C700C27E9E /* CCPhysicsDebugNode.h in Headers */, 15AE1BF619AAE01E00C27E9E /* CCControlSlider.h in Headers */, + B6CAB27C1AF9AA1A00B9B856 /* SphereTriangleDetector.h in Headers */, + B6CAB3D41AF9AA1A00B9B856 /* btSliderConstraint.h in Headers */, + B6CAB4381AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedCode.h in Headers */, B665E2091AA80A6500DDB1C5 /* CCPUBaseCollider.h in Headers */, 1A01C68718F57BE800EFE3A6 /* CCArray.h in Headers */, B665E3DD1AA80A6600DDB1C5 /* CCPUScriptTranslator.h in Headers */, @@ -8014,14 +10342,23 @@ B665E2511AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.h in Headers */, B29A7E1019EE1B7700872B35 /* SkeletonJson.h in Headers */, 15AE184B19AAD30500C27E9E /* Export.h in Headers */, + B6CAB2D01AF9AA1A00B9B856 /* btMultimaterialTriangleMeshShape.h in Headers */, + B6CAB3541AF9AA1A00B9B856 /* gim_hash_table.h in Headers */, + B6CAB2961AF9AA1A00B9B856 /* btCompoundShape.h in Headers */, 15AE196019AAD35100C27E9E /* CCSpriteFrameCacheHelper.h in Headers */, 50ABBE221925AB6F00A911A9 /* atitc.h in Headers */, B665E3E11AA80A6600DDB1C5 /* CCPUSimpleSpline.h in Headers */, + B6CAB3C81AF9AA1A00B9B856 /* btJacobianEntry.h in Headers */, 15AE1AB719AAD40300C27E9E /* b2ContactSolver.h in Headers */, B665E3451AA80A6500DDB1C5 /* CCPUOnExpireObserver.h in Headers */, 15AE193319AAD35100C27E9E /* CCActionNode.h in Headers */, + B6CAB1F01AF9AA1A00B9B856 /* btBroadphaseProxy.h in Headers */, + B6CAAFF51AF9A9E100B9B856 /* CCPhysics3DObject.h in Headers */, + B6CAB35E1AF9AA1A00B9B856 /* gim_radixsort.h in Headers */, 50ABBED21925AB6F00A911A9 /* TGAlib.h in Headers */, B665E2951AA80A6500DDB1C5 /* CCPUEmitter.h in Headers */, + B6CAB3BE1AF9AA1A00B9B856 /* btGeneric6DofSpringConstraint.h in Headers */, + B6CAB3521AF9AA1A00B9B856 /* gim_geometry.h in Headers */, 15AE1BED19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */, 15AE195019AAD35100C27E9E /* CCDatas.h in Headers */, 15AE18B319AAD33D00C27E9E /* CCBReader.h in Headers */, @@ -8037,6 +10374,7 @@ 1A01C68D18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, B665E2E91AA80A6500DDB1C5 /* CCPULinearForceAffector.h in Headers */, 382384321A259112002C4610 /* ParticleReader.h in Headers */, + B6CAB52E1AF9AA1A00B9B856 /* btSerializer.h in Headers */, B665E28D1AA80A6500DDB1C5 /* CCPUDynamicAttribute.h in Headers */, B29A7E3619EE1B7700872B35 /* AnimationStateData.h in Headers */, 503DD8EA1926736A00CD74DD /* CCESRenderer-ios.h in Headers */, @@ -8045,6 +10383,7 @@ 15AE196419AAD35100C27E9E /* CCTransformHelp.h in Headers */, 15AE1AAF19AAD40300C27E9E /* b2ChainAndCircleContact.h in Headers */, B665E2991AA80A6500DDB1C5 /* CCPUEmitterManager.h in Headers */, + B6CAB34E1AF9AA1A00B9B856 /* gim_contact.h in Headers */, 15AE1B9719AADAA100C27E9E /* UIVideoPlayer.h in Headers */, 15AE18BE19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */, 50ABC00A1926664800A911A9 /* CCCommon.h in Headers */, @@ -8052,15 +10391,20 @@ 15FB209E1AE7C57D00C31518 /* sweep_context.h in Headers */, 50ABBE5C1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, B665E2191AA80A6500DDB1C5 /* CCPUBeamRender.h in Headers */, + B6CAB3F41AF9AA1A00B9B856 /* btSimpleDynamicsWorld.h in Headers */, 5E9F612D1A3FFE3D0038DE01 /* CCPlane.h in Headers */, B665E3391AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.h in Headers */, B665E4151AA80A6600DDB1C5 /* CCPUTextureAnimator.h in Headers */, 50ABC01C1926664800A911A9 /* CCSAXParser.h in Headers */, + B6CAB4EA1AF9AA1A00B9B856 /* TrbDynBody.h in Headers */, 503DD8F11926736A00CD74DD /* OpenGL_Internal-ios.h in Headers */, + B6CAB3EC1AF9AA1A00B9B856 /* btDynamicsWorld.h in Headers */, 38ACD1FF1A27111900C3093D /* WidgetCallBackHandlerProtocol.h in Headers */, B29A7DF619EE1B7700872B35 /* Skeleton.h in Headers */, + B6CAB3E01AF9AA1A00B9B856 /* btTypedConstraint.h in Headers */, 50ABBDAA1925AB4100A911A9 /* CCRenderCommand.h in Headers */, B29A7DF019EE1B7700872B35 /* SkeletonBounds.h in Headers */, + B6CAB3361AF9AA1A00B9B856 /* btGImpactShape.h in Headers */, 15AE1BE919AAE01E00C27E9E /* CCControl.h in Headers */, 15AE193719AAD35100C27E9E /* CCArmature.h in Headers */, B63990CF1A490AFE00B07923 /* CCAsyncTaskPool.h in Headers */, @@ -8070,8 +10414,11 @@ B665E2291AA80A6500DDB1C5 /* CCPUBillboardChain.h in Headers */, 50ABBE601925AB6F00A911A9 /* CCEventListener.h in Headers */, 4D76BE3D1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */, + B6CAB2CC1AF9AA1A00B9B856 /* btMinkowskiSumShape.h in Headers */, + B6CAB3561AF9AA1A00B9B856 /* gim_linear_math.h in Headers */, 50ABBEB21925AB6F00A911A9 /* CCUserDefault.h in Headers */, 15AE198B19AAD36A00C27E9E /* ButtonReader.h in Headers */, + B6CAB2FC1AF9AA1A00B9B856 /* btTriangleCallback.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -8147,6 +10494,7 @@ 15AE1A9019AAD40300C27E9E /* b2WeldJoint.cpp in Sources */, 50ABBE2B1925AB6F00A911A9 /* ccCArray.cpp in Sources */, 382383F41A258FA7002C4610 /* idl_gen_cpp.cpp in Sources */, + B6CAAFEA1AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp in Sources */, B29A7E3B19EE1B7700872B35 /* Animation.c in Sources */, 15AE1BDE19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, B665E2F21AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp in Sources */, @@ -8154,15 +10502,18 @@ B29A7E0B19EE1B7700872B35 /* Atlas.c in Sources */, 15AE199419AAD39600C27E9E /* LayoutReader.cpp in Sources */, 1A01C68A18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, + B6CAB2F51AF9AA1A00B9B856 /* btTriangleBuffer.cpp in Sources */, 1A1645B0191B726C008C7C7F /* ConvertUTF.c in Sources */, 15AE1BE219AAE01E00C27E9E /* CCScrollView.cpp in Sources */, 50ABBD581925AB0000A911A9 /* Vec2.cpp in Sources */, 15AE18E119AAD35000C27E9E /* TriggerMng.cpp in Sources */, + B6CAB2811AF9AA1A00B9B856 /* btBoxShape.cpp in Sources */, 50ABBE311925AB6F00A911A9 /* CCConfiguration.cpp in Sources */, B665E3821AA80A6500DDB1C5 /* CCPUPathFollower.cpp in Sources */, 1A01C6A418F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */, 15AE1A5D19AAD40300C27E9E /* b2Body.cpp in Sources */, 15AE1BDA19AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */, + B6CAB3B71AF9AA1A00B9B856 /* btGeneric6DofConstraint.cpp in Sources */, 46A170EA1807CECA005B8026 /* CCPhysicsJoint.cpp in Sources */, 15AE18DC19AAD35000C27E9E /* CocoLoader.cpp in Sources */, 15AE1B4D19AADA9900C27E9E /* UIListView.cpp in Sources */, @@ -8176,6 +10527,7 @@ 15AE198219AAD36400C27E9E /* WidgetReader.cpp in Sources */, B665E3EA1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.cpp in Sources */, 46A170EF1807CECA005B8026 /* CCPhysicsWorld.cpp in Sources */, + B6CAB3BB1AF9AA1A00B9B856 /* btGeneric6DofSpringConstraint.cpp in Sources */, 15AE18E419AAD35000C27E9E /* CCActionFrame.cpp in Sources */, B665E21A1AA80A6500DDB1C5 /* CCPUBehaviour.cpp in Sources */, B665E29E1AA80A6500DDB1C5 /* CCPUEventHandler.cpp in Sources */, @@ -8184,31 +10536,43 @@ B665E1FA1AA80A6500DDB1C5 /* CCPUAffectorTranslator.cpp in Sources */, 50ABBE991925AB6F00A911A9 /* CCRef.cpp in Sources */, 15AE186319AAD31D00C27E9E /* CDAudioManager.m in Sources */, + B6CAB2411AF9AA1A00B9B856 /* btConvexConcaveCollisionAlgorithm.cpp in Sources */, ED9C6A9418599AD8000A5232 /* CCNodeGrid.cpp in Sources */, 15AE1A2C19AAD3D500C27E9E /* b2DynamicTree.cpp in Sources */, B665E36A1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp in Sources */, B665E3961AA80A6500DDB1C5 /* CCPUPointEmitter.cpp in Sources */, 15AE184019AAD2F700C27E9E /* CCSprite3D.cpp in Sources */, + B6CAB2E51AF9AA1A00B9B856 /* btSphereShape.cpp in Sources */, + B6CAB41F1AF9AA1A00B9B856 /* btMLCPSolver.cpp in Sources */, 46A170E61807CECA005B8026 /* CCPhysicsBody.cpp in Sources */, B665E40A1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp in Sources */, 50ABBDA71925AB4100A911A9 /* CCRenderCommand.cpp in Sources */, B665E35E1AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp in Sources */, + B6CAB2931AF9AA1A00B9B856 /* btCompoundShape.cpp in Sources */, + B6CAB3A31AF9AA1A00B9B856 /* btConeTwistConstraint.cpp in Sources */, B665E24E1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp in Sources */, + B6CAB1E71AF9AA1A00B9B856 /* btAxisSweep3.cpp in Sources */, + B6CAB2D91AF9AA1A00B9B856 /* btPolyhedralConvexShape.cpp in Sources */, B6D38B8E1AC3AFAC00043997 /* CCTextureCube.cpp in Sources */, 15AE1B9B19AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */, B665E3E21AA80A6600DDB1C5 /* CCPUSineForceAffector.cpp in Sources */, 50ABBD501925AB0000A911A9 /* Quaternion.cpp in Sources */, + B6CAB2751AF9AA1A00B9B856 /* btUnionFind.cpp in Sources */, B665E36E1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp in Sources */, 15AE190119AAD35000C27E9E /* CCComController.cpp in Sources */, + B6CAB4071AF9AA1A00B9B856 /* btMultiBodyJointLimitConstraint.cpp in Sources */, + B6CAB38F1AF9AA1A00B9B856 /* btRaycastCallback.cpp in Sources */, 15AE1BE619AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */, 50ABBEBB1925AB6F00A911A9 /* ccUtils.cpp in Sources */, 15AE186A19AAD31D00C27E9E /* CocosDenshion.m in Sources */, + B6CAB3F71AF9AA1A00B9B856 /* btMultiBody.cpp in Sources */, B665E3C21AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.cpp in Sources */, B665E34A1AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp in Sources */, 15AE198C19AAD36E00C27E9E /* CheckBoxReader.cpp in Sources */, B665E4261AA80A6600DDB1C5 /* CCPUUtil.cpp in Sources */, 15AE1B6319AADA9900C27E9E /* UICheckBox.cpp in Sources */, 15EFA211198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */, + B6CAB3771AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.cpp in Sources */, 15FB208F1AE7C57D00C31518 /* advancing_front.cc in Sources */, 50ABBEB71925AB6F00A911A9 /* ccUTF8.cpp in Sources */, B665E2621AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp in Sources */, @@ -8226,25 +10590,34 @@ B665E3061AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.cpp in Sources */, 15AE1A3019AAD3D500C27E9E /* b2ChainShape.cpp in Sources */, 50ABBE8B1925AB6F00A911A9 /* CCNS.cpp in Sources */, + B6CAB2651AF9AA1A00B9B856 /* btSimulationIslandManager.cpp in Sources */, 15AE1BD819AAE01E00C27E9E /* CCControlStepper.cpp in Sources */, + B6CAB3851AF9AA1A00B9B856 /* btPersistentManifold.cpp in Sources */, 46A170E81807CECA005B8026 /* CCPhysicsContact.cpp in Sources */, 1A570061180BC5A10088DEC7 /* CCAction.cpp in Sources */, + B6CAB4431AF9AA1A00B9B856 /* btParallelConstraintSolver.cpp in Sources */, 15AE1BDC19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */, B29A7DE919EE1B7700872B35 /* EventData.c in Sources */, 50ABBEC51925AB6F00A911A9 /* etc1.cpp in Sources */, 50643BDE19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */, 15AE1B5B19AADA9900C27E9E /* UITextAtlas.cpp in Sources */, + B6CAB2F11AF9AA1A00B9B856 /* btTetrahedronShape.cpp in Sources */, B603F1A81AC8EA0900A9579C /* CCTerrain.cpp in Sources */, + B6CAB2691AF9AA1A00B9B856 /* btSphereBoxCollisionAlgorithm.cpp in Sources */, 1A570065180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, + B6CAAFF21AF9A9E100B9B856 /* CCPhysics3DObject.cpp in Sources */, + B6CAB23D1AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.cpp in Sources */, 50ABBEAB1925AB6F00A911A9 /* ccTypes.cpp in Sources */, B665E3AE1AA80A6500DDB1C5 /* CCPURender.cpp in Sources */, 15AE18A219AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, 15AE188C19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, + B6CAAFE21AF9A9E100B9B856 /* CCPhysics3D.cpp in Sources */, DA8C62A219E52C6400000516 /* ioapi_mem.cpp in Sources */, B68779001A8CA82E00643ABF /* CCParticle3DRender.cpp in Sources */, 1A570069180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, B257B44E1989D5E800D9A687 /* CCPrimitive.cpp in Sources */, 299CF1FB19A434BC00C378C1 /* ccRandom.cpp in Sources */, + B6CAB4D91AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.cpp in Sources */, B665E3CE1AA80A6600DDB1C5 /* CCPUScriptCompiler.cpp in Sources */, 15AE18E819AAD35000C27E9E /* CCActionManagerEx.cpp in Sources */, B29A7DDB19EE1B7700872B35 /* Event.c in Sources */, @@ -8253,8 +10626,10 @@ 1A57006D180BC5A10088DEC7 /* CCActionEase.cpp in Sources */, 15AE1A5019AAD40300C27E9E /* b2BlockAllocator.cpp in Sources */, B665E20E1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp in Sources */, + B6CAB25D1AF9AA1A00B9B856 /* btInternalEdgeUtility.cpp in Sources */, 15AE1A8219AAD40300C27E9E /* b2GearJoint.cpp in Sources */, 1A570071180BC5A10088DEC7 /* CCActionGrid.cpp in Sources */, + B6CAB2F91AF9AA1A00B9B856 /* btTriangleCallback.cpp in Sources */, 50CB247F19D9C5A100687767 /* AudioPlayer.mm in Sources */, 50ABBFFF1926664800A911A9 /* CCFileUtils-apple.mm in Sources */, 1A570075180BC5A10088DEC7 /* CCActionGrid3D.cpp in Sources */, @@ -8263,6 +10638,7 @@ 382384131A259092002C4610 /* NodeReaderProtocol.cpp in Sources */, B665E2C21AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp in Sources */, 15AE1A5F19AAD40300C27E9E /* b2ContactManager.cpp in Sources */, + B6CAB2451AF9AA1A00B9B856 /* btConvexConvexAlgorithm.cpp in Sources */, 15AE1B9D19AADFDF00C27E9E /* UIVBox.cpp in Sources */, B665E2B61AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp in Sources */, 1A570079180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, @@ -8279,8 +10655,11 @@ B665E2761AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp in Sources */, 1A570081180BC5A10088DEC7 /* CCActionManager.cpp in Sources */, 15AE1A6119AAD40300C27E9E /* b2Fixture.cpp in Sources */, + 505385041B01887A00793096 /* CCProperties.cpp in Sources */, 1A570085180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */, + B6CAB2B71AF9AA1A00B9B856 /* btConvexTriangleMeshShape.cpp in Sources */, 382384441A25915C002C4610 /* SpriteReader.cpp in Sources */, + B6CAB3291AF9AA1A00B9B856 /* btGImpactCollisionAlgorithm.cpp in Sources */, 1A570089180BC5A10088DEC7 /* CCActionProgressTimer.cpp in Sources */, B665E3A61AA80A6500DDB1C5 /* CCPURandomiser.cpp in Sources */, B665E3CA1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp in Sources */, @@ -8290,9 +10669,12 @@ B665E2961AA80A6500DDB1C5 /* CCPUEmitterManager.cpp in Sources */, 1A570091180BC5A10088DEC7 /* CCActionTween.cpp in Sources */, 15AE188419AAD33D00C27E9E /* CCBSequence.cpp in Sources */, + B6CAB2171AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.cpp in Sources */, 50ABBEBF1925AB6F00A911A9 /* CCValue.cpp in Sources */, 1A570098180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, 1A57009E180BC5D20088DEC7 /* CCNode.cpp in Sources */, + B6CAB3CD1AF9AA1A00B9B856 /* btSequentialImpulseConstraintSolver.cpp in Sources */, + B6CAB5191AF9AA1A00B9B856 /* btPolarDecomposition.cpp in Sources */, 50ED2BD919BE5D5D00A0AB90 /* CCEventListenerController.cpp in Sources */, B665E2321AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp in Sources */, B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */, @@ -8300,27 +10682,39 @@ 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayer-ios.mm in Sources */, B665E32A1AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp in Sources */, 15AE1B5F19AADA9900C27E9E /* UITextField.cpp in Sources */, + B6CAB29B1AF9AA1A00B9B856 /* btConeShape.cpp in Sources */, 15AE187C19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */, + B6CAB3B31AF9AA1A00B9B856 /* btGearConstraint.cpp in Sources */, + B6CAB4031AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.cpp in Sources */, B665E3F21AA80A6600DDB1C5 /* CCPUSlaveEmitter.cpp in Sources */, 50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */, D0FD034B1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp in Sources */, + B6CAB3E11AF9AA1A00B9B856 /* btUniversalConstraint.cpp in Sources */, 15AE189B19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */, 15AE183819AAD2F700C27E9E /* CCRay.cpp in Sources */, 50ABBE391925AB6F00A911A9 /* CCData.cpp in Sources */, 1A57010E180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */, + B6CAB3D11AF9AA1A00B9B856 /* btSliderConstraint.cpp in Sources */, 50ABBED71925AB6F00A911A9 /* ZipUtils.cpp in Sources */, B665E3B61AA80A6500DDB1C5 /* CCPURibbonTrail.cpp in Sources */, + B6CAAFF61AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */, + B6CAB3071AF9AA1A00B9B856 /* btTriangleMesh.cpp in Sources */, B29A7E1319EE1B7700872B35 /* Bone.c in Sources */, B665E1F61AA80A6500DDB1C5 /* CCPUAffectorManager.cpp in Sources */, 292DB14919B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, + B6CAB2511AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.cpp in Sources */, 15AE181019AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */, 1A01C68418F57BE800EFE3A6 /* CCArray.cpp in Sources */, 1A570112180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */, + B6CAB4B11AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp in Sources */, 15AE186D19AAD31D00C27E9E /* SimpleAudioEngine_objc.m in Sources */, + B6CAB2D11AF9AA1A00B9B856 /* btMultiSphereShape.cpp in Sources */, 1A57011B180BC90D0088DEC7 /* CCGrabber.cpp in Sources */, + B6CAB3951AF9AA1A00B9B856 /* btSubSimplexConvexCast.cpp in Sources */, B29A7E3719EE1B7700872B35 /* AnimationStateData.c in Sources */, 15AE182419AAD2F700C27E9E /* CCMesh.cpp in Sources */, 15AE190D19AAD35000C27E9E /* CCDisplayManager.cpp in Sources */, + B6CAB2271AF9AA1A00B9B856 /* btCollisionDispatcher.cpp in Sources */, 382383FA1A258FA7002C4610 /* idl_gen_go.cpp in Sources */, 382383FE1A258FA7002C4610 /* idl_parser.cpp in Sources */, 1A57011F180BC90D0088DEC7 /* CCGrid.cpp in Sources */, @@ -8334,17 +10728,21 @@ 38B8E2E119E671D2002D7CE7 /* UILayoutComponent.cpp in Sources */, B665E3F61AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.cpp in Sources */, 1A57019D180BCB590088DEC7 /* CCFont.cpp in Sources */, + B6CAB2D51AF9AA1A00B9B856 /* btOptimizedBvh.cpp in Sources */, 50CB247B19D9C5A100687767 /* AudioEngine-inl.mm in Sources */, 1A5701A1180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, B29A7DFF19EE1B7700872B35 /* Json.c in Sources */, + B6CAB3111AF9AA1A00B9B856 /* btUniformScalingShape.cpp in Sources */, 15AE1A8619AAD40300C27E9E /* b2MouseJoint.cpp in Sources */, 1A5701A5180BCB590088DEC7 /* CCFontAtlasCache.cpp in Sources */, 15AE1A7A19AAD40300C27E9E /* b2PolygonContact.cpp in Sources */, 3823842F1A259112002C4610 /* ParticleReader.cpp in Sources */, 15AE191119AAD35000C27E9E /* CCProcessBase.cpp in Sources */, + B6CAB2B31AF9AA1A00B9B856 /* btConvexShape.cpp in Sources */, 15AE18EE19AAD35000C27E9E /* CCArmature.cpp in Sources */, 15AE1BCD19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */, 1A5701B1180BCB590088DEC7 /* CCFontFNT.cpp in Sources */, + B6CAB4A51AF9AA1A00B9B856 /* SequentialThreadSupport.cpp in Sources */, 15AE181619AAD2F700C27E9E /* CCAttachNode.cpp in Sources */, B29A7DED19EE1B7700872B35 /* IkConstraint.c in Sources */, 18956BB21A9DFBFD006E9155 /* Particle3DReader.cpp in Sources */, @@ -8356,6 +10754,9 @@ B665E3121AA80A6500DDB1C5 /* CCPUObserverManager.cpp in Sources */, 292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */, 50ABBE551925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, + B6CAB4C51AF9AA1A00B9B856 /* boxBoxDistance.cpp in Sources */, + B6CAB29F1AF9AA1A00B9B856 /* btConvex2dShape.cpp in Sources */, + B6CAB4331AF9AA1A00B9B856 /* btGpu3DGridBroadphase.cpp in Sources */, 15AE1A8819AAD40300C27E9E /* b2PrismaticJoint.cpp in Sources */, 182C5CB21A95964700C30D34 /* Node3DReader.cpp in Sources */, 50ABBE491925AB6F00A911A9 /* CCEventAcceleration.cpp in Sources */, @@ -8365,30 +10766,45 @@ B665E30A1AA80A6500DDB1C5 /* CCPUNoise.cpp in Sources */, 15AE182C19AAD2F700C27E9E /* CCMeshVertexIndexData.cpp in Sources */, 15AE1A8C19AAD40300C27E9E /* b2RevoluteJoint.cpp in Sources */, + B6CAB3AF1AF9AA1A00B9B856 /* btFixedConstraint.cpp in Sources */, + B6CAB5231AF9AA1A00B9B856 /* btQuickprof.cpp in Sources */, 50ABBD4C1925AB0000A911A9 /* MathUtil.cpp in Sources */, + B6CAB40B1AF9AA1A00B9B856 /* btMultiBodyJointMotor.cpp in Sources */, + B6CAB3D51AF9AA1A00B9B856 /* btSolve2LinearConstraint.cpp in Sources */, + B6CAB2591AF9AA1A00B9B856 /* btHashedSimplePairCache.cpp in Sources */, 382F7ADC1AB1292A002EBECF /* CCObjectExtensionData.cpp in Sources */, 15AE191719AAD35000C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */, B665E2E21AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp in Sources */, + B6CAB2A31AF9AA1A00B9B856 /* btConvexHullShape.cpp in Sources */, 1A087AE81860400400196EF5 /* edtaa3func.cpp in Sources */, 50ABBD831925AB4100A911A9 /* CCBatchCommand.cpp in Sources */, B665E31E1AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp in Sources */, B665E2FE1AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp in Sources */, + B6CAB27D1AF9AA1A00B9B856 /* btBox2dShape.cpp in Sources */, 15AE18FF19AAD35000C27E9E /* CCComAudio.cpp in Sources */, 1A5701C7180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, + B6CAB20F1AF9AA1A00B9B856 /* btSimpleBroadphase.cpp in Sources */, B665E2C61AA80A6500DDB1C5 /* CCPUGravityAffector.cpp in Sources */, B665E3761AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp in Sources */, 15AE18A819AAD33D00C27E9E /* CCSpriteLoader.cpp in Sources */, + B6CAB2E91AF9AA1A00B9B856 /* btStaticPlaneShape.cpp in Sources */, 1A5701CB180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */, 50ABBE711925AB6F00A911A9 /* CCEventListenerMouse.cpp in Sources */, + B6CAB3C91AF9AA1A00B9B856 /* btPoint2PointConstraint.cpp in Sources */, 1A5701DE180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, 15AE1B5919AADA9900C27E9E /* UIText.cpp in Sources */, 15B3707C19EE414C00ABE682 /* CCEventAssetsManagerEx.cpp in Sources */, 3EACC9A419F5014D00EB3C5E /* CCLight.cpp in Sources */, + B6CAB4C91AF9AA1A00B9B856 /* SpuCollisionShapes.cpp in Sources */, + B6CAB38B1AF9AA1A00B9B856 /* btPolyhedralContactClipping.cpp in Sources */, B665E42E1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp in Sources */, 1A5701E2180BCB8C0088DEC7 /* CCScene.cpp in Sources */, + B6CAB5351AF9AA1A00B9B856 /* btVector3.cpp in Sources */, 15AE1B9919AADFDF00C27E9E /* UIHBox.cpp in Sources */, 15AE199C19AAD39600C27E9E /* ScrollViewReader.cpp in Sources */, + B6CAB2AB1AF9AA1A00B9B856 /* btConvexPointCloudShape.cpp in Sources */, B29A7E0519EE1B7700872B35 /* extension.c in Sources */, + B6CAB30B1AF9AA1A00B9B856 /* btTriangleMeshShape.cpp in Sources */, 15AE187E19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */, 1A12775C18DFCC590005F345 /* CCTweenFunction.cpp in Sources */, 1A5701E6180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, @@ -8397,6 +10813,7 @@ 15AE1A6A19AAD40300C27E9E /* b2ChainAndCircleContact.cpp in Sources */, B665E38A1AA80A6500DDB1C5 /* CCPUPlane.cpp in Sources */, B665E2161AA80A6500DDB1C5 /* CCPUBeamRender.cpp in Sources */, + B6CAB4B71AF9AA1A00B9B856 /* SpuFakeDma.cpp in Sources */, B665E3361AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp in Sources */, 15B3708819EE414C00ABE682 /* Manifest.cpp in Sources */, B665E27E1AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp in Sources */, @@ -8408,6 +10825,7 @@ B665E2CE1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp in Sources */, 50ABBDAD1925AB4100A911A9 /* CCRenderer.cpp in Sources */, 15AE199019AAD37200C27E9E /* ImageViewReader.cpp in Sources */, + B6CAB3DD1AF9AA1A00B9B856 /* btTypedConstraint.cpp in Sources */, B665E28A1AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp in Sources */, B665E2A21AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp in Sources */, B665E3EE1AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp in Sources */, @@ -8422,10 +10840,13 @@ 1A1645B2191B726C008C7C7F /* ConvertUTFWrapper.cpp in Sources */, B665E3B21AA80A6500DDB1C5 /* CCPURendererTranslator.cpp in Sources */, 15AE1BC919AAE01E00C27E9E /* CCControl.cpp in Sources */, + B6CAB3BF1AF9AA1A00B9B856 /* btHinge2Constraint.cpp in Sources */, B29A7DD119EE1B7700872B35 /* Skin.c in Sources */, + B6CAB1F51AF9AA1A00B9B856 /* btDbvt.cpp in Sources */, B665E2D61AA80A6500DDB1C5 /* CCPUJetAffector.cpp in Sources */, 1A5701FB180BCBAD0088DEC7 /* CCMenuItem.cpp in Sources */, 1A570202180BCBD40088DEC7 /* CCClippingNode.cpp in Sources */, + B6CAB4FF1AF9AA1A00B9B856 /* btConvexHullComputer.cpp in Sources */, 1A570208180BCBDF0088DEC7 /* CCMotionStreak.cpp in Sources */, 15FB20971AE7C57D00C31518 /* sweep.cc in Sources */, 1A570210180BCBF40088DEC7 /* CCProgressTimer.cpp in Sources */, @@ -8437,10 +10858,14 @@ 3EACC9A019F5014D00EB3C5E /* CCCamera.cpp in Sources */, 1A570214180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, B665E3FE1AA80A6600DDB1C5 /* CCPUSphereCollider.cpp in Sources */, + B6CAB3591AF9AA1A00B9B856 /* gim_memory.cpp in Sources */, B665E25A1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp in Sources */, + B6CAB2BB1AF9AA1A00B9B856 /* btCylinderShape.cpp in Sources */, 15AE1BD019AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, + B6CAAFFA1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */, 15AE18F219AAD35000C27E9E /* CCArmatureDataManager.cpp in Sources */, B665E2DE1AA80A6500DDB1C5 /* CCPULineAffector.cpp in Sources */, + B6CAB5471AF9AA1A00B9B856 /* MiniCLTaskScheduler.cpp in Sources */, 15AE1B6119AADA9900C27E9E /* UIButton.cpp in Sources */, 15AE1A5519AAD40300C27E9E /* b2Math.cpp in Sources */, B276EF651988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */, @@ -8458,21 +10883,30 @@ 1A570282180BCC900088DEC7 /* CCSpriteBatchNode.cpp in Sources */, 1A570286180BCC900088DEC7 /* CCSpriteFrame.cpp in Sources */, B24AA989195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, + B6CAB4DF1AF9AA1A00B9B856 /* SpuSampleTask.cpp in Sources */, B29A7E2F19EE1B7700872B35 /* SkeletonAnimation.cpp in Sources */, B60C5BD419AC68B10056FBDE /* CCBillBoard.cpp in Sources */, 15AE199619AAD39600C27E9E /* ListViewReader.cpp in Sources */, + B6CAB52B1AF9AA1A00B9B856 /* btSerializer.cpp in Sources */, 50ABC0191926664800A911A9 /* CCSAXParser.cpp in Sources */, 15AE189219AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, + B6CAB4471AF9AA1A00B9B856 /* btThreadSupportInterface.cpp in Sources */, 15FB206E1AE7BE7400C31518 /* SpritePolygonCache.cpp in Sources */, 15AE1B6A19AADA9900C27E9E /* UIDeprecated.cpp in Sources */, 15AE183C19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, + B6CAB36F1AF9AA1A00B9B856 /* btGjkConvexCast.cpp in Sources */, + B6CAB31B1AF9AA1A00B9B856 /* btContactProcessing.cpp in Sources */, 15AE1A2319AAD3D500C27E9E /* b2BroadPhase.cpp in Sources */, 382384211A2590DA002C4610 /* GameMapReader.cpp in Sources */, B29A7DF319EE1B7700872B35 /* AttachmentLoader.c in Sources */, + B6CAB3331AF9AA1A00B9B856 /* btGImpactShape.cpp in Sources */, 382383F01A258FA7002C4610 /* flatc.cpp in Sources */, B665E31A1AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp in Sources */, 1A57028A180BCC900088DEC7 /* CCSpriteFrameCache.cpp in Sources */, 15AE18E619AAD35000C27E9E /* CCActionFrameEasing.cpp in Sources */, + B6CAB34B1AF9AA1A00B9B856 /* gim_contact.cpp in Sources */, + B6CAB4A91AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.cpp in Sources */, + B6CAB2A71AF9AA1A00B9B856 /* btConvexInternalShape.cpp in Sources */, 38F5263E1A48363B000DB7F7 /* ArmatureNodeReader.cpp in Sources */, B665E34E1AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.cpp in Sources */, B29A7DC919EE1B7700872B35 /* SlotData.c in Sources */, @@ -8483,29 +10917,37 @@ 1A570292180BCCAB0088DEC7 /* CCAnimation.cpp in Sources */, B665E3421AA80A6500DDB1C5 /* CCPUOnExpireObserver.cpp in Sources */, B665E2DA1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp in Sources */, + B6CAB2791AF9AA1A00B9B856 /* SphereTriangleDetector.cpp in Sources */, 1A570296180BCCAB0088DEC7 /* CCAnimationCache.cpp in Sources */, B29A7E1B19EE1B7700872B35 /* SkeletonJson.c in Sources */, 50ABBE351925AB6F00A911A9 /* CCConsole.cpp in Sources */, B665E3FA1AA80A6600DDB1C5 /* CCPUSphere.cpp in Sources */, 50ABBEAF1925AB6F00A911A9 /* CCUserDefault.cpp in Sources */, 15AE1BCB19AAE01E00C27E9E /* CCControlButton.cpp in Sources */, + B6CAB3731AF9AA1A00B9B856 /* btGjkEpa2.cpp in Sources */, 50ABBE791925AB6F00A911A9 /* CCEventMouse.cpp in Sources */, 15AE1A2E19AAD3D500C27E9E /* b2TimeOfImpact.cpp in Sources */, + B6CAB2FD1AF9AA1A00B9B856 /* btTriangleIndexVertexArray.cpp in Sources */, 50ABC0111926664800A911A9 /* CCGLView.cpp in Sources */, 50ABBE3D1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */, B29A7DD519EE1B7700872B35 /* RegionAttachment.c in Sources */, 382384071A25900F002C4610 /* FlatBuffersSerialize.cpp in Sources */, B29A7E2519EE1B7700872B35 /* Attachment.c in Sources */, + B6CAB3631AF9AA1A00B9B856 /* btContinuousConvexCollision.cpp in Sources */, B665E3021AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitter.cpp in Sources */, B665E3721AA80A6500DDB1C5 /* CCPUParticleFollower.cpp in Sources */, + B6CAB22B1AF9AA1A00B9B856 /* btCollisionObject.cpp in Sources */, 1A5702C8180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, B665E2861AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp in Sources */, 15AE1B5519AADA9900C27E9E /* UIScrollView.cpp in Sources */, 15AE191919AAD35000C27E9E /* CCSSceneReader.cpp in Sources */, + B6CAB1FD1AF9AA1A00B9B856 /* btDispatcher.cpp in Sources */, + B6CAB2BF1AF9AA1A00B9B856 /* btEmptyShape.cpp in Sources */, 50ABBE7D1925AB6F00A911A9 /* CCEventTouch.cpp in Sources */, B665E22A1AA80A6500DDB1C5 /* CCPUBoxCollider.cpp in Sources */, 1A5702EA180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, 50ABBD971925AB4100A911A9 /* CCGLProgramStateCache.cpp in Sources */, + B6CAB5431AF9AA1A00B9B856 /* MiniCLTask.cpp in Sources */, 15AE182019AAD2F700C27E9E /* CCBundleReader.cpp in Sources */, B665E2421AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp in Sources */, 15AE1AD819AAD41000C27E9E /* b2Rope.cpp in Sources */, @@ -8514,22 +10956,33 @@ B29A7DC719EE1B7700872B35 /* SkeletonRenderer.cpp in Sources */, 15AE1A7C19AAD40300C27E9E /* b2MotorJoint.cpp in Sources */, 15AE1A2619AAD3D500C27E9E /* b2CollideEdge.cpp in Sources */, + B6CAB1F11AF9AA1A00B9B856 /* btCollisionAlgorithm.cpp in Sources */, 1A5702EE180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, 15AE1BD619AAE01E00C27E9E /* CCControlSlider.cpp in Sources */, B665E3A21AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp in Sources */, B665E39E1AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp in Sources */, + B6CAB2011AF9AA1A00B9B856 /* btMultiSapBroadphase.cpp in Sources */, B665E41A1AA80A6600DDB1C5 /* CCPUTextureRotator.cpp in Sources */, B665E3C61AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.cpp in Sources */, + B6CAB31F1AF9AA1A00B9B856 /* btGenericPoolAllocator.cpp in Sources */, + B6CAB3F11AF9AA1A00B9B856 /* btSimpleDynamicsWorld.cpp in Sources */, 50ABBE691925AB6F00A911A9 /* CCEventListenerFocus.cpp in Sources */, 15AE18EA19AAD35000C27E9E /* CCActionNode.cpp in Sources */, + B6CAB2391AF9AA1A00B9B856 /* btCompoundCompoundCollisionAlgorithm.cpp in Sources */, 15AE1A7819AAD40300C27E9E /* b2PolygonAndCircleContact.cpp in Sources */, 15AE1A3419AAD3D500C27E9E /* b2EdgeShape.cpp in Sources */, + B6CAB1F91AF9AA1A00B9B856 /* btDbvtBroadphase.cpp in Sources */, B665E32E1AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.cpp in Sources */, + B6CAB21B1AF9AA1A00B9B856 /* btBoxBoxCollisionAlgorithm.cpp in Sources */, B665E2AE1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp in Sources */, 15AE1BA319AADFDF00C27E9E /* UILayoutManager.cpp in Sources */, B230ED7119B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */, + B6CAB3991AF9AA1A00B9B856 /* btVoronoiSimplexSolver.cpp in Sources */, 1A5702F2180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */, + B6CAB3011AF9AA1A00B9B856 /* btTriangleIndexVertexMaterialArray.cpp in Sources */, 15AE1A5B19AAD40300C27E9E /* b2Timer.cpp in Sources */, + B6CAB2971AF9AA1A00B9B856 /* btConcaveShape.cpp in Sources */, + B6CAB4291AF9AA1A00B9B856 /* btRaycastVehicle.cpp in Sources */, 15AE189419AAD33D00C27E9E /* CCLayerLoader.cpp in Sources */, 826294351AAF004C00CB7CF7 /* HttpCookie.cpp in Sources */, 1A5702F6180BCE750088DEC7 /* CCTMXTiledMap.cpp in Sources */, @@ -8543,7 +10996,10 @@ 50ABBD5C1925AB0000A911A9 /* Vec3.cpp in Sources */, 1A570300180BCE890088DEC7 /* CCParallaxNode.cpp in Sources */, 15AE191D19AAD35000C27E9E /* CCTween.cpp in Sources */, + B6CAB2311AF9AA1A00B9B856 /* btCollisionWorld.cpp in Sources */, 15AE1A6C19AAD40300C27E9E /* b2ChainAndPolygonContact.cpp in Sources */, + B6CAB37B1AF9AA1A00B9B856 /* btGjkPairDetector.cpp in Sources */, + 5053850C1B02819E00793096 /* CCVertexAttribBinding.cpp in Sources */, 15AE1A2719AAD3D500C27E9E /* b2CollidePolygon.cpp in Sources */, 15AE199A19AAD39600C27E9E /* PageViewReader.cpp in Sources */, 1A57030C180BCF190088DEC7 /* CCComponent.cpp in Sources */, @@ -8551,26 +11007,41 @@ 15FB20741AE7BF8600C31518 /* MarchingSquare.cpp in Sources */, B665E2A61AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp in Sources */, 15AE1A5919AAD40300C27E9E /* b2StackAllocator.cpp in Sources */, + B6CAB20B1AF9AA1A00B9B856 /* btQuantizedBvh.cpp in Sources */, + B6CAB5411AF9AA1A00B9B856 /* MiniCL.cpp in Sources */, B29A7E3D19EE1B7700872B35 /* AnimationState.c in Sources */, B665E2E61AA80A6500DDB1C5 /* CCPULinearForceAffector.cpp in Sources */, 15AE192219AAD35000C27E9E /* DictionaryHelper.cpp in Sources */, + B6CAB4F51AF9AA1A00B9B856 /* btAlignedAllocator.cpp in Sources */, 15AE196C19AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, + B6CAB2611AF9AA1A00B9B856 /* btManifoldResult.cpp in Sources */, B29A7E0719EE1B7700872B35 /* SkinnedMeshAttachment.c in Sources */, + B6CAB28F1AF9AA1A00B9B856 /* btCollisionShape.cpp in Sources */, + B6CAB39F1AF9AA1A00B9B856 /* btKinematicCharacterController.cpp in Sources */, + B6CAB2051AF9AA1A00B9B856 /* btOverlappingPairCache.cpp in Sources */, 1A570310180BCF190088DEC7 /* CCComponentContainer.cpp in Sources */, 15AE190719AAD35000C27E9E /* CCDatas.cpp in Sources */, 1A01C69C18F57BE800EFE3A6 /* CCString.cpp in Sources */, + B6CAB26D1AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.cpp in Sources */, + B6CAB3251AF9AA1A00B9B856 /* btGImpactBvh.cpp in Sources */, B665E2721AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp in Sources */, 50ABBD3C1925AB0000A911A9 /* CCGeometry.cpp in Sources */, + B6CAB3C31AF9AA1A00B9B856 /* btHingeConstraint.cpp in Sources */, 15FB206A1AE7BE7400C31518 /* SpritePolygon.cpp in Sources */, B29A7DDD19EE1B7700872B35 /* BoneData.c in Sources */, 15AE188A19AAD33D00C27E9E /* CCControlLoader.cpp in Sources */, 5012168E1AC47380009A4BEA /* CCRenderState.cpp in Sources */, + B6CAB2491AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.cpp in Sources */, B665E35A1AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp in Sources */, + B6CAB2891AF9AA1A00B9B856 /* btCapsuleShape.cpp in Sources */, + B6CAB42F1AF9AA1A00B9B856 /* btWheelInfo.cpp in Sources */, B29A7DFB19EE1B7700872B35 /* spine-cocos2dx.cpp in Sources */, + B6CAB3391AF9AA1A00B9B856 /* btTriangleShapeEx.cpp in Sources */, 50ABC0011926664800A911A9 /* CCLock-apple.cpp in Sources */, 15AE1A8019AAD40300C27E9E /* b2FrictionJoint.cpp in Sources */, 50ABBD931925AB4100A911A9 /* CCGLProgramState.cpp in Sources */, 15AE183419AAD2F700C27E9E /* CCObjLoader.cpp in Sources */, + B6CAB2551AF9AA1A00B9B856 /* btGhostObject.cpp in Sources */, B665E23A1AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp in Sources */, 1A57034B180BD09B0088DEC7 /* tinyxml2.cpp in Sources */, 1A570354180BD0B00088DEC7 /* ioapi.cpp in Sources */, @@ -8582,17 +11053,24 @@ 50ABBEB31925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */, 50ABBEB51925AB6F00A911A9 /* CCUserDefault-android.cpp in Sources */, 5E9F61261A3FFE3D0038DE01 /* CCFrustum.cpp in Sources */, + B6CAB3FB1AF9AA1A00B9B856 /* btMultiBodyConstraint.cpp in Sources */, B665E4221AA80A6600DDB1C5 /* CCPUTranslateManager.cpp in Sources */, B665E38E1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp in Sources */, B665E2021AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp in Sources */, B665E3661AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp in Sources */, B665E4361AA80A6600DDB1C5 /* CCPUVortexAffector.cpp in Sources */, + B6CAB4191AF9AA1A00B9B856 /* btDantzigLCP.cpp in Sources */, B665E3DE1AA80A6600DDB1C5 /* CCPUSimpleSpline.cpp in Sources */, B665E22E1AA80A6500DDB1C5 /* CCPUBoxColliderTranslator.cpp in Sources */, 29394CF619B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */, + B6CAB3FF1AF9AA1A00B9B856 /* btMultiBodyConstraintSolver.cpp in Sources */, 382383FC1A258FA7002C4610 /* idl_gen_text.cpp in Sources */, 50ABBE831925AB6F00A911A9 /* ccFPSImages.c in Sources */, + B6CAB4CD1AF9AA1A00B9B856 /* SpuContactResult.cpp in Sources */, 15AE1B7019AADA9900C27E9E /* CocosGUI.cpp in Sources */, + B6CAB2AF1AF9AA1A00B9B856 /* btConvexPolyhedron.cpp in Sources */, + B6CAB4EF1AF9AA1A00B9B856 /* Win32ThreadSupport.cpp in Sources */, + B6CAB3E71AF9AA1A00B9B856 /* btDiscreteDynamicsWorld.cpp in Sources */, 50CB247719D9C5A100687767 /* AudioCache.mm in Sources */, B665E25E1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp in Sources */, 15AE18FA19AAD35000C27E9E /* CCColliderDetector.cpp in Sources */, @@ -8607,12 +11085,17 @@ B665E2121AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp in Sources */, 38ACD1FC1A27111900C3093D /* WidgetCallBackHandlerProtocol.cpp in Sources */, 15FB209B1AE7C57D00C31518 /* sweep_context.cc in Sources */, + B6CAAFEE1AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp in Sources */, + B6CAB5051AF9AA1A00B9B856 /* btGeometryUtil.cpp in Sources */, 15AE1A7619AAD40300C27E9E /* b2EdgeAndPolygonContact.cpp in Sources */, + B6CAB4BB1AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.cpp in Sources */, 50ABBD8B1925AB4100A911A9 /* CCGLProgram.cpp in Sources */, 464AD6E5197EBB1400E502D8 /* pvr.cpp in Sources */, + B6CAB3F51AF9AA1A00B9B856 /* Bullet-C-API.cpp in Sources */, 50ABBDA31925AB4100A911A9 /* CCQuadCommand.cpp in Sources */, 15AE19A219AAD39600C27E9E /* TextBMFontReader.cpp in Sources */, 382384281A2590F9002C4610 /* NodeReader.cpp in Sources */, + B6CAB3671AF9AA1A00B9B856 /* btConvexCast.cpp in Sources */, 50ABC01D1926664800A911A9 /* CCThread.cpp in Sources */, 15AE180C19AAD2F700C27E9E /* CCAnimate3D.cpp in Sources */, 15AE183019AAD2F700C27E9E /* CCOBB.cpp in Sources */, @@ -8628,6 +11111,7 @@ 15AE199819AAD39600C27E9E /* LoadingBarReader.cpp in Sources */, 503DD8F71926B0DB00CD74DD /* CCIMEDispatcher.cpp in Sources */, 50ABBE751925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */, + B6CAB2C31AF9AA1A00B9B856 /* btHeightfieldTerrainShape.cpp in Sources */, 15AE18F019AAD35000C27E9E /* CCArmatureAnimation.cpp in Sources */, 50ABBE511925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */, 50ABC0051926664800A911A9 /* CCThread-apple.mm in Sources */, @@ -8643,13 +11127,17 @@ 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */, 50ABBE1F1925AB6F00A911A9 /* atitc.cpp in Sources */, 1A01C69818F57BE800EFE3A6 /* CCSet.cpp in Sources */, + B6CAB2351AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.cpp in Sources */, B29A7DF119EE1B7700872B35 /* AtlasAttachmentLoader.c in Sources */, + B6CAB3451AF9AA1A00B9B856 /* gim_box_set.cpp in Sources */, 1AAF584F180E40B9000584C8 /* LocalStorage.cpp in Sources */, 15AE1BD219AAE01E00C27E9E /* CCControlPotentiometer.cpp in Sources */, 50ABBEA31925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, + B6CAB2711AF9AA1A00B9B856 /* btSphereTriangleCollisionAlgorithm.cpp in Sources */, 38B8E2D519E66581002D7CE7 /* CSLoader.cpp in Sources */, 15AE190519AAD35000C27E9E /* CCDataReaderHelper.cpp in Sources */, 826294331AAF001C00CB7CF7 /* HttpAsynConnection.m in Sources */, + B6CAAFE61AF9A9E100B9B856 /* CCPhysics3DComponent.cpp in Sources */, B68778F81A8CA82E00643ABF /* CCParticle3DAffector.cpp in Sources */, 15AE19A019AAD39600C27E9E /* TextAtlasReader.cpp in Sources */, 15AE1A2A19AAD3D500C27E9E /* b2Distance.cpp in Sources */, @@ -8664,6 +11152,7 @@ DABC9FA919E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */, 3E2F27A619CFBFE100E7C490 /* AudioEngine.cpp in Sources */, B665E2EE1AA80A6500DDB1C5 /* CCPULineEmitter.cpp in Sources */, + B6CAB2DD1AF9AA1A00B9B856 /* btScaledBvhTriangleMeshShape.cpp in Sources */, B665E4121AA80A6600DDB1C5 /* CCPUTextureAnimator.cpp in Sources */, B665E3D21AA80A6600DDB1C5 /* CCPUScriptLexer.cpp in Sources */, B665E4021AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.cpp in Sources */, @@ -8683,6 +11172,7 @@ 15AE1B9F19AADFDF00C27E9E /* UILayout.cpp in Sources */, 50ABBECF1925AB6F00A911A9 /* TGAlib.cpp in Sources */, 15AE199E19AAD39600C27E9E /* SliderReader.cpp in Sources */, + B6CAB49F1AF9AA1A00B9B856 /* PosixThreadSupport.cpp in Sources */, 50ABBE451925AB6F00A911A9 /* CCEvent.cpp in Sources */, D0FD034F1A3B51AA00825BB5 /* CCAllocatorGlobal.cpp in Sources */, 50ABBE611925AB6F00A911A9 /* CCEventListenerAcceleration.cpp in Sources */, @@ -8690,6 +11180,7 @@ B665E3161AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp in Sources */, 15AE1A8E19AAD40300C27E9E /* b2RopeJoint.cpp in Sources */, 50ABBD871925AB4100A911A9 /* CCCustomCommand.cpp in Sources */, + B6CAB2E11AF9AA1A00B9B856 /* btShapeHull.cpp in Sources */, 50ABBDBD1925AB4100A911A9 /* CCTextureCache.cpp in Sources */, 15AE188619AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */, B665E43A1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.cpp in Sources */, @@ -8700,6 +11191,7 @@ 15AE1A7E19AAD40300C27E9E /* b2DistanceJoint.cpp in Sources */, 15AE190919AAD35000C27E9E /* CCDecorativeDisplay.cpp in Sources */, B665E40E1AA80A6600DDB1C5 /* CCPUTechniqueTranslator.cpp in Sources */, + B6CAB4BF1AF9AA1A00B9B856 /* SpuLibspe2Support.cpp in Sources */, B665E21E1AA80A6500DDB1C5 /* CCPUBehaviourManager.cpp in Sources */, 15AE18E319AAD35000C27E9E /* TriggerObj.cpp in Sources */, 15AE1BA119AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */, @@ -8708,6 +11200,8 @@ 50ABBE4D1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */, 15AE1A6819AAD40300C27E9E /* b2WorldCallbacks.cpp in Sources */, B665E2D21AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp in Sources */, + B6CAB3811AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.cpp in Sources */, + B6CAB4AD1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp in Sources */, 50ABBE9F1925AB6F00A911A9 /* CCScheduler.cpp in Sources */, 15AE1C1119AAE2C600C27E9E /* CCPhysicsDebugNode.cpp in Sources */, B665E2521AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp in Sources */, @@ -8719,46 +11213,63 @@ 382384361A259126002C4610 /* ProjectNodeReader.cpp in Sources */, B665E37A1AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp in Sources */, 15AE1BB519AADFEF00C27E9E /* SocketIO.cpp in Sources */, + B6CAB4D31AF9AA1A00B9B856 /* SpuGatheringCollisionTask.cpp in Sources */, 15AE1B6519AADA9900C27E9E /* UIImageView.cpp in Sources */, B29A7E1519EE1B7700872B35 /* BoundingBoxAttachment.c in Sources */, + B6CAB4E31AF9AA1A00B9B856 /* SpuSampleTaskProcess.cpp in Sources */, 15AE1A2519AAD3D500C27E9E /* b2CollideCircle.cpp in Sources */, B665E3321AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp in Sources */, 50ABBE5D1925AB6F00A911A9 /* CCEventListener.cpp in Sources */, + B6CAB4FB1AF9AA1A00B9B856 /* btConvexHull.cpp in Sources */, B29A7E2D19EE1B7700872B35 /* Slot.c in Sources */, 15AE182819AAD2F700C27E9E /* CCMeshSkin.cpp in Sources */, B665E42A1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.cpp in Sources */, 15AE19A619AAD39600C27E9E /* TextReader.cpp in Sources */, 15AE198819AAD36A00C27E9E /* ButtonReader.cpp in Sources */, + B6CAB4131AF9AA1A00B9B856 /* btMultiBodyPoint2Point.cpp in Sources */, + B6CAB2C91AF9AA1A00B9B856 /* btMinkowskiSumShape.cpp in Sources */, 4D76BE3A1A4AAF0A00102962 /* CCActionTimelineNode.cpp in Sources */, B665E33A1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp in Sources */, B665E2261AA80A6500DDB1C5 /* CCPUBillboardChain.cpp in Sources */, 15AE1A6319AAD40300C27E9E /* b2Island.cpp in Sources */, + B6CAB2851AF9AA1A00B9B856 /* btBvhTriangleMeshShape.cpp in Sources */, 15AE1A8419AAD40300C27E9E /* b2Joint.cpp in Sources */, 50ABBD601925AB0000A911A9 /* Vec4.cpp in Sources */, 50ABC05F1926664800A911A9 /* CCApplication-mac.mm in Sources */, B29A7E2119EE1B7700872B35 /* PolygonBatch.cpp in Sources */, 15AE1A9219AAD40300C27E9E /* b2WheelJoint.cpp in Sources */, B665E3261AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp in Sources */, + B6CAB3ED1AF9AA1A00B9B856 /* btRigidBody.cpp in Sources */, + B6CAAFFE1AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp in Sources */, + B6CAB1ED1AF9AA1A00B9B856 /* btBroadphaseProxy.cpp in Sources */, B29594B41926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */, 15AE189619AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, B665E23E1AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp in Sources */, 15AE1BB719AADFEF00C27E9E /* WebSocket.cpp in Sources */, + B6CAB21F1AF9AA1A00B9B856 /* btBoxBoxDetector.cpp in Sources */, B665E20A1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp in Sources */, B665E3E61AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.cpp in Sources */, + B6CAB32F1AF9AA1A00B9B856 /* btGImpactQuantizedBvh.cpp in Sources */, 15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */, + B6CAB35F1AF9AA1A00B9B856 /* gim_tri_collision.cpp in Sources */, 15AE18EC19AAD35000C27E9E /* CCActionObject.cpp in Sources */, B665E2821AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp in Sources */, 1A01C68E18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, 50ABBD381925AB0000A911A9 /* CCAffineTransform.cpp in Sources */, B665E2AA1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp in Sources */, + B6CAB2CD1AF9AA1A00B9B856 /* btMultimaterialTriangleMeshShape.cpp in Sources */, 46C02E0718E91123004B7456 /* xxhash.c in Sources */, 15AE1B6B19AADA9900C27E9E /* UIWidget.cpp in Sources */, 50ABBE931925AB6F00A911A9 /* CCProfiling.cpp in Sources */, 15AE188819AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */, B665E2561AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp in Sources */, + B6CAB2131AF9AA1A00B9B856 /* btActivatingCollisionAlgorithm.cpp in Sources */, 15AE18A419AAD33D00C27E9E /* CCScale9SpriteLoader.cpp in Sources */, + B6CAB2ED1AF9AA1A00B9B856 /* btStridingMeshInterface.cpp in Sources */, 182C5CD61A98F30500C30D34 /* Sprite3DReader.cpp in Sources */, 38D9629D1ACA9721007C6FAF /* CocoStudio.cpp in Sources */, + B6CAB24D1AF9AA1A00B9B856 /* btDefaultCollisionConfiguration.cpp in Sources */, + B6CAB3A91AF9AA1A00B9B856 /* btContactConstraint.cpp in Sources */, B665E3D61AA80A6600DDB1C5 /* CCPUScriptParser.cpp in Sources */, 15AE1B5719AADA9900C27E9E /* UISlider.cpp in Sources */, B665E2F61AA80A6500DDB1C5 /* CCPUListener.cpp in Sources */, @@ -8774,19 +11285,24 @@ 15AE1B9819AADAA100C27E9E /* UIVideoPlayer-ios.mm in Sources */, B665E38F1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp in Sources */, B665E21B1AA80A6500DDB1C5 /* CCPUBehaviour.cpp in Sources */, + B6CAB2CA1AF9AA1A00B9B856 /* btMinkowskiSumShape.cpp in Sources */, B665E38B1AA80A6500DDB1C5 /* CCPUPlane.cpp in Sources */, B665E2731AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp in Sources */, 15AE1C0519AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */, + B6CAB4D41AF9AA1A00B9B856 /* SpuGatheringCollisionTask.cpp in Sources */, 15AE198A19AAD36A00C27E9E /* ButtonReader.cpp in Sources */, 15AE18D019AAD33D00C27E9E /* CCNodeLoaderLibrary.cpp in Sources */, 15AE192C19AAD35100C27E9E /* CCActionFrame.cpp in Sources */, + B6CAB2461AF9AA1A00B9B856 /* btConvexConvexAlgorithm.cpp in Sources */, 1A01C69918F57BE800EFE3A6 /* CCSet.cpp in Sources */, 1A01C69D18F57BE800EFE3A6 /* CCString.cpp in Sources */, 15FB20981AE7C57D00C31518 /* sweep.cc in Sources */, 15AE199219AAD37300C27E9E /* ImageViewReader.cpp in Sources */, + B6CAB3BC1AF9AA1A00B9B856 /* btGeneric6DofSpringConstraint.cpp in Sources */, B665E1F71AA80A6500DDB1C5 /* CCPUAffectorManager.cpp in Sources */, 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */, 46A171051807CECB005B8026 /* CCPhysicsWorld.cpp in Sources */, + B6CAB2A81AF9AA1A00B9B856 /* btConvexInternalShape.cpp in Sources */, 50ABBDA01925AB4100A911A9 /* CCGroupCommand.cpp in Sources */, 46A171031807CECB005B8026 /* CCPhysicsShape.cpp in Sources */, B665E35B1AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp in Sources */, @@ -8794,15 +11310,20 @@ B665E3AB1AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp in Sources */, 1A01C6A518F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */, 292DB14E19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */, + B6CAB4BC1AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.cpp in Sources */, + B6CAB3CA1AF9AA1A00B9B856 /* btPoint2PointConstraint.cpp in Sources */, B665E3A71AA80A6500DDB1C5 /* CCPURandomiser.cpp in Sources */, 15AE1BFB19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */, B665E30F1AA80A6500DDB1C5 /* CCPUObserver.cpp in Sources */, + B6CAB4A01AF9AA1A00B9B856 /* PosixThreadSupport.cpp in Sources */, B230ED7219B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */, + B6CAB2821AF9AA1A00B9B856 /* btBoxShape.cpp in Sources */, 382383F91A258FA7002C4610 /* idl_gen_general.cpp in Sources */, 15AE1B9019AADA9A00C27E9E /* UIWidget.cpp in Sources */, ED9C6A9518599AD8000A5232 /* CCNodeGrid.cpp in Sources */, B665E2531AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp in Sources */, B665E3F71AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.cpp in Sources */, + B6CAB3C01AF9AA1A00B9B856 /* btHinge2Constraint.cpp in Sources */, 1A01C68F18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, B276EF621988D1D500CD400F /* CCVertexIndexData.cpp in Sources */, 50ABBE561925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, @@ -8810,27 +11331,37 @@ 15AE183D19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, 503DD8E11926736A00CD74DD /* CCApplication-ios.mm in Sources */, 15AE1AAC19AAD40300C27E9E /* b2WorldCallbacks.cpp in Sources */, + B6CAB20C1AF9AA1A00B9B856 /* btQuantizedBvh.cpp in Sources */, + B6CAB3F21AF9AA1A00B9B856 /* btSimpleDynamicsWorld.cpp in Sources */, 15AE18C719AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, 50ABC01A1926664800A911A9 /* CCSAXParser.cpp in Sources */, B29A7E1C19EE1B7700872B35 /* SkeletonJson.c in Sources */, B2CC507C19776DD10041958E /* CCPhysicsJoint.cpp in Sources */, + B6CAB5241AF9AA1A00B9B856 /* btQuickprof.cpp in Sources */, 182C5CE61A9D725400C30D34 /* UserCameraReader.cpp in Sources */, 38B8E2E219E671D2002D7CE7 /* UILayoutComponent.cpp in Sources */, + B6CAB3D21AF9AA1A00B9B856 /* btSliderConstraint.cpp in Sources */, B2165EEA19921124000BE3E6 /* CCPrimitiveCommand.cpp in Sources */, B665E32B1AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp in Sources */, 15AE185C19AAD31200C27E9E /* CDOpenALSupport.m in Sources */, + B6CAB3B01AF9AA1A00B9B856 /* btFixedConstraint.cpp in Sources */, 15AE186119AAD31200C27E9E /* SimpleAudioEngine_objc.m in Sources */, 15AE182519AAD2F700C27E9E /* CCMesh.cpp in Sources */, B665E4071AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.cpp in Sources */, 503DD8EE1926736A00CD74DD /* CCImage-ios.mm in Sources */, + B6CAB2941AF9AA1A00B9B856 /* btCompoundShape.cpp in Sources */, + B6CAB39A1AF9AA1A00B9B856 /* btVoronoiSimplexSolver.cpp in Sources */, 46A170FC1807CECB005B8026 /* CCPhysicsBody.cpp in Sources */, 15AE1BEA19AAE01E00C27E9E /* CCControlButton.cpp in Sources */, 50ABBD941925AB4100A911A9 /* CCGLProgramState.cpp in Sources */, B665E3DF1AA80A6600DDB1C5 /* CCPUSimpleSpline.cpp in Sources */, + B6CAB4F61AF9AA1A00B9B856 /* btAlignedAllocator.cpp in Sources */, B257B44F1989D5E800D9A687 /* CCPrimitive.cpp in Sources */, 50ABBE281925AB6F00A911A9 /* CCAutoreleasePool.cpp in Sources */, 15AE18D519AAD33D00C27E9E /* CCScale9SpriteLoader.cpp in Sources */, 15AE192919AAD35100C27E9E /* TriggerMng.cpp in Sources */, + B6CAB21C1AF9AA1A00B9B856 /* btBoxBoxCollisionAlgorithm.cpp in Sources */, + B6CAB35A1AF9AA1A00B9B856 /* gim_memory.cpp in Sources */, B29A7E0C19EE1B7700872B35 /* Atlas.c in Sources */, 15AE185E19AAD31200C27E9E /* CocosDenshion.m in Sources */, B665E2071AA80A6500DDB1C5 /* CCPUBaseCollider.cpp in Sources */, @@ -8839,8 +11370,11 @@ 1A570066180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, B665E2D71AA80A6500DDB1C5 /* CCPUJetAffector.cpp in Sources */, B276EF661988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */, + B6CAB3961AF9AA1A00B9B856 /* btSubSimplexConvexCast.cpp in Sources */, 15AE1C0119AAE01E00C27E9E /* CCScrollView.cpp in Sources */, + B6CAB2901AF9AA1A00B9B856 /* btCollisionShape.cpp in Sources */, 15B3708919EE414C00ABE682 /* Manifest.cpp in Sources */, + B6CAB2DA1AF9AA1A00B9B856 /* btPolyhedralConvexShape.cpp in Sources */, 15AE1A9B19AAD40300C27E9E /* b2Settings.cpp in Sources */, 1A57006A180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, 15AE1BEF19AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, @@ -8850,13 +11384,17 @@ 1A57006E180BC5A10088DEC7 /* CCActionEase.cpp in Sources */, 50ABBD8C1925AB4100A911A9 /* CCGLProgram.cpp in Sources */, B665E2671AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.cpp in Sources */, + B6CAB4AA1AF9AA1A00B9B856 /* SpuCollisionObjectWrapper.cpp in Sources */, + B6CAAFFF1AF9A9E100B9B856 /* CCPhysicsSprite3D.cpp in Sources */, 15AE196119AAD35100C27E9E /* CCSSceneReader.cpp in Sources */, 1A570072180BC5A10088DEC7 /* CCActionGrid.cpp in Sources */, 15AE1ABC19AAD40300C27E9E /* b2PolygonAndCircleContact.cpp in Sources */, + B6CAB3FC1AF9AA1A00B9B856 /* btMultiBodyConstraint.cpp in Sources */, B665E2EB1AA80A6500DDB1C5 /* CCPULinearForceAffectorTranslator.cpp in Sources */, B665E4271AA80A6600DDB1C5 /* CCPUUtil.cpp in Sources */, B665E2BF1AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp in Sources */, 15AE1ADA19AAD41000C27E9E /* b2Rope.cpp in Sources */, + B6CAB2D61AF9AA1A00B9B856 /* btOptimizedBvh.cpp in Sources */, 52B47A301A5349A3004E4C60 /* HttpClient-apple.mm in Sources */, B29A7E1619EE1B7700872B35 /* BoundingBoxAttachment.c in Sources */, B665E2131AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.cpp in Sources */, @@ -8868,14 +11406,21 @@ 382383FF1A258FA7002C4610 /* idl_parser.cpp in Sources */, B665E28F1AA80A6500DDB1C5 /* CCPUDynamicAttributeTranslator.cpp in Sources */, B665E31B1AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp in Sources */, + B6CAB2421AF9AA1A00B9B856 /* btConvexConcaveCollisionAlgorithm.cpp in Sources */, + B6CAB2661AF9AA1A00B9B856 /* btSimulationIslandManager.cpp in Sources */, + B6CAB4001AF9AA1A00B9B856 /* btMultiBodyConstraintSolver.cpp in Sources */, + B6CAB4E01AF9AA1A00B9B856 /* SpuSampleTask.cpp in Sources */, 15AE1B8419AADA9A00C27E9E /* UITextField.cpp in Sources */, 15AE198E19AAD36E00C27E9E /* CheckBoxReader.cpp in Sources */, + B6CAAFE31AF9A9E100B9B856 /* CCPhysics3D.cpp in Sources */, 50ABBE621925AB6F00A911A9 /* CCEventListenerAcceleration.cpp in Sources */, B665E2C71AA80A6500DDB1C5 /* CCPUGravityAffector.cpp in Sources */, B665E2E31AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp in Sources */, 15AE1AB619AAD40300C27E9E /* b2ContactSolver.cpp in Sources */, 292DB13E19B4574100A80320 /* UIEditBox.cpp in Sources */, B29A7E0619EE1B7700872B35 /* extension.c in Sources */, + B6CAB3461AF9AA1A00B9B856 /* gim_box_set.cpp in Sources */, + B6CAB3701AF9AA1A00B9B856 /* btGjkConvexCast.cpp in Sources */, 3E6176681960F89B00DE83F5 /* CCController-iOS.mm in Sources */, 15AE18B219AAD33D00C27E9E /* CCBReader.cpp in Sources */, 15AE193C19AAD35100C27E9E /* CCArmatureDefine.cpp in Sources */, @@ -8883,10 +11428,12 @@ B29594B51926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */, 15AE194B19AAD35100C27E9E /* CCComRender.cpp in Sources */, 382384451A25915C002C4610 /* SpriteReader.cpp in Sources */, + B6CAB2321AF9AA1A00B9B856 /* btCollisionWorld.cpp in Sources */, 15AE1ACA19AAD40300C27E9E /* b2MouseJoint.cpp in Sources */, 15AE19AC19AAD39700C27E9E /* LoadingBarReader.cpp in Sources */, 50ABBE7E1925AB6F00A911A9 /* CCEventTouch.cpp in Sources */, 15AE183119AAD2F700C27E9E /* CCOBB.cpp in Sources */, + B6CAB4FC1AF9AA1A00B9B856 /* btConvexHull.cpp in Sources */, B29A7DCA19EE1B7700872B35 /* SlotData.c in Sources */, 15AE18C519AAD33D00C27E9E /* CCLayerLoader.cpp in Sources */, 15AE1BF719AAE01E00C27E9E /* CCControlStepper.cpp in Sources */, @@ -8898,19 +11445,25 @@ 50CB247C19D9C5A100687767 /* AudioEngine-inl.mm in Sources */, 15AE1AC819AAD40300C27E9E /* b2Joint.cpp in Sources */, 50ABBE461925AB6F00A911A9 /* CCEvent.cpp in Sources */, + B6CAB3B81AF9AA1A00B9B856 /* btGeneric6DofConstraint.cpp in Sources */, 15FB20881AE7C57D00C31518 /* shapes.cc in Sources */, + B6CAB2FE1AF9AA1A00B9B856 /* btTriangleIndexVertexArray.cpp in Sources */, 50ABBEA01925AB6F00A911A9 /* CCScheduler.cpp in Sources */, 15AE1A4119AAD3D500C27E9E /* b2Distance.cpp in Sources */, 50ABBE4E1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */, + B6CAB2761AF9AA1A00B9B856 /* btUnionFind.cpp in Sources */, 15AE1BF519AAE01E00C27E9E /* CCControlSlider.cpp in Sources */, 15AE181719AAD2F700C27E9E /* CCAttachNode.cpp in Sources */, B68779051A8CA82E00643ABF /* CCParticleSystem3D.cpp in Sources */, 15AE18B719AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */, B29A7E3819EE1B7700872B35 /* AnimationStateData.c in Sources */, + B6CAB3261AF9AA1A00B9B856 /* btGImpactBvh.cpp in Sources */, 15AE18B919AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */, + B6CAB4041AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.cpp in Sources */, 50ABBE761925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */, 15AE1AD219AAD40300C27E9E /* b2RopeJoint.cpp in Sources */, B29A7DCC19EE1B7700872B35 /* Skeleton.c in Sources */, + B6CAB2B41AF9AA1A00B9B856 /* btConvexShape.cpp in Sources */, 15AE1A4919AAD3D500C27E9E /* b2CircleShape.cpp in Sources */, 15AE184119AAD2F700C27E9E /* CCSprite3D.cpp in Sources */, 50ABBE5A1925AB6F00A911A9 /* CCEventKeyboard.cpp in Sources */, @@ -8920,11 +11473,14 @@ 3EACC9A519F5014D00EB3C5E /* CCLight.cpp in Sources */, 15AE1B7A19AADA9A00C27E9E /* UIScrollView.cpp in Sources */, 1A570076180BC5A10088DEC7 /* CCActionGrid3D.cpp in Sources */, + B6CAB38C1AF9AA1A00B9B856 /* btPolyhedralContactClipping.cpp in Sources */, + B6CAB3A41AF9AA1A00B9B856 /* btConeTwistConstraint.cpp in Sources */, 15AE19B219AAD39700C27E9E /* SliderReader.cpp in Sources */, 382383F51A258FA7002C4610 /* idl_gen_cpp.cpp in Sources */, B665E3B71AA80A6500DDB1C5 /* CCPURibbonTrail.cpp in Sources */, B665E1F31AA80A6500DDB1C5 /* CCPUAffector.cpp in Sources */, 15AE1B7E19AADA9A00C27E9E /* UIText.cpp in Sources */, + B6CAB2FA1AF9AA1A00B9B856 /* btTriangleCallback.cpp in Sources */, 15AE1A3E19AAD3D500C27E9E /* b2CollidePolygon.cpp in Sources */, 15AE1AB219AAD40300C27E9E /* b2CircleContact.cpp in Sources */, B29A7E2619EE1B7700872B35 /* Attachment.c in Sources */, @@ -8936,8 +11492,10 @@ 1A57007A180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, 15AE1AC419AAD40300C27E9E /* b2FrictionJoint.cpp in Sources */, 15AE1BEC19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */, + B6CAB2361AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.cpp in Sources */, 382383FD1A258FA7002C4610 /* idl_gen_text.cpp in Sources */, 3823841B1A2590D2002C4610 /* ComAudioReader.cpp in Sources */, + B6CAB2B01AF9AA1A00B9B856 /* btConvexPolyhedron.cpp in Sources */, 50ABBEC01925AB6F00A911A9 /* CCValue.cpp in Sources */, 50ABBD591925AB0000A911A9 /* Vec2.cpp in Sources */, B665E3CB1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp in Sources */, @@ -8947,9 +11505,11 @@ B665E3BB1AA80A6500DDB1C5 /* CCPURibbonTrailRender.cpp in Sources */, 50ABBE421925AB6F00A911A9 /* CCDirector.cpp in Sources */, 15AE1C0319AAE01E00C27E9E /* CCTableView.cpp in Sources */, + B6CAB5361AF9AA1A00B9B856 /* btVector3.cpp in Sources */, B665E39F1AA80A6500DDB1C5 /* CCPUPositionEmitter.cpp in Sources */, 1A57007E180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, 15AE1BF319AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */, + B6CAB2521AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.cpp in Sources */, B665E2D31AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.cpp in Sources */, B665E3331AA80A6500DDB1C5 /* CCPUOnEmissionObserver.cpp in Sources */, 1A570082180BC5A10088DEC7 /* CCActionManager.cpp in Sources */, @@ -8957,21 +11517,32 @@ 1A570086180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */, 15AE1AB819AAD40300C27E9E /* b2EdgeAndCircleContact.cpp in Sources */, 1A57008A180BC5A10088DEC7 /* CCActionProgressTimer.cpp in Sources */, + B6CAB5001AF9AA1A00B9B856 /* btConvexHullComputer.cpp in Sources */, B665E3EF1AA80A6600DDB1C5 /* CCPUSlaveBehaviourTranslator.cpp in Sources */, 15AE18AF19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */, B29A7DE419EE1B7700872B35 /* SkeletonBounds.c in Sources */, + B6CAB4C01AF9AA1A00B9B856 /* SpuLibspe2Support.cpp in Sources */, + B6CAB2861AF9AA1A00B9B856 /* btBvhTriangleMeshShape.cpp in Sources */, 50643BDF19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */, 50ABBED81925AB6F00A911A9 /* ZipUtils.cpp in Sources */, 15AE1B9219AADA9A00C27E9E /* UIHelper.cpp in Sources */, + B6CAB5441AF9AA1A00B9B856 /* MiniCLTask.cpp in Sources */, + B6CAAFEF1AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.cpp in Sources */, 15AE1AA119AAD40300C27E9E /* b2Body.cpp in Sources */, 15AE1ABA19AAD40300C27E9E /* b2EdgeAndPolygonContact.cpp in Sources */, 15AE181B19AAD2F700C27E9E /* CCBundle3D.cpp in Sources */, + B6CAB3341AF9AA1A00B9B856 /* btGImpactShape.cpp in Sources */, + B6CAB4C61AF9AA1A00B9B856 /* boxBoxDistance.cpp in Sources */, 1A57008E180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */, + B6CAB2A01AF9AA1A00B9B856 /* btConvex2dShape.cpp in Sources */, 1A570092180BC5A10088DEC7 /* CCActionTween.cpp in Sources */, 1A570099180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, + B6CAB1F21AF9AA1A00B9B856 /* btCollisionAlgorithm.cpp in Sources */, + B6CAAFF31AF9A9E100B9B856 /* CCPhysics3DObject.cpp in Sources */, B665E2931AA80A6500DDB1C5 /* CCPUEmitter.cpp in Sources */, 50ABBD4D1925AB0000A911A9 /* MathUtil.cpp in Sources */, 50ABBE3E1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */, + B6CAB4B21AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp in Sources */, 1A57009F180BC5D20088DEC7 /* CCNode.cpp in Sources */, 1A57010F180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */, B665E3F31AA80A6600DDB1C5 /* CCPUSlaveEmitter.cpp in Sources */, @@ -8981,32 +11552,41 @@ B29A7E0019EE1B7700872B35 /* Json.c in Sources */, 1A570120180BC90D0088DEC7 /* CCGrid.cpp in Sources */, 15AE181119AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */, + B6CAB2201AF9AA1A00B9B856 /* btBoxBoxDetector.cpp in Sources */, 5E9F612B1A3FFE3D0038DE01 /* CCPlane.cpp in Sources */, 1A57019E180BCB590088DEC7 /* CCFont.cpp in Sources */, 15AE1ACC19AAD40300C27E9E /* b2PrismaticJoint.cpp in Sources */, 15AE195F19AAD35100C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */, 15AE193019AAD35100C27E9E /* CCActionManagerEx.cpp in Sources */, 15B3708119EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp in Sources */, + B6CAB3F81AF9AA1A00B9B856 /* btMultiBody.cpp in Sources */, 503DD8E21926736A00CD74DD /* CCCommon-ios.mm in Sources */, 292DB14A19B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, + B6CAB2561AF9AA1A00B9B856 /* btGhostObject.cpp in Sources */, 15AE1A9419AAD40300C27E9E /* b2BlockAllocator.cpp in Sources */, B29A7E3C19EE1B7700872B35 /* Animation.c in Sources */, 15AE1A4D19AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, + B6CAB3D61AF9AA1A00B9B856 /* btSolve2LinearConstraint.cpp in Sources */, + B6CAB30C1AF9AA1A00B9B856 /* btTriangleMeshShape.cpp in Sources */, 1A5701A2180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, 3E61781D1966A5A300DE83F5 /* CCController.cpp in Sources */, + B6CAB41A1AF9AA1A00B9B856 /* btDantzigLCP.cpp in Sources */, 50ABC00E1926664800A911A9 /* CCFileUtils.cpp in Sources */, 299CF1FC19A434BC00C378C1 /* ccRandom.cpp in Sources */, DA8C62A319E52C6400000516 /* ioapi_mem.cpp in Sources */, 382384371A259126002C4610 /* ProjectNodeReader.cpp in Sources */, 15AE18C919AAD33D00C27E9E /* CCMenuItemLoader.cpp in Sources */, + B6CAB28A1AF9AA1A00B9B856 /* btCapsuleShape.cpp in Sources */, B665E2831AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.cpp in Sources */, 50ABBE241925AB6F00A911A9 /* base64.cpp in Sources */, B665E36F1AA80A6500DDB1C5 /* CCPUOnVelocityObserverTranslator.cpp in Sources */, 1A5701A6180BCB590088DEC7 /* CCFontAtlasCache.cpp in Sources */, 15AE192B19AAD35100C27E9E /* TriggerObj.cpp in Sources */, + B6CAAFEB1AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp in Sources */, 4D76BE3B1A4AAF0A00102962 /* CCActionTimelineNode.cpp in Sources */, 15AE198519AAD36400C27E9E /* WidgetReader.cpp in Sources */, B665E36B1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp in Sources */, + B6CAB4E41AF9AA1A00B9B856 /* SpuSampleTaskProcess.cpp in Sources */, B665E3171AA80A6500DDB1C5 /* CCPUObserverTranslator.cpp in Sources */, 15AE1AAA19AAD40300C27E9E /* b2World.cpp in Sources */, B665E2031AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.cpp in Sources */, @@ -9019,30 +11599,42 @@ 292DB16019B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */, 50ABBEAC1925AB6F00A911A9 /* ccTypes.cpp in Sources */, 15AE196A19AAD35100C27E9E /* DictionaryHelper.cpp in Sources */, + B6CAB3901AF9AA1A00B9B856 /* btRaycastCallback.cpp in Sources */, + B6CAB3CE1AF9AA1A00B9B856 /* btSequentialImpulseConstraintSolver.cpp in Sources */, B665E26B1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp in Sources */, 15AE1A3F19AAD3D500C27E9E /* b2Collision.cpp in Sources */, 1A5701BA180BCB5A0088DEC7 /* CCLabel.cpp in Sources */, 15AE18AD19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */, + B6CAB1F61AF9AA1A00B9B856 /* btDbvt.cpp in Sources */, 15AE18AB19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */, 15AE1B7219AADA9A00C27E9E /* UIListView.cpp in Sources */, 1A5701BE180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */, + B6CAB2021AF9AA1A00B9B856 /* btMultiSapBroadphase.cpp in Sources */, 15FB20751AE7BF8600C31518 /* MarchingSquare.cpp in Sources */, 15AE1A3D19AAD3D500C27E9E /* b2CollideEdge.cpp in Sources */, 1A5701C2180BCB5A0088DEC7 /* CCLabelBMFont.cpp in Sources */, 1A087AE91860400400196EF5 /* edtaa3func.cpp in Sources */, B665E33F1AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.cpp in Sources */, 15AE194219AAD35100C27E9E /* CCColliderDetector.cpp in Sources */, + B6CAB37C1AF9AA1A00B9B856 /* btGjkPairDetector.cpp in Sources */, 15AE1A9919AAD40300C27E9E /* b2Math.cpp in Sources */, + B6CAB2621AF9AA1A00B9B856 /* btManifoldResult.cpp in Sources */, B665E3771AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp in Sources */, + B6CAB4CA1AF9AA1A00B9B856 /* SpuCollisionShapes.cpp in Sources */, 15AE1B7C19AADA9A00C27E9E /* UISlider.cpp in Sources */, + B6CAAFFB1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */, B665E3471AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp in Sources */, + B6CAB2A41AF9AA1A00B9B856 /* btConvexHullShape.cpp in Sources */, 15AE1AA519AAD40300C27E9E /* b2Fixture.cpp in Sources */, B29A7DE219EE1B7700872B35 /* MeshAttachment.c in Sources */, B6D38B8F1AC3AFAC00043997 /* CCTextureCube.cpp in Sources */, + B6CAB2C01AF9AA1A00B9B856 /* btEmptyShape.cpp in Sources */, 15AE1BAD19AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */, 3823843E1A259140002C4610 /* SingleNodeReader.cpp in Sources */, + B6CAB2721AF9AA1A00B9B856 /* btSphereTriangleCollisionAlgorithm.cpp in Sources */, B29A7DDE19EE1B7700872B35 /* BoneData.c in Sources */, B665E28B1AA80A6500DDB1C5 /* CCPUDynamicAttribute.cpp in Sources */, + B6CAB5481AF9AA1A00B9B856 /* MiniCLTaskScheduler.cpp in Sources */, 15AE19AA19AAD39700C27E9E /* ListViewReader.cpp in Sources */, 1A5701C8180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, 1A5701CC180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */, @@ -9052,6 +11644,7 @@ B665E4171AA80A6600DDB1C5 /* CCPUTextureAnimatorTranslator.cpp in Sources */, 15FB20941AE7C57D00C31518 /* cdt.cc in Sources */, B665E34B1AA80A6500DDB1C5 /* CCPUOnPositionObserver.cpp in Sources */, + B6CAB42A1AF9AA1A00B9B856 /* btRaycastVehicle.cpp in Sources */, 15AE1AD619AAD40300C27E9E /* b2WheelJoint.cpp in Sources */, 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */, 1A5701DF180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, @@ -9064,6 +11657,7 @@ 18956BB31A9DFBFD006E9155 /* Particle3DReader.cpp in Sources */, 15AE184519AAD2F700C27E9E /* CCSprite3DMaterial.cpp in Sources */, 50ABBD9C1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */, + B6CAB5061AF9AA1A00B9B856 /* btGeometryUtil.cpp in Sources */, B665E25F1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.cpp in Sources */, 1A5701E7180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, 15AE1AC019AAD40300C27E9E /* b2MotorJoint.cpp in Sources */, @@ -9083,7 +11677,10 @@ 382384141A259092002C4610 /* NodeReaderProtocol.cpp in Sources */, 50ABBD511925AB0000A911A9 /* Quaternion.cpp in Sources */, 1A5701FC180BCBAD0088DEC7 /* CCMenuItem.cpp in Sources */, + 505385051B01887A00793096 /* CCProperties.cpp in Sources */, + B6CAB4201AF9AA1A00B9B856 /* btMLCPSolver.cpp in Sources */, B665E2A71AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.cpp in Sources */, + B6CAB4341AF9AA1A00B9B856 /* btGpu3DGridBroadphase.cpp in Sources */, 15AE195119AAD35100C27E9E /* CCDecorativeDisplay.cpp in Sources */, 15AE19BA19AAD39700C27E9E /* TextReader.cpp in Sources */, 50ABBD491925AB0000A911A9 /* Mat4.cpp in Sources */, @@ -9096,8 +11693,10 @@ 15AE197719AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, 15AE19B419AAD39700C27E9E /* TextAtlasReader.cpp in Sources */, B665E2A31AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp in Sources */, + B6CAB3601AF9AA1A00B9B856 /* gim_tri_collision.cpp in Sources */, 15AE194019AAD35100C27E9E /* CCBone.cpp in Sources */, 1A570215180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, + B6CAB2EE1AF9AA1A00B9B856 /* btStridingMeshInterface.cpp in Sources */, 1A570222180BCC1A0088DEC7 /* CCParticleBatchNode.cpp in Sources */, 292DB15019B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */, B665E25B1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp in Sources */, @@ -9105,7 +11704,9 @@ 15AE185F19AAD31200C27E9E /* SimpleAudioEngine.mm in Sources */, B29A7DC819EE1B7700872B35 /* SkeletonRenderer.cpp in Sources */, 15AE1BE819AAE01E00C27E9E /* CCControl.cpp in Sources */, + B6CAB4081AF9AA1A00B9B856 /* btMultiBodyJointLimitConstraint.cpp in Sources */, 1A570226180BCC1A0088DEC7 /* CCParticleExamples.cpp in Sources */, + B6CAB24A1AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.cpp in Sources */, 15AE194919AAD35100C27E9E /* CCComController.cpp in Sources */, B603F1A91AC8EA0900A9579C /* CCTerrain.cpp in Sources */, B665E3CF1AA80A6600DDB1C5 /* CCPUScriptCompiler.cpp in Sources */, @@ -9114,6 +11715,7 @@ 3EACC9A119F5014D00EB3C5E /* CCCamera.cpp in Sources */, B665E3E71AA80A6600DDB1C5 /* CCPUSineForceAffectorTranslator.cpp in Sources */, 15AE1BBD19AADFF000C27E9E /* SocketIO.cpp in Sources */, + B6CAB1FA1AF9AA1A00B9B856 /* btDbvtBroadphase.cpp in Sources */, 15AE1A4319AAD3D500C27E9E /* b2DynamicTree.cpp in Sources */, 15AE1A3A19AAD3D500C27E9E /* b2BroadPhase.cpp in Sources */, B665E42B1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.cpp in Sources */, @@ -9122,6 +11724,7 @@ 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, 38F5263F1A48363B000DB7F7 /* ArmatureNodeReader.cpp in Sources */, + B6CAB24E1AF9AA1A00B9B856 /* btDefaultCollisionConfiguration.cpp in Sources */, B665E2AB1AA80A6500DDB1C5 /* CCPUFlockCenteringAffector.cpp in Sources */, B665E3671AA80A6500DDB1C5 /* CCPUOnTimeObserverTranslator.cpp in Sources */, B665E27B1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.cpp in Sources */, @@ -9132,27 +11735,35 @@ B665E2C31AA80A6500DDB1C5 /* CCPUGeometryRotatorTranslator.cpp in Sources */, B29A7DF219EE1B7700872B35 /* AtlasAttachmentLoader.c in Sources */, 15AE1AC619AAD40300C27E9E /* b2GearJoint.cpp in Sources */, + B6CAB3301AF9AA1A00B9B856 /* btGImpactQuantizedBvh.cpp in Sources */, B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, 1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */, 50ABBD901925AB4100A911A9 /* CCGLProgramCache.cpp in Sources */, 15AE197F19AAD35700C27E9E /* CCTimeLine.cpp in Sources */, B29A7DD819EE1B7700872B35 /* SkeletonData.c in Sources */, + B6CAB2F61AF9AA1A00B9B856 /* btTriangleBuffer.cpp in Sources */, 1A57027F180BCC900088DEC7 /* CCSprite.cpp in Sources */, + B6CAB1FE1AF9AA1A00B9B856 /* btDispatcher.cpp in Sources */, B665E24F1AA80A6500DDB1C5 /* CCPUColorAffectorTranslator.cpp in Sources */, 15AE194719AAD35100C27E9E /* CCComAudio.cpp in Sources */, 15AE192719AAD35100C27E9E /* TriggerBase.cpp in Sources */, 15AE1B8819AADA9A00C27E9E /* UICheckBox.cpp in Sources */, 15AE1A4B19AAD3D500C27E9E /* b2EdgeShape.cpp in Sources */, + B6CAB3DE1AF9AA1A00B9B856 /* btTypedConstraint.cpp in Sources */, B665E3231AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp in Sources */, B665E3271AA80A6500DDB1C5 /* CCPUOnCollisionObserverTranslator.cpp in Sources */, 15AE18B519AAD33D00C27E9E /* CCBSequence.cpp in Sources */, B665E3C31AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.cpp in Sources */, B665E2631AA80A6500DDB1C5 /* CCPUDoExpireEventHandler.cpp in Sources */, + B6CAB4441AF9AA1A00B9B856 /* btParallelConstraintSolver.cpp in Sources */, B29A7DD619EE1B7700872B35 /* RegionAttachment.c in Sources */, 1A570283180BCC900088DEC7 /* CCSpriteBatchNode.cpp in Sources */, + B6CAB23A1AF9AA1A00B9B856 /* btCompoundCompoundCollisionAlgorithm.cpp in Sources */, B665E2F71AA80A6500DDB1C5 /* CCPUListener.cpp in Sources */, 1A570287180BCC900088DEC7 /* CCSpriteFrame.cpp in Sources */, + B6CAB3AA1AF9AA1A00B9B856 /* btContactConstraint.cpp in Sources */, B665E2431AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.cpp in Sources */, + B6CAB23E1AF9AA1A00B9B856 /* btConvex2dConvex2dAlgorithm.cpp in Sources */, B665E3EB1AA80A6600DDB1C5 /* CCPUSlaveBehaviour.cpp in Sources */, B665E2771AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandlerTranslator.cpp in Sources */, 15AE193E19AAD35100C27E9E /* CCBatchNode.cpp in Sources */, @@ -9163,6 +11774,7 @@ 1A570293180BCCAB0088DEC7 /* CCAnimation.cpp in Sources */, 15AE1AAE19AAD40300C27E9E /* b2ChainAndCircleContact.cpp in Sources */, 15AE194D19AAD35100C27E9E /* CCDataReaderHelper.cpp in Sources */, + 5053850D1B02819E00793096 /* CCVertexAttribBinding.cpp in Sources */, 15FB20901AE7C57D00C31518 /* advancing_front.cc in Sources */, 15AE1B8C19AADA9A00C27E9E /* UIScale9Sprite.cpp in Sources */, 15AE19AE19AAD39700C27E9E /* PageViewReader.cpp in Sources */, @@ -9172,12 +11784,14 @@ 50ABBE321925AB6F00A911A9 /* CCConfiguration.cpp in Sources */, 15AE1A9F19AAD40300C27E9E /* b2Timer.cpp in Sources */, 15AE1AD419AAD40300C27E9E /* b2WeldJoint.cpp in Sources */, + B6CAB2181AF9AA1A00B9B856 /* btBox2dBox2dCollisionAlgorithm.cpp in Sources */, 1A5702C9180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, 15AE1C1719AAE2C700C27E9E /* CCPhysicsSprite.cpp in Sources */, 1A5702EB180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, B665E4131AA80A6600DDB1C5 /* CCPUTextureAnimator.cpp in Sources */, 1A5702EF180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, 15AE1BA519AADFDF00C27E9E /* UIHBox.cpp in Sources */, + B6CAB3741AF9AA1A00B9B856 /* btGjkEpa2.cpp in Sources */, B665E3DB1AA80A6600DDB1C5 /* CCPUScriptTranslator.cpp in Sources */, B665E33B1AA80A6500DDB1C5 /* CCPUOnEventFlagObserver.cpp in Sources */, 1A5702F3180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */, @@ -9188,26 +11802,35 @@ 50ABBD3D1925AB0000A911A9 /* CCGeometry.cpp in Sources */, B665E30B1AA80A6500DDB1C5 /* CCPUNoise.cpp in Sources */, B665E26F1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp in Sources */, + B6CAB51A1AF9AA1A00B9B856 /* btPolarDecomposition.cpp in Sources */, 15AE18D919AAD33D00C27E9E /* CCSpriteLoader.cpp in Sources */, 50ABBECC1925AB6F00A911A9 /* s3tc.cpp in Sources */, 15AE1B7819AADA9A00C27E9E /* UIRichText.cpp in Sources */, B29A7E3019EE1B7700872B35 /* SkeletonAnimation.cpp in Sources */, 15AE195D19AAD35100C27E9E /* CCSkin.cpp in Sources */, B665E2DB1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.cpp in Sources */, + B6CAB25A1AF9AA1A00B9B856 /* btHashedSimplePairCache.cpp in Sources */, + B6CAB2E61AF9AA1A00B9B856 /* btSphereShape.cpp in Sources */, + B6CAB2B81AF9AA1A00B9B856 /* btConvexTriangleMeshShape.cpp in Sources */, + B6CAB27A1AF9AA1A00B9B856 /* SphereTriangleDetector.cpp in Sources */, 1A5702F7180BCE750088DEC7 /* CCTMXTiledMap.cpp in Sources */, 50ABBEC61925AB6F00A911A9 /* etc1.cpp in Sources */, 50ABBE8C1925AB6F00A911A9 /* CCNS.cpp in Sources */, B29A7DE019EE1B7700872B35 /* IkConstraintData.c in Sources */, + B6CAB40C1AF9AA1A00B9B856 /* btMultiBodyJointMotor.cpp in Sources */, + B6CAB2D21AF9AA1A00B9B856 /* btMultiSphereShape.cpp in Sources */, B29A7DFC19EE1B7700872B35 /* spine-cocos2dx.cpp in Sources */, D0FD03501A3B51AA00825BB5 /* CCAllocatorGlobal.cpp in Sources */, B665E2231AA80A6500DDB1C5 /* CCPUBehaviourTranslator.cpp in Sources */, B665E3D71AA80A6600DDB1C5 /* CCPUScriptParser.cpp in Sources */, B665E2331AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp in Sources */, 15AE1BA919AADFDF00C27E9E /* UIVBox.cpp in Sources */, + B6CAB3021AF9AA1A00B9B856 /* btTriangleIndexVertexMaterialArray.cpp in Sources */, 50ABBDAE1925AB4100A911A9 /* CCRenderer.cpp in Sources */, B665E3AF1AA80A6500DDB1C5 /* CCPURender.cpp in Sources */, 382383FB1A258FA7002C4610 /* idl_gen_go.cpp in Sources */, B665E2EF1AA80A6500DDB1C5 /* CCPULineEmitter.cpp in Sources */, + B6CAB2EA1AF9AA1A00B9B856 /* btStaticPlaneShape.cpp in Sources */, 38D9629E1ACA9721007C6FAF /* CocoStudio.cpp in Sources */, 50ABBDBA1925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */, 1A5702FB180BCE750088DEC7 /* CCTMXXMLParser.cpp in Sources */, @@ -9215,8 +11838,10 @@ 1A570301180BCE890088DEC7 /* CCParallaxNode.cpp in Sources */, B665E1FF1AA80A6500DDB1C5 /* CCPUAlignAffector.cpp in Sources */, 15AE1A4519AAD3D500C27E9E /* b2TimeOfImpact.cpp in Sources */, + B6CAB3681AF9AA1A00B9B856 /* btConvexCast.cpp in Sources */, 1A57030D180BCF190088DEC7 /* CCComponent.cpp in Sources */, 15AE1B8F19AADA9A00C27E9E /* UIDeprecated.cpp in Sources */, + B6CAB2BC1AF9AA1A00B9B856 /* btCylinderShape.cpp in Sources */, 464AD6E6197EBB1400E502D8 /* pvr.cpp in Sources */, 5E9F61271A3FFE3D0038DE01 /* CCFrustum.cpp in Sources */, B665E22B1AA80A6500DDB1C5 /* CCPUBoxCollider.cpp in Sources */, @@ -9229,7 +11854,9 @@ 15AE195319AAD35100C27E9E /* CCDisplayFactory.cpp in Sources */, 182C5CD71A98F30500C30D34 /* Sprite3DReader.cpp in Sources */, 50ABC0061926664800A911A9 /* CCThread-apple.mm in Sources */, + B6CAB4B81AF9AA1A00B9B856 /* SpuFakeDma.cpp in Sources */, 50ABBEB61925AB6F00A911A9 /* CCUserDefault-android.cpp in Sources */, + B6CAB4481AF9AA1A00B9B856 /* btThreadSupportInterface.cpp in Sources */, 1A57034C180BD09B0088DEC7 /* tinyxml2.cpp in Sources */, 50ABBDB61925AB4100A911A9 /* CCTexture2D.cpp in Sources */, B665E2871AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.cpp in Sources */, @@ -9244,6 +11871,7 @@ 382384101A259092002C4610 /* NodeReaderDefine.cpp in Sources */, 15AE195B19AAD35100C27E9E /* CCSGUIReader.cpp in Sources */, 50ABBD881925AB4100A911A9 /* CCCustomCommand.cpp in Sources */, + B6CAB4301AF9AA1A00B9B856 /* btWheelInfo.cpp in Sources */, 15AE19B019AAD39700C27E9E /* ScrollViewReader.cpp in Sources */, 50ABBE941925AB6F00A911A9 /* CCProfiling.cpp in Sources */, 5012169B1AC473A3009A4BEA /* CCTechnique.cpp in Sources */, @@ -9251,38 +11879,57 @@ 50ABBE5E1925AB6F00A911A9 /* CCEventListener.cpp in Sources */, 5012168F1AC47380009A4BEA /* CCRenderState.cpp in Sources */, 15AE1BC719AAE00000C27E9E /* AssetsManager.cpp in Sources */, + B6CAB3861AF9AA1A00B9B856 /* btPersistentManifold.cpp in Sources */, 50ABBEA81925AB6F00A911A9 /* CCTouch.cpp in Sources */, B29A7DEE19EE1B7700872B35 /* IkConstraint.c in Sources */, + B6CAB3781AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.cpp in Sources */, B665E37F1AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.cpp in Sources */, 15AE1A9619AAD40300C27E9E /* b2Draw.cpp in Sources */, 503DD8E91926736A00CD74DD /* CCES2Renderer-ios.m in Sources */, 5027253D190BF1B900AAF4ED /* cocos2d.cpp in Sources */, B29A7E0819EE1B7700872B35 /* SkinnedMeshAttachment.c in Sources */, + B6CAB3F61AF9AA1A00B9B856 /* Bullet-C-API.cpp in Sources */, + B6CAB2AC1AF9AA1A00B9B856 /* btConvexPointCloudShape.cpp in Sources */, + B6CAB22C1AF9AA1A00B9B856 /* btCollisionObject.cpp in Sources */, 15AE183919AAD2F700C27E9E /* CCRay.cpp in Sources */, 15FB206B1AE7BE7400C31518 /* SpritePolygon.cpp in Sources */, 15AE1B8219AADA9A00C27E9E /* UITextBMFont.cpp in Sources */, + B6CAB29C1AF9AA1A00B9B856 /* btConeShape.cpp in Sources */, 50ABBE6A1925AB6F00A911A9 /* CCEventListenerFocus.cpp in Sources */, + B6CAB3201AF9AA1A00B9B856 /* btGenericPoolAllocator.cpp in Sources */, 50ABBE661925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */, 503DD8F81926B0DB00CD74DD /* CCIMEDispatcher.cpp in Sources */, 50ABBDB21925AB4100A911A9 /* ccShaders.cpp in Sources */, 50ABBD451925AB0000A911A9 /* CCVertex.cpp in Sources */, 50ABBEB01925AB6F00A911A9 /* CCUserDefault.cpp in Sources */, + B6CAB3E21AF9AA1A00B9B856 /* btUniversalConstraint.cpp in Sources */, 50ABBE521925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */, + B6CAB3821AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.cpp in Sources */, + B6CAB3641AF9AA1A00B9B856 /* btContinuousConvexCollision.cpp in Sources */, 52B47A2F1A5349A3004E4C60 /* HttpAsynConnection.m in Sources */, B665E23B1AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp in Sources */, 15AE1B8019AADA9A00C27E9E /* UITextAtlas.cpp in Sources */, 15AE195919AAD35100C27E9E /* CCProcessBase.cpp in Sources */, B665E3FF1AA80A6600DDB1C5 /* CCPUSphereCollider.cpp in Sources */, 15AE18D319AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, + B6CAB4CE1AF9AA1A00B9B856 /* SpuContactResult.cpp in Sources */, + B6CAB3C41AF9AA1A00B9B856 /* btHingeConstraint.cpp in Sources */, + B6CAB52C1AF9AA1A00B9B856 /* btSerializer.cpp in Sources */, B665E2371AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.cpp in Sources */, 15AE196319AAD35100C27E9E /* CCTransformHelp.cpp in Sources */, + B6CAB34C1AF9AA1A00B9B856 /* gim_contact.cpp in Sources */, 15AE19A819AAD39700C27E9E /* LayoutReader.cpp in Sources */, 1A01C68B18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, 15AE195719AAD35100C27E9E /* CCInputDelegate.cpp in Sources */, + B6CAB32A1AF9AA1A00B9B856 /* btGImpactCollisionAlgorithm.cpp in Sources */, 15AE1B8A19AADA9A00C27E9E /* UIImageView.cpp in Sources */, 50ABBD391925AB0000A911A9 /* CCAffineTransform.cpp in Sources */, + B6CAB5421AF9AA1A00B9B856 /* MiniCL.cpp in Sources */, + B6CAB4AE1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp in Sources */, B665E3831AA80A6500DDB1C5 /* CCPUPathFollower.cpp in Sources */, 15AE1C1519AAE2C700C27E9E /* CCPhysicsDebugNode.cpp in Sources */, + B6CAB31C1AF9AA1A00B9B856 /* btContactProcessing.cpp in Sources */, + B6CAB4141AF9AA1A00B9B856 /* btMultiBodyPoint2Point.cpp in Sources */, 50ABBD841925AB4100A911A9 /* CCBatchCommand.cpp in Sources */, B665E2171AA80A6500DDB1C5 /* CCPUBeamRender.cpp in Sources */, 50ABBDA81925AB4100A911A9 /* CCRenderCommand.cpp in Sources */, @@ -9293,8 +11940,10 @@ B665E20F1AA80A6500DDB1C5 /* CCPUBaseForceAffector.cpp in Sources */, 15AE1B7419AADA9A00C27E9E /* UILoadingBar.cpp in Sources */, 50ABBEA41925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, + B6CAB3E81AF9AA1A00B9B856 /* btDiscreteDynamicsWorld.cpp in Sources */, 501216A11AC473AD009A4BEA /* CCMaterial.cpp in Sources */, B665E3971AA80A6500DDB1C5 /* CCPUPointEmitter.cpp in Sources */, + B6CAB1E81AF9AA1A00B9B856 /* btAxisSweep3.cpp in Sources */, B29A7DD219EE1B7700872B35 /* Skin.c in Sources */, 3E6176761960F89B00DE83F5 /* CCEventListenerController.cpp in Sources */, 15AE1AC219AAD40300C27E9E /* b2DistanceJoint.cpp in Sources */, @@ -9304,12 +11953,16 @@ 52B47A311A5349A3004E4C60 /* HttpCookie.cpp in Sources */, 15B3707919EE414C00ABE682 /* AssetsManagerEx.cpp in Sources */, 50ABBDA41925AB4100A911A9 /* CCQuadCommand.cpp in Sources */, + B6CAB2981AF9AA1A00B9B856 /* btConcaveShape.cpp in Sources */, 15AE18C319AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, + B6CAB2CE1AF9AA1A00B9B856 /* btMultimaterialTriangleMeshShape.cpp in Sources */, 15AE197919AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, 1AAF5850180E40B9000584C8 /* LocalStorage.cpp in Sources */, 50ED2BE519BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */, 15AE192E19AAD35100C27E9E /* CCActionFrameEasing.cpp in Sources */, + B6CAB2281AF9AA1A00B9B856 /* btCollisionDispatcher.cpp in Sources */, B665E3531AA80A6500DDB1C5 /* CCPUOnQuotaObserver.cpp in Sources */, + B6CAB4DA1AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.cpp in Sources */, B665E29F1AA80A6500DDB1C5 /* CCPUEventHandler.cpp in Sources */, 15AE195519AAD35100C27E9E /* CCDisplayManager.cpp in Sources */, B665E43B1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.cpp in Sources */, @@ -9317,6 +11970,7 @@ 15AE1BA719AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */, 15AE1ACE19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */, B665E2DF1AA80A6500DDB1C5 /* CCPULineAffector.cpp in Sources */, + B6CAB2E21AF9AA1A00B9B856 /* btShapeHull.cpp in Sources */, 1A9DCA28180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, 15AE1BF919AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */, B665E3FB1AA80A6600DDB1C5 /* CCPUSphere.cpp in Sources */, @@ -9324,46 +11978,60 @@ B665E20B1AA80A6500DDB1C5 /* CCPUBaseColliderTranslator.cpp in Sources */, B665E3D31AA80A6600DDB1C5 /* CCPUScriptLexer.cpp in Sources */, 50ABBE201925AB6F00A911A9 /* atitc.cpp in Sources */, + B6CAB2101AF9AA1A00B9B856 /* btSimpleBroadphase.cpp in Sources */, B665E3131AA80A6500DDB1C5 /* CCPUObserverManager.cpp in Sources */, 50CB248019D9C5A100687767 /* AudioPlayer.mm in Sources */, 50ABBE9A1925AB6F00A911A9 /* CCRef.cpp in Sources */, 15AE18BF19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */, + B6CAB27E1AF9AA1A00B9B856 /* btBox2dShape.cpp in Sources */, 15AE1B9519AADA9A00C27E9E /* CocosGUI.cpp in Sources */, B665E2BB1AA80A6500DDB1C5 /* CCPUForceFieldAffectorTranslator.cpp in Sources */, 15AE180919AAD2F700C27E9E /* CCAABB.cpp in Sources */, 15AE1AA719AAD40300C27E9E /* b2Island.cpp in Sources */, B665E23F1AA80A6500DDB1C5 /* CCPUCircleEmitterTranslator.cpp in Sources */, + B6CAB3A01AF9AA1A00B9B856 /* btKinematicCharacterController.cpp in Sources */, 3E6176741960F89B00DE83F5 /* CCEventController.cpp in Sources */, 182C5CB41A95964C00C30D34 /* Node3DReader.cpp in Sources */, B63990CD1A490AFE00B07923 /* CCAsyncTaskPool.cpp in Sources */, 50ABBE361925AB6F00A911A9 /* CCConsole.cpp in Sources */, B29A7E1419EE1B7700872B35 /* Bone.c in Sources */, + B6CAB4F01AF9AA1A00B9B856 /* Win32ThreadSupport.cpp in Sources */, B665E4371AA80A6600DDB1C5 /* CCPUVortexAffector.cpp in Sources */, B665E2F31AA80A6500DDB1C5 /* CCPULineEmitterTranslator.cpp in Sources */, B665E3731AA80A6500DDB1C5 /* CCPUParticleFollower.cpp in Sources */, B665E41F1AA80A6600DDB1C5 /* CCPUTextureRotatorTranslator.cpp in Sources */, 503DD8E51926736A00CD74DD /* CCDirectorCaller-ios.mm in Sources */, B665E2571AA80A6500DDB1C5 /* CCPUDoAffectorEventHandlerTranslator.cpp in Sources */, + B6CAAFF71AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */, 15AE194519AAD35100C27E9E /* CCComAttribute.cpp in Sources */, 15AE18CC19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */, 50CB247819D9C5A100687767 /* AudioCache.mm in Sources */, B665E4231AA80A6600DDB1C5 /* CCPUTranslateManager.cpp in Sources */, + B6CAB3081AF9AA1A00B9B856 /* btTriangleMesh.cpp in Sources */, 50ABBD5D1925AB0000A911A9 /* Vec3.cpp in Sources */, + B6CAB2061AF9AA1A00B9B856 /* btOverlappingPairCache.cpp in Sources */, 38B8E2D619E66581002D7CE7 /* CSLoader.cpp in Sources */, B665E3B31AA80A6500DDB1C5 /* CCPURendererTranslator.cpp in Sources */, + B6CAAFE71AF9A9E100B9B856 /* CCPhysics3DComponent.cpp in Sources */, + B6CAB2141AF9AA1A00B9B856 /* btActivatingCollisionAlgorithm.cpp in Sources */, + B6CAB26A1AF9AA1A00B9B856 /* btSphereBoxCollisionAlgorithm.cpp in Sources */, 50ABC0121926664800A911A9 /* CCGLView.cpp in Sources */, + B6CAB3EE1AF9AA1A00B9B856 /* btRigidBody.cpp in Sources */, B665E3871AA80A6500DDB1C5 /* CCPUPathFollowerTranslator.cpp in Sources */, B665E27F1AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.cpp in Sources */, 50ABC0021926664800A911A9 /* CCLock-apple.cpp in Sources */, + B6CAB33A1AF9AA1A00B9B856 /* btTriangleShapeEx.cpp in Sources */, 50ABBEBC1925AB6F00A911A9 /* ccUtils.cpp in Sources */, 15AE1A4719AAD3D500C27E9E /* b2ChainShape.cpp in Sources */, 50ABBE721925AB6F00A911A9 /* CCEventListenerMouse.cpp in Sources */, + B6CAB3B41AF9AA1A00B9B856 /* btGearConstraint.cpp in Sources */, B665E41B1AA80A6600DDB1C5 /* CCPUTextureRotator.cpp in Sources */, B665E2971AA80A6500DDB1C5 /* CCPUEmitterManager.cpp in Sources */, 50ABC0001926664800A911A9 /* CCFileUtils-apple.mm in Sources */, 50ABBEB81925AB6F00A911A9 /* ccUTF8.cpp in Sources */, 15AE194F19AAD35100C27E9E /* CCDatas.cpp in Sources */, 50ABBE841925AB6F00A911A9 /* ccFPSImages.c in Sources */, + B6CAB2C41AF9AA1A00B9B856 /* btHeightfieldTerrainShape.cpp in Sources */, 50ABBE4A1925AB6F00A911A9 /* CCEventAcceleration.cpp in Sources */, 15AE1AA319AAD40300C27E9E /* b2ContactManager.cpp in Sources */, B665E3A31AA80A6500DDB1C5 /* CCPUPositionEmitterTranslator.cpp in Sources */, @@ -9374,6 +12042,7 @@ B665E31F1AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp in Sources */, B665E4331AA80A6600DDB1C5 /* CCPUVertexEmitter.cpp in Sources */, B665E3C71AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.cpp in Sources */, + B6CAB26E1AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.cpp in Sources */, 50ABBED01925AB6F00A911A9 /* TGAlib.cpp in Sources */, 1A01C68518F57BE800EFE3A6 /* CCArray.cpp in Sources */, B665E2AF1AA80A6500DDB1C5 /* CCPUFlockCenteringAffectorTranslator.cpp in Sources */, @@ -9383,16 +12052,22 @@ B29A7DDC19EE1B7700872B35 /* Event.c in Sources */, 50ABBEB41925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */, 1A1645B1191B726C008C7C7F /* ConvertUTF.c in Sources */, + B6CAB2F21AF9AA1A00B9B856 /* btTetrahedronShape.cpp in Sources */, B665E2FF1AA80A6500DDB1C5 /* CCPUMaterialTranslator.cpp in Sources */, 50ABBE3A1925AB6F00A911A9 /* CCData.cpp in Sources */, + B6CAB3121AF9AA1A00B9B856 /* btUniformScalingShape.cpp in Sources */, 1A1645B3191B726C008C7C7F /* ConvertUTFWrapper.cpp in Sources */, 15B3708519EE414C00ABE682 /* Downloader.cpp in Sources */, 1ABA68AF1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */, + B6CAB2DE1AF9AA1A00B9B856 /* btScaledBvhTriangleMeshShape.cpp in Sources */, 15AE180D19AAD2F700C27E9E /* CCAnimate3D.cpp in Sources */, + B6CAB1EE1AF9AA1A00B9B856 /* btBroadphaseProxy.cpp in Sources */, 50ABBE7A1925AB6F00A911A9 /* CCEventMouse.cpp in Sources */, B665E3BF1AA80A6500DDB1C5 /* CCPUScaleAffector.cpp in Sources */, 15EFA212198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */, 50ABBD981925AB4100A911A9 /* CCGLProgramStateCache.cpp in Sources */, + B6CAB4A61AF9AA1A00B9B856 /* SequentialThreadSupport.cpp in Sources */, + B6CAB25E1AF9AA1A00B9B856 /* btInternalEdgeUtility.cpp in Sources */, B665E3631AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp in Sources */, 15AE1BBF19AADFF000C27E9E /* WebSocket.cpp in Sources */, ); @@ -9417,6 +12092,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; @@ -9451,6 +12127,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; diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index ec974eff9a..eab49fc95a 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -836,6 +836,8 @@ B63993321A49359F00B07923 /* Particle3D in Resources */ = {isa = PBXBuildFile; fileRef = B63993301A49359F00B07923 /* Particle3D */; }; B6C039D919C95D83007207DC /* LightTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6C039D719C95D83007207DC /* LightTest.cpp */; }; B6C039DA19C95D83007207DC /* LightTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6C039D719C95D83007207DC /* LightTest.cpp */; }; + B6CAB54E1AF9AA6C00B9B856 /* Physics3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB54C1AF9AA6C00B9B856 /* Physics3DTest.cpp */; }; + B6CAB54F1AF9AA6C00B9B856 /* Physics3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB54C1AF9AA6C00B9B856 /* Physics3DTest.cpp */; }; C04F935A1941B05400E9FEAB /* TileMapTest2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C04F93581941B05400E9FEAB /* TileMapTest2.cpp */; }; C04F935B1941B05400E9FEAB /* TileMapTest2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C04F93581941B05400E9FEAB /* TileMapTest2.cpp */; }; C08689C118D370C90093E810 /* background.caf in Resources */ = {isa = PBXBuildFile; fileRef = C08689C018D370C90093E810 /* background.caf */; }; @@ -1781,6 +1783,8 @@ B63993301A49359F00B07923 /* Particle3D */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Particle3D; path = "../tests/cpp-tests/Resources/Particle3D"; sourceTree = ""; }; B6C039D719C95D83007207DC /* LightTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LightTest.cpp; path = LightTest/LightTest.cpp; sourceTree = ""; }; B6C039D819C95D83007207DC /* LightTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LightTest.h; path = LightTest/LightTest.h; sourceTree = ""; }; + B6CAB54C1AF9AA6C00B9B856 /* Physics3DTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Physics3DTest.cpp; path = Physics3DTest/Physics3DTest.cpp; sourceTree = ""; }; + B6CAB54D1AF9AA6C00B9B856 /* Physics3DTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Physics3DTest.h; path = Physics3DTest/Physics3DTest.h; sourceTree = ""; }; C04F93581941B05400E9FEAB /* TileMapTest2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TileMapTest2.cpp; sourceTree = ""; }; C04F93591941B05400E9FEAB /* TileMapTest2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TileMapTest2.h; sourceTree = ""; }; C08689C018D370C90093E810 /* background.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = background.caf; path = "../tests/cpp-tests/Resources/background.caf"; sourceTree = ""; }; @@ -2199,6 +2203,7 @@ 1AC3592418CECF0A00F37B72 /* Classes */ = { isa = PBXGroup; children = ( + B6CAB54B1AF9AA4B00B9B856 /* Physics3DTest */, 5046AB471AF2A8D80060550B /* MaterialSystemTest */, 6886696E1AE8E8A000C2CFD9 /* SpritePolygonTest */, B603F1AC1AC8EA2E00A9579C /* TerrainTest */, @@ -4030,6 +4035,15 @@ name = LightTest; sourceTree = ""; }; + B6CAB54B1AF9AA4B00B9B856 /* Physics3DTest */ = { + isa = PBXGroup; + children = ( + B6CAB54C1AF9AA6C00B9B856 /* Physics3DTest.cpp */, + B6CAB54D1AF9AA6C00B9B856 /* Physics3DTest.h */, + ); + name = Physics3DTest; + sourceTree = ""; + }; D0FD03611A3B543700825BB5 /* AllocatorTest */ = { isa = PBXGroup; children = ( @@ -4881,6 +4895,7 @@ 1AC35C2F18CECF0C00F37B72 /* PerformanceParticleTest.cpp in Sources */, 1AC35B4918CECF0C00F37B72 /* Bug-914.cpp in Sources */, 1AC35B6318CECF0C00F37B72 /* EffectsAdvancedTest.cpp in Sources */, + B6CAB54E1AF9AA6C00B9B856 /* Physics3DTest.cpp in Sources */, B639932E1A490EC700B07923 /* Particle3DTest.cpp in Sources */, 1AC35C5F18CECF0C00F37B72 /* Paddle.cpp in Sources */, 1AC35BDB18CECF0C00F37B72 /* SceneEditorTest.cpp in Sources */, @@ -5049,6 +5064,7 @@ 1AC35BEC18CECF0C00F37B72 /* CCControlSliderTest.cpp in Sources */, 29080DB4191B595E0066F8DF /* UILayoutTest_Editor.cpp in Sources */, 1AC35C4E18CECF0C00F37B72 /* SpineTest.cpp in Sources */, + B6CAB54F1AF9AA6C00B9B856 /* Physics3DTest.cpp in Sources */, 1AC35C1E18CECF0C00F37B72 /* NewRendererTest.cpp in Sources */, 5EBEECB11995247000429821 /* DrawNode3D.cpp in Sources */, 1AC35B6818CECF0C00F37B72 /* AnimationsTestLayer.cpp in Sources */, @@ -5910,6 +5926,7 @@ "COCOS2D_DEBUG=1", USE_FILE32API, "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + "CC_ENABLE_BULLET_INTEGRATION=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -5938,6 +5955,7 @@ NDEBUG, USE_FILE32API, "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + "CC_ENABLE_BULLET_INTEGRATION=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES; diff --git a/build/win32-msvc-2012-x86.cmd b/build/win32-msvc-2012-x86.cmd deleted file mode 100644 index 7331e5b6b4..0000000000 --- a/build/win32-msvc-2012-x86.cmd +++ /dev/null @@ -1,8 +0,0 @@ -@echo off -SETLOCAL - -:start -mkdir win32-msvc-vs2012-x86 -cd win32-msvc-vs2012-x86 -cmake -G "Visual Studio 11" ../.. -pause diff --git a/cocos/2d/CCActionInterval.cpp b/cocos/2d/CCActionInterval.cpp index 569d831ae8..69835dc9d0 100644 --- a/cocos/2d/CCActionInterval.cpp +++ b/cocos/2d/CCActionInterval.cpp @@ -165,7 +165,7 @@ Sequence* Sequence::createWithTwoActions(FiniteTimeAction *actionOne, FiniteTime return sequence; } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) Sequence* Sequence::variadicCreate(FiniteTimeAction *action1, ...) { va_list params; @@ -554,7 +554,7 @@ RepeatForever *RepeatForever::reverse() const // Spawn // -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) Spawn* Spawn::variadicCreate(FiniteTimeAction *action1, ...) { va_list params; @@ -2511,4 +2511,60 @@ void TargetedAction::setForcedTarget(Node* forcedTarget) } } +// ActionFloat + +ActionFloat* ActionFloat::create(float duration, float from, float to, ActionFloatCallback callback) +{ + auto ref = new (std::nothrow) ActionFloat(); + if (ref && ref->initWithDuration(duration, from, to, callback)) + { + ref->autorelease(); + return ref; + } + CC_SAFE_DELETE(ref); + return ref; +} + +bool ActionFloat::initWithDuration(float duration, float from, float to, ActionFloatCallback callback) +{ + if (ActionInterval::initWithDuration(duration)) + { + _from = from; + _to = to; + _callback = callback; + return true; + } + return false; +} + +ActionFloat* ActionFloat::clone() const +{ + auto a = new (std::nothrow) ActionFloat(); + a->initWithDuration(_duration, _from, _to, _callback); + a->autorelease(); + return a; +} + +void ActionFloat::startWithTarget(Node *target) +{ + ActionInterval::startWithTarget(target); + _delta = _to - _from; +} + +void ActionFloat::update(float delta) +{ + float value = _to - _delta * (1 - delta); + + if (_callback) + { + // report back value to caller + _callback(value); + } +} + +ActionFloat* ActionFloat::reverse() const +{ + return ActionFloat::create(_duration, _to, _from, _callback); +} + NS_CC_END diff --git a/cocos/2d/CCActionInterval.h b/cocos/2d/CCActionInterval.h index a489d56639..458263df04 100644 --- a/cocos/2d/CCActionInterval.h +++ b/cocos/2d/CCActionInterval.h @@ -124,8 +124,8 @@ public: * * @return An autoreleased Sequence object. */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // WP8 in VS2012 does not support nullptr in variable args lists and variadic templates are also not supported +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) + // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported typedef FiniteTimeAction* M; static Sequence* create(M m1, std::nullptr_t listEnd) { return variadicCreate(m1, NULL); } static Sequence* create(M m1, M m2, std::nullptr_t listEnd) { return variadicCreate(m1, m2, NULL); } @@ -351,8 +351,8 @@ public: * * @return An autoreleased Spawn object. */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // WP8 in VS2012 does not support nullptr in variable args lists and variadic templates are also not supported. +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) + // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported. typedef FiniteTimeAction* M; static Spawn* create(M m1, std::nullptr_t listEnd) { return variadicCreate(m1, NULL); } static Spawn* create(M m1, M m2, std::nullptr_t listEnd) { return variadicCreate(m1, m2, NULL); } @@ -1525,6 +1525,58 @@ private: CC_DISALLOW_COPY_AND_ASSIGN(TargetedAction); }; +/** + * @class ActionFloat + * @brief Action used to animate any value in range [from,to] over specified time interval + */ +class CC_DLL ActionFloat : public ActionInterval +{ +public: + /** + * Callback function used to report back result + */ + typedef std::function ActionFloatCallback; + + /** + * Creates FloatAction with specified duration, from value, to value and callback to report back + * results + * @param duration of the action + * @param from value to start from + * @param to value to be at the end of the action + * @param callback to report back result + * + * @return An autoreleased ActionFloat object + */ + static ActionFloat* create(float duration, float from, float to, ActionFloatCallback callback); + + /** + * Overrided ActionInterval methods + */ + void startWithTarget(Node* target) override; + void update(float delta) override; + ActionFloat* reverse() const override; + ActionFloat* clone() const override; + +CC_CONSTRUCTOR_ACCESS: + ActionFloat() {}; + virtual ~ActionFloat() {}; + + bool initWithDuration(float duration, float from, float to, ActionFloatCallback callback); + +protected: + /* From value */ + float _from; + /* To value */ + float _to; + /* delta time */ + float _delta; + + /* Callback to report back results */ + ActionFloatCallback _callback; +private: + CC_DISALLOW_COPY_AND_ASSIGN(ActionFloat); +}; + // end of actions group /// @} diff --git a/cocos/2d/CCCamera.cpp b/cocos/2d/CCCamera.cpp index 1c86177f62..095ae6c248 100644 --- a/cocos/2d/CCCamera.cpp +++ b/cocos/2d/CCCamera.cpp @@ -205,14 +205,6 @@ bool Camera::initPerspective(float fieldOfView, float aspectRatio, float nearPla _nearPlane = nearPlane; _farPlane = farPlane; Mat4::createPerspective(_fieldOfView, _aspectRatio, _nearPlane, _farPlane, &_projection); -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - //if needed, we need to add a rotation for Landscape orientations on Windows Phone 8 since it is always in Portrait Mode - GLView* view = Director::getInstance()->getOpenGLView(); - if(view != nullptr) - { - setAdditionalProjection(view->getOrientationMatrix()); - } -#endif _viewProjectionDirty = true; _frustumDirty = true; @@ -226,14 +218,6 @@ bool Camera::initOrthographic(float zoomX, float zoomY, float nearPlane, float f _nearPlane = nearPlane; _farPlane = farPlane; Mat4::createOrthographicOffCenter(0, _zoom[0], 0, _zoom[1], _nearPlane, _farPlane, &_projection); -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - //if needed, we need to add a rotation for Landscape orientations on Windows Phone 8 since it is always in Portrait Mode - GLView* view = Director::getInstance()->getOpenGLView(); - if(view != nullptr) - { - setAdditionalProjection(view->getOrientationMatrix()); - } -#endif _viewProjectionDirty = true; _frustumDirty = true; diff --git a/cocos/2d/CCComponentContainer.cpp b/cocos/2d/CCComponentContainer.cpp index 544b3d8077..0de3cd8cdc 100644 --- a/cocos/2d/CCComponentContainer.cpp +++ b/cocos/2d/CCComponentContainer.cpp @@ -156,4 +156,19 @@ bool ComponentContainer::isEmpty() const return (_components == nullptr || _components->empty()); } +void ComponentContainer::onEnter() +{ + for (auto iter = _components->begin(); iter != _components->end(); ++iter) + { + iter->second->onEnter(); + } +} +void ComponentContainer::onExit() +{ + for (auto iter = _components->begin(); iter != _components->end(); ++iter) + { + iter->second->onExit(); + } +} + NS_CC_END diff --git a/cocos/2d/CCComponentContainer.h b/cocos/2d/CCComponentContainer.h index a524384d40..357e082eb3 100644 --- a/cocos/2d/CCComponentContainer.h +++ b/cocos/2d/CCComponentContainer.h @@ -58,6 +58,10 @@ public: virtual bool remove(Component *com); virtual void removeAll(); virtual void visit(float delta); + + virtual void onEnter(); + virtual void onExit(); + public: bool isEmpty() const; diff --git a/cocos/2d/CCFontFNT.cpp b/cocos/2d/CCFontFNT.cpp index 3427f4bb8f..838cdf160f 100644 --- a/cocos/2d/CCFontFNT.cpp +++ b/cocos/2d/CCFontFNT.cpp @@ -298,7 +298,7 @@ std::set* BMFontConfiguration::parseConfigFile(const std::string& int parseCount = 0; while (next) { - lineLength = next - base; + lineLength = ((int)(next - base)); memcpy(line, contents + parseCount, lineLength); line[lineLength] = 0; diff --git a/cocos/2d/CCFontFreeType.cpp b/cocos/2d/CCFontFreeType.cpp index 446c24f0d3..3312bbc8dc 100644 --- a/cocos/2d/CCFontFreeType.cpp +++ b/cocos/2d/CCFontFreeType.cpp @@ -269,10 +269,11 @@ unsigned char* FontFreeType::getGlyphBitmap(unsigned short theChar, long &outWid break; } - outRect.origin.x = _fontRef->glyph->metrics.horiBearingX >> 6; - outRect.origin.y = - (_fontRef->glyph->metrics.horiBearingY >> 6); - outRect.size.width = (_fontRef->glyph->metrics.width >> 6); - outRect.size.height = (_fontRef->glyph->metrics.height >> 6); + auto& metrics = _fontRef->glyph->metrics; + outRect.origin.x = metrics.horiBearingX >> 6; + outRect.origin.y = -(metrics.horiBearingY >> 6); + outRect.size.width = (metrics.width >> 6); + outRect.size.height = (metrics.height >> 6); xAdvance = (static_cast(_fontRef->glyph->metrics.horiAdvance >> 6)); @@ -294,35 +295,49 @@ unsigned char* FontFreeType::getGlyphBitmap(unsigned short theChar, long &outWid break; } - auto outlineWidth = (bbox.xMax - bbox.xMin)>>6; - auto outlineHeight = (bbox.yMax - bbox.yMin)>>6; + long glyphMinX = outRect.origin.x; + long glyphMaxX = outRect.origin.x + outWidth; + long glyphMinY = -outHeight - outRect.origin.y; + long glyphMaxY = -outRect.origin.y; - auto blendWidth = outlineWidth > outWidth ? outlineWidth : outWidth; - auto blendHeight = outlineHeight > outHeight ? outlineHeight : outHeight; + auto outlineMinX = bbox.xMin >> 6; + auto outlineMaxX = bbox.xMax >> 6; + auto outlineMinY = bbox.yMin >> 6; + auto outlineMaxY = bbox.yMax >> 6; + auto outlineWidth = outlineMaxX - outlineMinX; + auto outlineHeight = outlineMaxY - outlineMinY; - long index,index2; + auto blendImageMinX = MIN(outlineMinX, glyphMinX); + auto blendImageMaxY = MAX(outlineMaxY, glyphMaxY); + auto blendWidth = MAX(outlineMaxX, glyphMaxX) - blendImageMinX; + auto blendHeight = blendImageMaxY - MIN(outlineMinY, glyphMinY); + + outRect.origin.x = blendImageMinX; + outRect.origin.y = -blendImageMaxY; + + long index, index2; auto blendImage = new unsigned char[blendWidth * blendHeight * 2]; memset(blendImage, 0, blendWidth * blendHeight * 2); - auto px = (blendWidth - outlineWidth) / 2; - auto py = (blendHeight - outlineHeight) / 2; + auto px = outlineMinX - blendImageMinX; + auto py = blendImageMaxY - outlineMaxY; for (int x = 0; x < outlineWidth; ++x) { for (int y = 0; y < outlineHeight; ++y) { - index = px + x + ( (py + y) * blendWidth ); + index = px + x + ((py + y) * blendWidth); index2 = x + (y * outlineWidth); blendImage[2 * index] = outlineBitmap[index2]; } } - px = (blendWidth - outWidth) / 2; - py = (blendHeight - outHeight) / 2; + px = glyphMinX - blendImageMinX; + py = blendImageMaxY - glyphMaxY; for (int x = 0; x < outWidth; ++x) { for (int y = 0; y < outHeight; ++y) { - index = px + x + ( (y + py) * blendWidth ); + index = px + x + ((y + py) * blendWidth); index2 = x + (y * outWidth); blendImage[2 * index + 1] = copyBitmap[index2]; } diff --git a/cocos/2d/CCFontFreeType.h b/cocos/2d/CCFontFreeType.h index 8b65baab0e..d5ce6f4f8e 100644 --- a/cocos/2d/CCFontFreeType.h +++ b/cocos/2d/CCFontFreeType.h @@ -33,7 +33,7 @@ #include #include -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #define generic GenericFromFreeTypeLibrary #define internal InternalFromFreeTypeLibrary #endif @@ -41,7 +41,7 @@ #include FT_FREETYPE_H #include FT_STROKER_H -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #undef generic #undef internal #endif diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 412e474fca..e0c9295852 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -406,13 +406,7 @@ void Label::setFontAtlas(FontAtlas* atlas,bool distanceFieldEnabled /* = false * _commonLineHeight = _fontAtlas->getCommonLineHeight(); _contentDirty = true; } -#if CC_TARGET_PLATFORM != CC_PLATFORM_WP8 _useDistanceField = distanceFieldEnabled; -#else - // some older Windows Phones cannot run the ccShader_Label_df.frag program - // so we must disable distance field - _useDistanceField = false; -#endif _useA8Shader = useA8Shader; if (_currentLabelType != LabelType::TTF) @@ -621,7 +615,7 @@ void Label::alignText() int tag = child->getTag(); if (tag >= strLen) { - SpriteBatchNode::removeChild(child, true); + child->removeFromParentAndCleanup(true); } else if (tag >= 0) { @@ -633,10 +627,11 @@ void Label::alignText() uvRect.size.width = letterDef.width; uvRect.origin.x = letterDef.U; uvRect.origin.y = letterDef.V; - - letterSprite->setTexture(textures.at(letterDef.textureID)); - letterSprite->setTextureRect(uvRect); - letterSprite->setPosition(_lettersInfo[tag].position); + + letterSprite->setBatchNode(_batchNodes[letterDef.textureID]); + letterSprite->setTextureRect(uvRect, false, uvRect.size); + letterSprite->setPosition(_lettersInfo[tag].position.x + letterDef.width/2, + _lettersInfo[tag].position.y - letterDef.height/2); } ++index; } @@ -966,8 +961,7 @@ void Label::onDraw(const Mat4& transform, bool transformUpdated) for(const auto &child: _children) { - if(child->getTag() >= 0) - child->updateTransform(); + child->updateTransform(); } for (const auto& batchNode:_batchNodes) diff --git a/cocos/2d/CCLayer.cpp b/cocos/2d/CCLayer.cpp index 042f3a978a..72861dac23 100644 --- a/cocos/2d/CCLayer.cpp +++ b/cocos/2d/CCLayer.cpp @@ -845,7 +845,7 @@ LayerMultiplex::~LayerMultiplex() } } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) LayerMultiplex * LayerMultiplex::createVariadic(Layer * layer, ...) { va_list args; diff --git a/cocos/2d/CCLayer.h b/cocos/2d/CCLayer.h index 9d053eea54..d437853543 100644 --- a/cocos/2d/CCLayer.h +++ b/cocos/2d/CCLayer.h @@ -596,8 +596,8 @@ public: * In lua:local create(...) * @endcode */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // WP8 in VS2012 does not support nullptr in variable args lists and variadic templates are also not supported +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) + // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported typedef Layer* M; static LayerMultiplex* create(M m1, std::nullptr_t listEnd) { return createVariadic(m1, NULL); } static LayerMultiplex* create(M m1, M m2, std::nullptr_t listEnd) { return createVariadic(m1, m2, NULL); } diff --git a/cocos/2d/CCMenu.cpp b/cocos/2d/CCMenu.cpp index 881c56470c..617610bf51 100644 --- a/cocos/2d/CCMenu.cpp +++ b/cocos/2d/CCMenu.cpp @@ -57,7 +57,7 @@ Menu* Menu::create() return Menu::create(nullptr, nullptr); } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) Menu * Menu::variadicCreate(MenuItem* item, ...) { va_list args; diff --git a/cocos/2d/CCMenu.h b/cocos/2d/CCMenu.h index 3159bc02b4..1f15f1bd72 100644 --- a/cocos/2d/CCMenu.h +++ b/cocos/2d/CCMenu.h @@ -63,8 +63,8 @@ public: */ static Menu* create(); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // WP8 in VS2012 does not support nullptr in variable args lists and variadic templates are also not supported. +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) + // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported. typedef MenuItem* M; static Menu* create(M m1, std::nullptr_t listEnd) { return variadicCreate(m1, NULL); } static Menu* create(M m1, M m2, std::nullptr_t listEnd) { return variadicCreate(m1, m2, NULL); } diff --git a/cocos/2d/CCMenuItem.cpp b/cocos/2d/CCMenuItem.cpp index a9faaa8b6e..8bac6195ed 100644 --- a/cocos/2d/CCMenuItem.cpp +++ b/cocos/2d/CCMenuItem.cpp @@ -820,7 +820,7 @@ MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler s return ret; } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) MenuItemToggle * MenuItemToggle::createWithCallbackVA(const ccMenuCallback &callback, MenuItem* item, ...) { va_list args; diff --git a/cocos/2d/CCMenuItem.h b/cocos/2d/CCMenuItem.h index 807661def1..718cb3786d 100644 --- a/cocos/2d/CCMenuItem.h +++ b/cocos/2d/CCMenuItem.h @@ -493,8 +493,8 @@ public: */ static MenuItemToggle * createWithCallback(const ccMenuCallback& callback, const Vector& menuItems); /** Creates a menu item from a list of items with a callable object. */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // WP8 in VS2012 does not support nullptr in variable args lists and variadic templates are also not supported. +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) + // VS2013 does not support nullptr in variable args lists and variadic templates are also not supported. typedef MenuItem* M; static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, NULL); } static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, NULL); } diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 1b3b7a2195..5333bbb33f 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -1047,11 +1047,6 @@ public: * @param glProgramState The GLProgramState for this node. */ virtual void setGLProgramState(GLProgramState *glProgramState); - - /** Returns the Material used for this Node */ - Material* getMaterial() const; - /** Sets the Material used for this Node */ - void setMaterial(Material* material); /// @} end of Shader Program diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index afed7bfaa4..4cbd7f6486 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -164,7 +164,7 @@ bool ParticleSystem::initWithFile(const std::string& plistFile) { bool ret = false; _plistFile = FileUtils::getInstance()->fullPathForFilename(plistFile); - ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(_plistFile.c_str()); + ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(_plistFile); CCASSERT( !dict.empty(), "Particles: file not found"); diff --git a/cocos/2d/CCParticleSystem.h b/cocos/2d/CCParticleSystem.h index 8bf569ff57..415966a554 100644 --- a/cocos/2d/CCParticleSystem.h +++ b/cocos/2d/CCParticleSystem.h @@ -130,7 +130,7 @@ emitter.startSpin = 0; */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #ifdef RELATIVE #undef RELATIVE #endif diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index 06c7e7a11f..5b680d3b53 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -551,13 +551,6 @@ void RenderTexture::onBegin() if(!_keepMatrix) { director->setProjection(director->getProjection()); - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - auto modifiedProjection = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); - modifiedProjection = GLViewImpl::sharedOpenGLView()->getReverseOrientationMatrix() * modifiedProjection; - director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION,modifiedProjection); -#endif - const Size& texSize = _texture->getContentSizeInPixels(); // Calculate the adjustment ratios based on the old and new projections @@ -569,14 +562,6 @@ void RenderTexture::onBegin() Mat4::createOrthographicOffCenter((float)-1.0 / widthRatio, (float)1.0 / widthRatio, (float)-1.0 / heightRatio, (float)1.0 / heightRatio, -1, 1, &orthoMatrix); director->multiplyMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, orthoMatrix); } - else - { -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - auto modifiedProjection = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); - modifiedProjection = GLViewImpl::sharedOpenGLView()->getReverseOrientationMatrix() * modifiedProjection; - director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, modifiedProjection); -#endif - } //calculate viewport { diff --git a/cocos/2d/CCScene.cpp b/cocos/2d/CCScene.cpp index b6e36ce5ff..3bc41bc4f5 100644 --- a/cocos/2d/CCScene.cpp +++ b/cocos/2d/CCScene.cpp @@ -37,6 +37,11 @@ THE SOFTWARE. #include "physics/CCPhysicsWorld.h" #endif +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION +#include "physics3d/CCPhysics3DWorld.h" +#include "physics3d/CCPhysics3DComponent.h" +#endif + NS_CC_BEGIN Scene::Scene() @@ -44,6 +49,10 @@ Scene::Scene() : _physicsWorld(nullptr) #endif { +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + _physics3DWorld = nullptr; + _physics3dDebugCamera = nullptr; +#endif _ignoreAnchorPointForPosition = true; setAnchorPoint(Vec2(0.5f, 0.5f)); @@ -61,6 +70,10 @@ Scene::~Scene() { #if CC_USE_PHYSICS CC_SAFE_DELETE(_physicsWorld); +#endif +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + CC_SAFE_RELEASE(_physics3DWorld); + CC_SAFE_RELEASE(_physics3dDebugCamera); #endif Director::getInstance()->getEventDispatcher()->removeEventListener(_event); CC_SAFE_RELEASE(_event); @@ -153,10 +166,22 @@ void Scene::render(Renderer* renderer) //visit the scene visit(renderer, transform, 0); + renderer->render(); director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); } + +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + if (_physics3DWorld && _physics3DWorld->isDebugDrawEnabled()) + { + director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, _physics3dDebugCamera != nullptr ? _physics3dDebugCamera->getViewProjectionMatrix() : defaultCamera->getViewProjectionMatrix()); + _physics3DWorld->debugDraw(renderer); + renderer->render(); + director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + } +#endif Camera::_visitingCamera = nullptr; } @@ -175,7 +200,16 @@ void Scene::removeAllChildren() } } -#if CC_USE_PHYSICS +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION +void Scene::setPhysics3DDebugCamera(Camera* camera) +{ + CC_SAFE_RETAIN(camera); + CC_SAFE_RELEASE(_physics3dDebugCamera); + _physics3dDebugCamera = camera; +} +#endif + +#if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION)) void Scene::addChild(Node* child, int zOrder, int tag) { Node::addChild(child, zOrder, tag); @@ -212,7 +246,17 @@ bool Scene::initWithPhysics() CC_BREAK_IF( ! (director = Director::getInstance()) ); this->setContentSize(director->getWinSize()); +#if CC_USE_PHYSICS CC_BREAK_IF(! (_physicsWorld = PhysicsWorld::construct(*this))); +#endif + +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + Physics3DWorldDes info; + //TODO: FIX ME + //info.isDebugDrawEnabled = true; + CC_BREAK_IF(! (_physics3DWorld = Physics3DWorld::create(&info))); + _physics3DWorld->retain(); +#endif // success ret = true; @@ -222,6 +266,7 @@ bool Scene::initWithPhysics() void Scene::addChildToPhysicsWorld(Node* child) { +#if CC_USE_PHYSICS if (_physicsWorld) { std::function addToPhysicsWorldFunc = nullptr; @@ -242,6 +287,30 @@ void Scene::addChildToPhysicsWorld(Node* child) addToPhysicsWorldFunc(child); } +#endif + +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + if (_physics3DWorld) + { + std::function addToPhysicsWorldFunc = nullptr; + addToPhysicsWorldFunc = [this, &addToPhysicsWorldFunc](Node* node) -> void + { + static std::string comName = Physics3DComponent::getPhysics3DComponentName(); + auto com = static_cast(node->getComponent(comName)); + if (com) + { + com->addToPhysicsWorld(_physics3DWorld); + } + + auto& children = node->getChildren(); + for( const auto &n : children) { + addToPhysicsWorldFunc(n); + } + }; + + addToPhysicsWorldFunc(child); + } +#endif } #endif diff --git a/cocos/2d/CCScene.h b/cocos/2d/CCScene.h index ee2d2ef08c..0b3701f064 100644 --- a/cocos/2d/CCScene.h +++ b/cocos/2d/CCScene.h @@ -41,6 +41,9 @@ class EventCustom; #if CC_USE_PHYSICS class PhysicsWorld; #endif +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION +class Physics3DWorld; +#endif /** * @addtogroup _2d * @{ @@ -136,15 +139,31 @@ protected: private: CC_DISALLOW_COPY_AND_ASSIGN(Scene); -#if CC_USE_PHYSICS +#if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION)) public: virtual void addChild(Node* child, int zOrder, int tag) override; virtual void addChild(Node* child, int zOrder, const std::string &name) override; + +#if CC_USE_PHYSICS /** Get the physics world of the scene. * @return The physics world of the scene. * @js NA */ inline PhysicsWorld* getPhysicsWorld() { return _physicsWorld; } +#endif + +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + /** Get the 3d physics world of the scene. + * @return The 3d physics world of the scene. + * @js NA + */ + inline Physics3DWorld* getPhysics3DWorld() { return _physics3DWorld; } + + /** + * Set Physics3D debug draw camera. + */ + void setPhysics3DDebugCamera(Camera* camera); +#endif /** Create a scene with physics. * @return An autoreleased Scene object with physics. @@ -158,8 +177,15 @@ CC_CONSTRUCTOR_ACCESS: protected: void addChildToPhysicsWorld(Node* child); +#if CC_USE_PHYSICS PhysicsWorld* _physicsWorld; -#endif // CC_USE_PHYSICS +#endif + +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + Physics3DWorld* _physics3DWorld; + Camera* _physics3dDebugCamera; // +#endif +#endif // (CC_USE_PHYSICS || CC_USE_3D_PHYSICS) }; // end of _2d group diff --git a/cocos/2d/CCTextFieldTTF.cpp b/cocos/2d/CCTextFieldTTF.cpp index 3e1378cf40..31bd5ba1e4 100644 --- a/cocos/2d/CCTextFieldTTF.cpp +++ b/cocos/2d/CCTextFieldTTF.cpp @@ -142,11 +142,7 @@ bool TextFieldTTF::attachWithIME() auto pGlView = Director::getInstance()->getOpenGLView(); if (pGlView) { -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8 && CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) pGlView->setIMEKeyboardState(true); -#else - pGlView->setIMEKeyboardState(true, _inputText); -#endif } } return ret; @@ -161,11 +157,7 @@ bool TextFieldTTF::detachWithIME() auto glView = Director::getInstance()->getOpenGLView(); if (glView) { -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8 && CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) glView->setIMEKeyboardState(false); -#else - glView->setIMEKeyboardState(false, ""); -#endif } } return ret; diff --git a/cocos/2d/cocos2d_headers.props b/cocos/2d/cocos2d_headers.props index 2088c06b67..7a40862144 100644 --- a/cocos/2d/cocos2d_headers.props +++ b/cocos/2d/cocos2d_headers.props @@ -7,7 +7,7 @@ - $(EngineRoot)cocos\editor-support;$(EngineRoot)cocos;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\platform\desktop;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES;$(EngineRoot)external\freetype2\include\win32\freetype2;$(EngineRoot)external\freetype2\include\win32\ + $(EngineRoot)cocos\editor-support;$(EngineRoot)cocos;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\platform\desktop;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES;$(EngineRoot)external\freetype2\include\win32\freetype2;$(EngineRoot)external\freetype2\include\win32\;$(EngineRoot)external _VARIADIC_MAX=10;%(PreprocessorDefinitions) diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index b3a8273345..fb05f4a5d9 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -20,20 +20,18 @@ DynamicLibrary Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp DynamicLibrary Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp @@ -50,7 +48,7 @@ - <_ProjectFileVersion>10.0.40219.1 + <_ProjectFileVersion>12.0.21005.1 $(SolutionDir)$(Configuration).win32\ $(Configuration).win32\ false @@ -78,7 +76,7 @@ Disabled $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\box2d;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\OpenalSoft\include;$(EngineRoot)external\win32-specific\MP3Decoder\include;$(EngineRoot)external\win32-specific\OggDecoder\include;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;$(EngineRoot)external\poly2tri;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) - WIN32;_USRDLL;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;PROTOBUF_USE_DLLS;LIBPROTOBUF_EXPORTS;%(PreprocessorDefinitions) + WIN32;_USRDLL;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;PROTOBUF_USE_DLLS;LIBPROTOBUF_EXPORTS;%(PreprocessorDefinitions) false EnableFastChecks MultiThreadedDebugDLL @@ -119,7 +117,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\debug-lib\*.*" $(TargetDir)$(TargetName).lib MachineX86 cocos2d.def - sqlite3.lib;libcurl_imp.lib;websockets.lib;libmpg123.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;OpenAL32.lib;%(AdditionalDependencies) + sqlite3.lib;libcurl_imp.lib;websockets.lib;libmpg123.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;OpenAL32.lib;libbullet.lib;%(AdditionalDependencies) @@ -133,7 +131,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\debug-lib\*.*" $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\MP3Decoder\include;$(EngineRoot)external\win32-specific\OggDecoder\include;$(EngineRoot)external\win32-specific\OpenalSoft\include;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\Box2d;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32\;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;$(EngineRoot)external\poly2tri;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) - WIN32;_USRDLL;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;PROTOBUF_USE_DLLS;LIBPROTOBUF_EXPORTS;%(PreprocessorDefinitions) + WIN32;_USRDLL;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;PROTOBUF_USE_DLLS;LIBPROTOBUF_EXPORTS;%(PreprocessorDefinitions) MultiThreadedDLL @@ -166,7 +164,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* - sqlite3.lib;libcurl_imp.lib;websockets.lib;libmpg123.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;OpenAL32.lib;%(AdditionalDependencies) + sqlite3.lib;libcurl_imp.lib;websockets.lib;libmpg123.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;OpenAL32.lib;libbullet.lib;%(AdditionalDependencies) $(OutDir)$(ProjectName).dll $(OutDir);%(AdditionalLibraryDirectories) LIBCMTD.lib;%(IgnoreSpecificDefaultLibraries) @@ -436,6 +434,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + @@ -567,6 +566,14 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + + + + + + + + @@ -606,6 +613,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + @@ -989,6 +997,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + @@ -1146,6 +1155,14 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + + + + + + + + @@ -1193,6 +1210,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + @@ -1315,6 +1333,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* {929480e7-23c0-4df6-8456-096d71547116} + + {012dff48-a13f-4f52-b07b-f8b9d21ce95b} + {b7c2a162-dec9-4418-972e-240ab3cbfcae} diff --git a/cocos/2d/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters index 99f1bb68c2..5f21b80697 100644 --- a/cocos/2d/libcocos2d.vcxproj.filters +++ b/cocos/2d/libcocos2d.vcxproj.filters @@ -268,6 +268,9 @@ {c37eceeb-5702-4ff7-88de-94680a22266f} + + {e492faef-2169-4117-8d73-e0c66271fe25} + @@ -1827,6 +1830,30 @@ 2d + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + renderer @@ -1839,6 +1866,12 @@ renderer + + base + + + renderer + @@ -3587,6 +3620,30 @@ 2d + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + renderer @@ -3599,6 +3656,12 @@ renderer + + base + + + renderer + diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1.sln b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1.sln index 643e0e020e..ec7fcf7494 100644 --- a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1.sln +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.30723.0 -MinimumVisualStudioVersion = 10.0.40219.1 +MinimumVisualStudioVersion = 12.0.21005.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libcocos2d_8_1", "libcocos2d_8_1", "{CA9DBD4B-603D-494E-802A-1C36E3EA3F07}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.Shared", "libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems", "{5D6F020F-7E72-4494-90A0-2DF11D235DF9}" 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 69cbaab259..723413e8ac 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 @@ -284,6 +284,7 @@ + @@ -504,6 +505,7 @@ + @@ -883,6 +885,7 @@ + @@ -1070,6 +1073,7 @@ + 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 b2c30b3426..d433b0f87d 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 @@ -1785,6 +1785,12 @@ renderer + + base + + + renderer + @@ -3393,6 +3399,12 @@ renderer + + base + + + renderer + diff --git a/cocos/3d/CCAnimationCurve.h b/cocos/3d/CCAnimationCurve.h index 5c0b7e4630..c6af3a2fb6 100644 --- a/cocos/3d/CCAnimationCurve.h +++ b/cocos/3d/CCAnimationCurve.h @@ -30,7 +30,7 @@ #include "base/CCRef.h" #include "math/CCMath.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #undef NEAR #endif diff --git a/cocos/3d/CCBundle3D.cpp b/cocos/3d/CCBundle3D.cpp index 22b4346aee..247cf35e29 100644 --- a/cocos/3d/CCBundle3D.cpp +++ b/cocos/3d/CCBundle3D.cpp @@ -2111,6 +2111,29 @@ Reference* Bundle3D::seekToFirstType(unsigned int type, const std::string& id) return nullptr; } +std::vector Bundle3D::getTrianglesList(const std::string& path) +{ + std::vector trianglesList; + auto bundle = Bundle3D::createBundle(); + if (!bundle->load(path)) + { + Bundle3D::destroyBundle(bundle); + return trianglesList; + } + MeshDatas meshs; + bundle->loadMeshDatas(meshs); + Bundle3D::destroyBundle(bundle); + for (auto iter : meshs.meshDatas){ + int preVertexSize = iter->getPerVertexSize() / sizeof(float); + for (auto indexArray : iter->subMeshIndices){ + for (auto i : indexArray){ + trianglesList.push_back(Vec3(iter->vertex[i * preVertexSize], iter->vertex[i * preVertexSize + 1], iter->vertex[i * preVertexSize + 2])); + } + } + } + return trianglesList; +} + Bundle3D::Bundle3D() : _modelPath(""), _path(""), diff --git a/cocos/3d/CCBundle3D.h b/cocos/3d/CCBundle3D.h index f9927eeac3..60d681931a 100644 --- a/cocos/3d/CCBundle3D.h +++ b/cocos/3d/CCBundle3D.h @@ -85,6 +85,12 @@ public: //since 3.3, to support reskin virtual bool loadMaterials(MaterialDatas& materialdatas); + /** + * load triangle list + * @param path the file path to load + */ + static std::vector getTrianglesList(const std::string& path); + //load .obj file static bool loadObj(MeshDatas& meshdatas, MaterialDatas& materialdatas, NodeDatas& nodedatas, const std::string& fullPath, const char* mtl_basepath = nullptr); diff --git a/cocos/3d/CCMesh.cpp b/cocos/3d/CCMesh.cpp index d75fcf85a9..30688d27bd 100644 --- a/cocos/3d/CCMesh.cpp +++ b/cocos/3d/CCMesh.cpp @@ -37,6 +37,7 @@ #include "renderer/CCTechnique.h" #include "renderer/CCPass.h" #include "renderer/CCRenderer.h" +#include "renderer/CCVertexAttribBinding.h" #include "math/Mat4.h" using namespace std; @@ -301,6 +302,18 @@ void Mesh::setMaterial(Material* material) _material = material; CC_SAFE_RETAIN(_material); } + + if (_material) + { + for (auto technique: _material->getTechniques()) + { + for (auto pass: technique->getPasses()) + { + auto vertexAttribBinding = VertexAttribBinding::create(_meshIndexData, pass->getGLProgramState()); + pass->setVertexAttribBinding(vertexAttribBinding); + } + } + } } Material* Mesh::getMaterial() const @@ -340,18 +353,18 @@ void Mesh::draw(Renderer* renderer, float globalZOrder, const Mat4& transform, u // set default uniforms for Mesh // 'u_color' and others - const auto& scene = Director::getInstance()->getRunningScene(); + const auto scene = Director::getInstance()->getRunningScene(); auto technique = _material->_currentTechnique; - for(auto& pass : technique->_passes) + for(const auto pass : technique->_passes) { auto programState = pass->getGLProgramState(); programState->setUniformVec4("u_color", color); if (_skin) - programState->setUniformVec4v("u_matrixPalette", _skin->getMatrixPalette(), (GLsizei)_skin->getMatrixPaletteSize()); + programState->setUniformVec4v("u_matrixPalette", (GLsizei)_skin->getMatrixPaletteSize(), _skin->getMatrixPalette()); if (scene && scene->getLights().size() > 0) - setLightUniforms(programState, scene, color, lightMask); + setLightUniforms(pass, scene, color, lightMask); } renderer->addCommand(&_meshCommand); @@ -458,9 +471,9 @@ void Mesh::bindMeshCommand() } } -void Mesh::setLightUniforms(GLProgramState* glProgramState, Scene* scene, const Vec4& color, unsigned int lightmask) +void Mesh::setLightUniforms(Pass* pass, Scene* scene, const Vec4& color, unsigned int lightmask) { - CCASSERT(glProgramState, "Invalid glProgramstate"); + CCASSERT(pass, "Invalid Pass"); CCASSERT(scene, "Invalid scene"); const auto& conf = Configuration::getInstance(); @@ -469,8 +482,10 @@ void Mesh::setLightUniforms(GLProgramState* glProgramState, Scene* scene, const int maxSpotLight = conf->getMaxSupportSpotLightInShader(); auto &lights = scene->getLights(); + auto glProgramState = pass->getGLProgramState(); + auto attributes = pass->getVertexAttributeBinding()->getVertexAttribsFlags(); - if (glProgramState->getVertexAttribsFlags() & (1 << GLProgram::VERTEX_ATTRIB_NORMAL)) + if (attributes & (1 << GLProgram::VERTEX_ATTRIB_NORMAL)) { resetLightUniformValues(); @@ -549,28 +564,28 @@ void Mesh::setLightUniforms(GLProgramState* glProgramState, Scene* scene, const if (0 < maxDirLight) { - glProgramState->setUniformVec3v(s_dirLightUniformColorName, &s_dirLightUniformColorValues[0], s_dirLightUniformColorValues.size()); - glProgramState->setUniformVec3v(s_dirLightUniformDirName, &s_dirLightUniformDirValues[0], s_dirLightUniformDirValues.size()); + glProgramState->setUniformVec3v(s_dirLightUniformColorName, s_dirLightUniformColorValues.size(), &s_dirLightUniformColorValues[0]); + glProgramState->setUniformVec3v(s_dirLightUniformDirName, s_dirLightUniformDirValues.size(), &s_dirLightUniformDirValues[0]); } if (0 < maxPointLight) { - glProgramState->setUniformVec3v(s_pointLightUniformColorName, &s_pointLightUniformColorValues[0], s_pointLightUniformColorValues.size()); - glProgramState->setUniformVec3v(s_pointLightUniformPositionName, &s_pointLightUniformPositionValues[0], s_pointLightUniformPositionValues.size()); - glProgramState->setUniformFloatv(s_pointLightUniformRangeInverseName, &s_pointLightUniformRangeInverseValues[0], s_pointLightUniformRangeInverseValues.size()); + glProgramState->setUniformVec3v(s_pointLightUniformColorName, s_pointLightUniformColorValues.size(), &s_pointLightUniformColorValues[0]); + glProgramState->setUniformVec3v(s_pointLightUniformPositionName, s_pointLightUniformPositionValues.size(), &s_pointLightUniformPositionValues[0]); + glProgramState->setUniformFloatv(s_pointLightUniformRangeInverseName, s_pointLightUniformRangeInverseValues.size(), &s_pointLightUniformRangeInverseValues[0]); } if (0 < maxSpotLight) { - glProgramState->setUniformVec3v(s_spotLightUniformColorName, &s_spotLightUniformColorValues[0], s_spotLightUniformColorValues.size()); - glProgramState->setUniformVec3v(s_spotLightUniformPositionName, &s_spotLightUniformPositionValues[0], s_spotLightUniformPositionValues.size()); - glProgramState->setUniformVec3v(s_spotLightUniformDirName, &s_spotLightUniformDirValues[0], s_spotLightUniformDirValues.size()); - glProgramState->setUniformFloatv(s_spotLightUniformInnerAngleCosName, &s_spotLightUniformInnerAngleCosValues[0], s_spotLightUniformInnerAngleCosValues.size()); - glProgramState->setUniformFloatv(s_spotLightUniformOuterAngleCosName, &s_spotLightUniformOuterAngleCosValues[0], s_spotLightUniformOuterAngleCosValues.size()); - glProgramState->setUniformFloatv(s_spotLightUniformRangeInverseName, &s_spotLightUniformRangeInverseValues[0], s_spotLightUniformRangeInverseValues.size()); + glProgramState->setUniformVec3v(s_spotLightUniformColorName, s_spotLightUniformColorValues.size(), &s_spotLightUniformColorValues[0]); + glProgramState->setUniformVec3v(s_spotLightUniformPositionName, s_spotLightUniformPositionValues.size(), &s_spotLightUniformPositionValues[0]); + glProgramState->setUniformVec3v(s_spotLightUniformDirName, s_spotLightUniformDirValues.size(), &s_spotLightUniformDirValues[0]); + glProgramState->setUniformFloatv(s_spotLightUniformInnerAngleCosName, s_spotLightUniformInnerAngleCosValues.size(), &s_spotLightUniformInnerAngleCosValues[0]); + glProgramState->setUniformFloatv(s_spotLightUniformOuterAngleCosName, s_spotLightUniformOuterAngleCosValues.size(), &s_spotLightUniformOuterAngleCosValues[0]); + glProgramState->setUniformFloatv(s_spotLightUniformRangeInverseName, s_spotLightUniformRangeInverseValues.size(), &s_spotLightUniformRangeInverseValues[0]); } - glProgramState->setUniformVec3(s_ambientLightUniformColorName, Vec3(ambientColor.x, ambientColor.y, ambientColor.z)); + glProgramState->setUniformVec3(s_ambientLightUniformColorName, Vec3(ambientColor.x, ambientColor.y, ambientColor.z)); } else // normal does not exist { diff --git a/cocos/3d/CCMesh.h b/cocos/3d/CCMesh.h index 9bc1afb95c..1ac460b910 100644 --- a/cocos/3d/CCMesh.h +++ b/cocos/3d/CCMesh.h @@ -49,6 +49,7 @@ class GLProgram; class Material; class Renderer; class Scene; +class Pass; /** * @brief Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on @@ -195,7 +196,7 @@ CC_CONSTRUCTOR_ACCESS: virtual ~Mesh(); protected: - void setLightUniforms(GLProgramState* glProgramState, Scene* scene, const Vec4& color, unsigned int lightmask); + void setLightUniforms(Pass* pass, Scene* scene, const Vec4& color, unsigned int lightmask); void bindMeshCommand(); Texture2D* _texture; //texture that submesh is using diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index 4537e9e4b5..f50a2564c1 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -49,7 +49,7 @@ NS_CC_BEGIN -std::string s_attributeNames[] = {GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::ATTRIBUTE_NAME_COLOR, GLProgram::ATTRIBUTE_NAME_TEX_COORD, GLProgram::ATTRIBUTE_NAME_TEX_COORD1, GLProgram::ATTRIBUTE_NAME_TEX_COORD2,GLProgram::ATTRIBUTE_NAME_TEX_COORD3,GLProgram::ATTRIBUTE_NAME_NORMAL, GLProgram::ATTRIBUTE_NAME_BLEND_WEIGHT, GLProgram::ATTRIBUTE_NAME_BLEND_INDEX}; +static GLProgramState* getGLProgramStateForAttribs(MeshVertexData* meshVertexData, bool usesLight); Sprite3D* Sprite3D::create() { @@ -64,7 +64,7 @@ Sprite3D* Sprite3D::create() return nullptr; } -Sprite3D* Sprite3D::create(const std::string &modelPath) +Sprite3D* Sprite3D::create(const std::string& modelPath) { CCASSERT(modelPath.length() >= 4, "invalid filename for Sprite3D"); @@ -78,7 +78,7 @@ Sprite3D* Sprite3D::create(const std::string &modelPath) CC_SAFE_DELETE(sprite); return nullptr; } -Sprite3D* Sprite3D::create(const std::string &modelPath, const std::string &texturePath) +Sprite3D* Sprite3D::create(const std::string& modelPath, const std::string& texturePath) { auto sprite = create(modelPath); if (sprite) @@ -89,12 +89,12 @@ Sprite3D* Sprite3D::create(const std::string &modelPath, const std::string &text return sprite; } -void Sprite3D::createAsync(const std::string &modelPath, const std::function& callback, void* callbackparam) +void Sprite3D::createAsync(const std::string& modelPath, const std::function& callback, void* callbackparam) { createAsync(modelPath, "", callback, callbackparam); } -void Sprite3D::createAsync(const std::string &modelPath, const std::string &texturePath, const std::function& callback, void* callbackparam) +void Sprite3D::createAsync(const std::string& modelPath, const std::string& texturePath, const std::function& callback, void* callbackparam) { Sprite3D *sprite = new (std::nothrow) Sprite3D(); if (sprite->loadFromCache(modelPath)) @@ -249,6 +249,7 @@ Sprite3D::Sprite3D() , _lightMask(-1) , _shaderUsingLight(false) , _forceDepthWrite(false) +, _usingAutogeneratedGLProgram(true) { } @@ -269,7 +270,7 @@ bool Sprite3D::init() return false; } -bool Sprite3D::initWithFile(const std::string &path) +bool Sprite3D::initWithFile(const std::string& path) { _meshes.clear(); _meshVertexDatas.clear(); @@ -297,6 +298,7 @@ bool Sprite3D::initWithFile(const std::string &path) Sprite3DCache::getInstance()->addSprite3DData(path, data); CC_SAFE_DELETE(meshdatas); + _contentSize = getBoundingBox().size; return true; } } @@ -364,7 +366,7 @@ Sprite3D* Sprite3D::createSprite3DNode(NodeData* nodedata,ModelData* modeldata,c auto tex = Director::getInstance()->getTextureCache()->addImage(textureData->filename); if(tex) { - Texture2D::TexParams texParams; + Texture2D::TexParams texParams; texParams.minFilter = GL_LINEAR; texParams.magFilter = GL_LINEAR; texParams.wrapS = textureData->wrapS; @@ -395,7 +397,7 @@ Sprite3D* Sprite3D::createSprite3DNode(NodeData* nodedata,ModelData* modeldata,c } return sprite; } -void Sprite3D::createAttachSprite3DNode(NodeData* nodedata,const MaterialDatas& materialdatas) +void Sprite3D::createAttachSprite3DNode(NodeData* nodedata, const MaterialDatas& materialdatas) { for(const auto& it : nodedata->modelNodeDatas) { @@ -424,76 +426,43 @@ void Sprite3D::setMaterial(Material *material, int meshIndex) CCASSERT(material, "Invalid Material"); CCASSERT(meshIndex == -1 || (meshIndex >=0 && meshIndex < _meshes.size()), "Invalid meshIndex"); + if (meshIndex == -1) { - for(auto& mesh: _meshes) + for (auto mesh: _meshes) { mesh->setMaterial(material); } } else { - _meshes.at(meshIndex)->setMaterial(material); + auto mesh = _meshes.at(meshIndex); + mesh->setMaterial(material); } + + _usingAutogeneratedGLProgram = false; } +Material* Sprite3D::getMaterial(int meshIndex) const +{ + CCASSERT(meshIndex >=0 && meshIndex < _meshes.size(), "Invalid meshIndex"); + return _meshes.at(meshIndex)->getMaterial(); +} + + void Sprite3D::genGLProgramState(bool useLight) { _shaderUsingLight = useLight; - + std::unordered_map glProgramestates; - for(auto& meshVertexData : _meshVertexDatas) + for(auto meshVertexData : _meshVertexDatas) { - bool textured = meshVertexData->hasVertexAttrib(GLProgram::VERTEX_ATTRIB_TEX_COORD); - bool hasSkin = meshVertexData->hasVertexAttrib(GLProgram::VERTEX_ATTRIB_BLEND_INDEX) - && meshVertexData->hasVertexAttrib(GLProgram::VERTEX_ATTRIB_BLEND_WEIGHT); - bool hasNormal = meshVertexData->hasVertexAttrib(GLProgram::VERTEX_ATTRIB_NORMAL); - - const char* shader = nullptr; - if(textured) - { - if (hasSkin) - { - if (hasNormal && _shaderUsingLight) - shader = GLProgram::SHADER_3D_SKINPOSITION_NORMAL_TEXTURE; - else - shader = GLProgram::SHADER_3D_SKINPOSITION_TEXTURE; - } - else - { - if (hasNormal && _shaderUsingLight) - shader = GLProgram::SHADER_3D_POSITION_NORMAL_TEXTURE; - else - shader = GLProgram::SHADER_3D_POSITION_TEXTURE; - } - } - else - { - shader = GLProgram::SHADER_3D_POSITION; - } - - CCASSERT(shader, "Couldn't find shader for sprite"); - - auto glProgram = GLProgramCache::getInstance()->getGLProgram(shader); - auto glprogramstate = GLProgramState::create(glProgram); - - long offset = 0; - auto attributeCount = meshVertexData->getMeshVertexAttribCount(); - for (auto k = 0; k < attributeCount; k++) { - auto meshattribute = meshVertexData->getMeshVertexAttrib(k); - glprogramstate->setVertexAttribPointer(s_attributeNames[meshattribute.vertexAttrib], - meshattribute.size, - meshattribute.type, - GL_FALSE, - meshVertexData->getVertexBuffer()->getSizePerVertex(), - (GLvoid*)offset); - offset += meshattribute.attribSizeBytes; - } - + auto glprogramstate = getGLProgramStateForAttribs(meshVertexData, useLight); glProgramestates[meshVertexData] = glprogramstate; } - for (auto& mesh : _meshes) { + for (auto& mesh: _meshes) + { auto glProgramState = glProgramestates[mesh->getMeshIndexData()->getMeshVertexData()]; // hack to prevent cloning the very first time @@ -513,7 +482,7 @@ void Sprite3D::createNode(NodeData* nodedata, Node* root, const MaterialDatas& m { if(it->bones.size() > 0 || singleSprite) { - if(singleSprite) + if(singleSprite && root!=nullptr) root->setName(nodedata->id); auto mesh = Mesh::create(nodedata->id, getMeshIndexData(it->subMeshId)); if(mesh) @@ -744,9 +713,11 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) //check light and determine the shader used const auto& scene = Director::getInstance()->getRunningScene(); - if (scene) + + // Don't override GLProgramState if using manually set Material + if (_usingAutogeneratedGLProgram && scene) { - const auto& lights = scene->getLights(); + const auto lights = scene->getLights(); bool usingLight = false; for (const auto light : lights) { usingLight = ((unsigned int)light->getLightFlag() & _lightMask) > 0; @@ -754,10 +725,12 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) break; } if (usingLight != _shaderUsingLight) + { genGLProgramState(usingLight); + } } - for (auto& mesh : _meshes) + for (auto mesh : _meshes) { mesh->draw(renderer, _globalZOrder, @@ -779,8 +752,8 @@ void Sprite3D::setGLProgramState(GLProgramState *glProgramState) } void Sprite3D::setGLProgram(GLProgram *glprogram) { - Node::setGLProgram(glprogram); - setGLProgramState(getGLProgramState()); + auto glProgramState = GLProgramState::create(glprogram); + setGLProgramState(glProgramState); } void Sprite3D::setBlendFunc(const BlendFunc &blendFunc) @@ -972,4 +945,45 @@ Sprite3DCache::~Sprite3DCache() removeAllSprite3DData(); } +// +// MARK: Helpers +// +static GLProgramState* getGLProgramStateForAttribs(MeshVertexData* meshVertexData, bool usesLight) +{ + bool textured = meshVertexData->hasVertexAttrib(GLProgram::VERTEX_ATTRIB_TEX_COORD); + bool hasSkin = meshVertexData->hasVertexAttrib(GLProgram::VERTEX_ATTRIB_BLEND_INDEX) + && meshVertexData->hasVertexAttrib(GLProgram::VERTEX_ATTRIB_BLEND_WEIGHT); + bool hasNormal = meshVertexData->hasVertexAttrib(GLProgram::VERTEX_ATTRIB_NORMAL); + + const char* shader = nullptr; + if(textured) + { + if (hasSkin) + { + if (hasNormal && usesLight) + shader = GLProgram::SHADER_3D_SKINPOSITION_NORMAL_TEXTURE; + else + shader = GLProgram::SHADER_3D_SKINPOSITION_TEXTURE; + } + else + { + if (hasNormal && usesLight) + shader = GLProgram::SHADER_3D_POSITION_NORMAL_TEXTURE; + else + shader = GLProgram::SHADER_3D_POSITION_TEXTURE; + } + } + else + { + shader = GLProgram::SHADER_3D_POSITION; + } + + CCASSERT(shader, "Couldn't find shader for sprite"); + + auto glProgram = GLProgramCache::getInstance()->getGLProgram(shader); + auto glprogramstate = GLProgramState::create(glProgram); + + return glprogramstate; +} + NS_CC_END diff --git a/cocos/3d/CCSprite3D.h b/cocos/3d/CCSprite3D.h index 586e0cfff3..9055123d33 100644 --- a/cocos/3d/CCSprite3D.h +++ b/cocos/3d/CCSprite3D.h @@ -189,6 +189,12 @@ public: */ void setMaterial(Material* material, int meshIndex); + /** Adds a new material to a particular mesh of the sprite. + meshIndex is the mesh that will be applied to. + if meshIndex == -1, then it will be applied to all the meshes that belong to the sprite. + */ + Material* getMaterial(int meshIndex) const; + CC_CONSTRUCTOR_ACCESS: Sprite3D(); @@ -246,6 +252,7 @@ protected: unsigned int _lightMask; bool _shaderUsingLight; // is current shader using light ? bool _forceDepthWrite; // Always write to depth buffer + bool _usingAutogeneratedGLProgram; struct AsyncLoadParam { @@ -321,10 +328,6 @@ protected: std::unordered_map _spriteDatas; //cached sprite datas }; -/// @cond -extern std::string CC_DLL s_attributeNames[];//attribute names array -/// @endcond - // end of 3d group /// @} diff --git a/cocos/3d/CCTerrain.cpp b/cocos/3d/CCTerrain.cpp index 3686b5d83d..d8c9b13a4f 100644 --- a/cocos/3d/CCTerrain.cpp +++ b/cocos/3d/CCTerrain.cpp @@ -262,8 +262,10 @@ bool Terrain::initHeightMap(const char * heightMap) Terrain::Terrain() { _alphaMap = nullptr; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - auto _backToForegroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, + _customCommand.setTransparent(false); + _customCommand.set3D(true); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) + auto _backToForegroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom*) { reload(); @@ -482,7 +484,7 @@ Terrain::~Terrain() glDeleteBuffers(1,&(_chunkLodIndicesSkirtSet[i]._chunkIndices._indices)); } -#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 } @@ -604,6 +606,20 @@ Terrain::QuadTree * Terrain::getQuadTree() return _quadRoot; } + +std::vector Terrain::getHeightData() const +{ + std::vector data; + data.resize(_imageWidth * _imageHeight); + for (int i = 0; i < _imageHeight; i++) { + for (int j = 0; j < _imageWidth; j++) { + int idx = i * _imageWidth + j; + data[idx] = (_vertices[idx]._position.y); + } + } + return data; +} + void Terrain::setAlphaMap(cocos2d::Texture2D * newAlphaMapTexture) { _alphaMap->release(); @@ -1495,4 +1511,5 @@ Terrain::DetailMap::DetailMap() _detailMapSrc = ""; _detailMapSize = 35; } + NS_CC_END diff --git a/cocos/3d/CCTerrain.h b/cocos/3d/CCTerrain.h index c19685dd21..c348ecb22b 100644 --- a/cocos/3d/CCTerrain.h +++ b/cocos/3d/CCTerrain.h @@ -384,6 +384,17 @@ public: QuadTree * getQuadTree(); void reload(); + + /** + * get the terrain's size + */ + Size getTerrainSize() const { return Size(_imageWidth, _imageHeight); } + + /** + * get the terrain's height data + */ + std::vector getHeightData() const; + protected: Terrain(); @@ -458,7 +469,7 @@ protected: GLint _alphaMapLocation; GLint _alphaIsHasAlphaMapLocation; GLint _detailMapSizeLocation[4]; -#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 }; diff --git a/cocos/Android.mk b/cocos/Android.mk index 7052165a5e..e9c51ed861 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -132,6 +132,7 @@ base/CCEventTouch.cpp \ base/CCIMEDispatcher.cpp \ base/CCNS.cpp \ base/CCProfiling.cpp \ +base/CCProperties.cpp \ base/CCRef.cpp \ base/CCScheduler.cpp \ base/CCScriptSupport.cpp \ @@ -177,6 +178,7 @@ renderer/CCTexture2D.cpp \ renderer/CCTextureAtlas.cpp \ renderer/CCTextureCache.cpp \ renderer/CCTrianglesCommand.cpp \ +renderer/CCVertexAttribBinding.cpp \ renderer/CCVertexIndexBuffer.cpp \ renderer/CCVertexIndexData.cpp \ renderer/ccGLStateCache.cpp \ @@ -192,6 +194,14 @@ physics/CCPhysicsContact.cpp \ physics/CCPhysicsJoint.cpp \ physics/CCPhysicsShape.cpp \ physics/CCPhysicsWorld.cpp \ +physics3d/CCPhysics3D.cpp \ +physics3d/CCPhysics3DWorld.cpp \ +physics3d/CCPhysics3DComponent.cpp \ +physics3d/CCPhysics3DDebugDrawer.cpp \ +physics3d/CCPhysics3DObject.cpp \ +physics3d/CCPhysics3DShape.cpp \ +physics3d/CCPhysicsSprite3D.cpp \ +physics3d/CCPhysics3DConstraint.cpp \ ../external/ConvertUTF/ConvertUTFWrapper.cpp \ ../external/ConvertUTF/ConvertUTF.c \ ../external/tinyxml2/tinyxml2.cpp \ @@ -223,7 +233,6 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/../external/poly2tri/sweep LOCAL_C_INCLUDES := $(LOCAL_PATH) \ - $(LOCAL_PATH)/. \ $(LOCAL_PATH)/platform \ $(LOCAL_PATH)/../external \ $(LOCAL_PATH)/../external/tinyxml2 \ @@ -273,6 +282,7 @@ LOCAL_STATIC_LIBRARIES += cocos3d_static LOCAL_STATIC_LIBRARIES += spine_static LOCAL_STATIC_LIBRARIES += cocos_network_static LOCAL_STATIC_LIBRARIES += audioengine_static +LOCAL_STATIC_LIBRARIES += bullet_static include $(BUILD_STATIC_LIBRARY) #============================================================== @@ -293,6 +303,7 @@ $(call import-module,network) $(call import-module,ui) $(call import-module,extensions) $(call import-module,Box2D) +$(call import-module,bullet) $(call import-module,curl/prebuilt/android) $(call import-module,websockets/prebuilt/android) $(call import-module,flatbuffers) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index b7dd840667..3a4e88b453 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -35,6 +35,7 @@ include(2d/CMakeLists.txt) include(3d/CMakeLists.txt) include(platform/CMakeLists.txt) include(physics/CMakeLists.txt) +include(physics3d/CMakeLists.txt) include(math/CMakeLists.txt) include(renderer/CMakeLists.txt) include(base/CMakeLists.txt) @@ -67,6 +68,7 @@ set(COCOS_SRC cocos2d.cpp ${COCOS_3D_SRC} ${COCOS_PLATFORM_SRC} ${COCOS_PHYSICS_SRC} + ${COCOS_PHYSICS3D_SRC} ${COCOS_MATH_SRC} ${COCOS_RENDERER_SRC} ${COCOS_BASE_SRC} @@ -150,6 +152,10 @@ if(USE_BOX2D) cocos_use_pkg(cocos2d Box2D) endif() +if(USE_BULLET) + cocos_use_pkg(cocos2d BULLET) +endif() + set_target_properties(cocos2d PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" diff --git a/cocos/audio/android/ccdandroidUtils.cpp b/cocos/audio/android/ccdandroidUtils.cpp index f167bbe1c6..9dbb3fe8ac 100644 --- a/cocos/audio/android/ccdandroidUtils.cpp +++ b/cocos/audio/android/ccdandroidUtils.cpp @@ -23,11 +23,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "ccdandroidUtils.h" -#include "cocos2d.h" #include #include #include "jni/JniHelper.h" +#include "platform/CCFileUtils.h" + USING_NS_CC; diff --git a/cocos/base/CCConsole.cpp b/cocos/base/CCConsole.cpp index d6eb4b5eb0..b72d301d4e 100644 --- a/cocos/base/CCConsole.cpp +++ b/cocos/base/CCConsole.cpp @@ -43,7 +43,7 @@ #include "platform/win32/inet_pton_mingw.h" #endif #define bzero(a, b) memset(a, 0, b); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "inet_ntop_winrt.h" #include "inet_pton_winrt.h" #include "CCWinRTUtils.h" @@ -243,7 +243,7 @@ static void _log(const char *format, va_list args) #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID __android_log_print(ANDROID_LOG_DEBUG, "cocos2d-x debug info", "%s", buf); -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT WCHAR wszBuf[MAX_LOG_LENGTH] = {0}; MultiByteToWideChar(CP_UTF8, 0, buf, -1, wszBuf, sizeof(wszBuf)); OutputDebugStringW(wszBuf); @@ -351,7 +351,7 @@ bool Console::listenOnTCP(int port) hints.ai_family = AF_INET; // AF_UNSPEC: Do we need IPv6 ? hints.ai_socktype = SOCK_STREAM; -#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; n = WSAStartup(MAKEWORD(2, 2),&wsaData); @@ -393,7 +393,7 @@ bool Console::listenOnTCP(int port) break; /* success */ /* bind error, close and try next one */ -#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(listenfd); #else close(listenfd); @@ -480,7 +480,7 @@ void Console::commandExit(int fd, const std::string &args) { FD_CLR(fd, &_read_set); _fds.erase(std::remove(_fds.begin(), _fds.end(), fd), _fds.end()); -#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); @@ -1124,7 +1124,7 @@ void Console::loop() //receive a SIGPIPE, which will cause linux system shutdown the sending process. //Add this ioctl code to check if the socket has been closed by peer. -#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) u_long n = 0; ioctlsocket(fd, FIONREAD, &n); #else @@ -1169,14 +1169,14 @@ void Console::loop() // clean up: ignore stdin, stdout and stderr for(const auto &fd: _fds ) { -#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); #endif } -#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(_listenfd); WSACleanup(); #else diff --git a/cocos/base/CCData.h b/cocos/base/CCData.h index aff127d6de..6666f7e7e2 100644 --- a/cocos/base/CCData.h +++ b/cocos/base/CCData.h @@ -40,6 +40,8 @@ NS_CC_BEGIN class CC_DLL Data { + friend class Properties; + public: /** * This parameter is defined for convenient reference if a null Data object is needed. diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index 3698a56ee7..b9dfcaf99a 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -70,6 +70,10 @@ THE SOFTWARE. #include "physics/CCPhysicsWorld.h" #endif +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION +#include "physics3d/CCPhysics3DWorld.h" +#endif + /** Position of the FPS @@ -293,6 +297,13 @@ void Director::drawScene() { physicsWorld->update(_deltaTime, false); } +#endif +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + auto physics3DWorld = _runningScene->getPhysics3DWorld(); + if (physics3DWorld) + { + physics3DWorld->stepSimulate(_deltaTime); + } #endif //clear draw stats _renderer->clearDrawStats(); @@ -606,12 +617,7 @@ void Director::setProjection(Projection projection) case Projection::_2D: { loadIdentityMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - if(getOpenGLView() != nullptr) - { - multiplyMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, getOpenGLView()->getOrientationMatrix()); - } -#endif + Mat4 orthoMatrix; Mat4::createOrthographicOffCenter(0, size.width, 0, size.height, -1024, 1024, &orthoMatrix); multiplyMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, orthoMatrix); @@ -626,15 +632,7 @@ void Director::setProjection(Projection projection) Mat4 matrixPerspective, matrixLookup; loadIdentityMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - //if needed, we need to add a rotation for Landscape orientations on Windows Phone 8 since it is always in Portrait Mode - GLView* view = getOpenGLView(); - if(getOpenGLView() != nullptr) - { - multiplyMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, getOpenGLView()->getOrientationMatrix()); - } -#endif + // issue #1334 Mat4::createPerspective(60, (GLfloat)size.width/size.height, 10, zeye+size.height/2, &matrixPerspective); @@ -718,12 +716,6 @@ static void GLToClipTransform(Mat4 *transformOut) CCASSERT(nullptr != director, "Director is null when seting matrix stack"); auto projection = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - //if needed, we need to undo the rotation for Landscape orientation in order to get the correct positions - projection = Director::getInstance()->getOpenGLView()->getReverseOrientationMatrix() * projection; -#endif - auto modelview = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); *transformOut = projection * modelview; } diff --git a/cocos/base/CCProperties.cpp b/cocos/base/CCProperties.cpp new file mode 100644 index 0000000000..46c4710660 --- /dev/null +++ b/cocos/base/CCProperties.cpp @@ -0,0 +1,1334 @@ +/** + Copyright 2013 BlackBerry Inc. + Copyright (c) 2015 Chukong Technologies + + 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. + + Original file from GamePlay3D: http://gameplay3d.org + + This file was modified to fit the cocos2d-x project + */ + + +#include "CCProperties.h" + +#include + +#include "platform/CCPlatformMacros.h" +#include "platform/CCFileUtils.h" +#include "math/Vec2.h" +#include "math/Vec3.h" +#include "math/Vec4.h" +#include "math/Mat4.h" +#include "base/ccUTF8.h" +#include "base/CCData.h" +#include "deprecated/CCString.h" + + +USING_NS_CC; + +// Utility functions (shared with SceneLoader). +/** @script{ignore} */ +void calculateNamespacePath(const std::string& urlString, std::string& fileString, std::vector& namespacePath); +/** @script{ignore} */ +Properties* getPropertiesFromNamespacePath(Properties* properties, const std::vector& namespacePath); + +Properties::Properties() +: _variables(nullptr), _dirPath(nullptr), _parent(nullptr), _dataIdx(nullptr), _data(nullptr) +{ + _properties.reserve(32); +} + +Properties::Properties(const Properties& copy) + : _namespace(copy._namespace), _id(copy._id), _parentID(copy._parentID), _properties(copy._properties), + _variables(nullptr), _dirPath(nullptr), _parent(copy._parent), + _dataIdx(copy._dataIdx), _data(copy._data) +{ + setDirectoryPath(copy._dirPath); + + for (const auto space: copy._namespaces) + { + _namespaces.push_back(new (std::nothrow) Properties(*space)); + } + rewind(); +} + +Properties::Properties(Data* data, ssize_t* dataIdx) + : _variables(NULL), _dirPath(NULL), _parent(NULL), _dataIdx(dataIdx), _data(data) +{ + readProperties(); + rewind(); +} + +Properties::Properties(Data* data, ssize_t* dataIdx, const std::string& name, const char* id, const char* parentID, Properties* parent) + : _namespace(name), _variables(NULL), _dirPath(NULL), _parent(parent), _dataIdx(dataIdx), _data(data) +{ + if (id) + { + _id = id; + } + if (parentID) + { + _parentID = parentID; + } + readProperties(); + rewind(); +} + +Properties* Properties::createWithoutAutorelease(const std::string& url) +{ + if (url.size() == 0) + { + CCLOGERROR("Attempting to create a Properties object from an empty URL!"); + return NULL; + } + + // Calculate the file and full namespace path from the specified url. + std::string urlString = url; + std::string fileString; + std::vector namespacePath; + calculateNamespacePath(urlString, fileString, namespacePath); + + + // data will be released automatically when 'data' goes out of scope + // so we pass data as weak pointer + auto data = FileUtils::getInstance()->getDataFromFile(fileString); + ssize_t dataIdx = 0; + Properties* properties = new (std::nothrow) Properties(&data, &dataIdx); + properties->resolveInheritance(); + + // Get the specified properties object. + Properties* p = getPropertiesFromNamespacePath(properties, namespacePath); + if (!p) + { + CCLOGWARN("Failed to load properties from url '%s'.", url.c_str()); + CC_SAFE_DELETE(properties); + return NULL; + } + + // If the loaded properties object is not the root namespace, + // then we have to clone it and delete the root namespace + // so that we don't leak memory. + if (p != properties) + { + p = p->clone(); + CC_SAFE_DELETE(properties); + } + // XXX +// p->setDirectoryPath(FileSystem::getDirectoryName(fileString)); + p->setDirectoryPath(""); + return p; +} + +static bool isVariable(const char* str, char* outName, size_t outSize) +{ + size_t len = strlen(str); + if (len > 3 && str[0] == '$' && str[1] == '{' && str[len - 1] == '}') + { + size_t size = len - 3; + if (size > (outSize - 1)) + size = outSize - 1; + strncpy(outName, str + 2, len - 3); + outName[len - 3] = 0; + return true; + } + + return false; +} + +void Properties::readProperties() +{ + CCASSERT(_data->getSize() >0, "Invalid data"); + + char line[2048]; + char variable[256]; + int c; + char* name; + char* value; + char* parentID; + char* rc; + char* rcc; + char* rccc; + bool comment = false; + + while (true) + { + // Skip whitespace at the start of lines + skipWhiteSpace(); + + // Stop when we have reached the end of the file. + if (eof()) + break; + + // Read the next line. + rc = readLine(line, 2048); + if (rc == NULL) + { + CCLOGERROR("Error reading line from file."); + return; + } + + // Ignore comments + if (comment) + { + // Check for end of multi-line comment at either start or end of line + if (strncmp(line, "*/", 2) == 0) + comment = false; + else + { + trimWhiteSpace(line); + const auto len = strlen(line); + if (len >= 2 && strncmp(line + (len - 2), "*/", 2) == 0) + comment = false; + } + } + else if (strncmp(line, "/*", 2) == 0) + { + // Start of multi-line comment (must be at start of line) + comment = true; + } + else if (strncmp(line, "//", 2) != 0) + { + // If an '=' appears on this line, parse it as a name/value pair. + // Note: strchr() has to be called before strtok(), or a backup of line has to be kept. + rc = strchr(line, '='); + if (rc != NULL) + { + // First token should be the property name. + name = strtok(line, "="); + if (name == NULL) + { + CCLOGERROR("Error parsing properties file: attribute without name."); + return; + } + + // Remove white-space from name. + name = trimWhiteSpace(name); + + // Scan for next token, the property's value. + value = strtok(NULL, ""); + if (value == NULL) + { + CCLOGERROR("Error parsing properties file: attribute with name ('%s') but no value.", name); + return; + } + + // Remove white-space from value. + value = trimWhiteSpace(value); + + // Is this a variable assignment? + if (isVariable(name, variable, 256)) + { + setVariable(variable, value); + } + else + { + // Normal name/value pair + _properties.push_back(Property(name, value)); + } + } + else + { + parentID = NULL; + + // Get the last character on the line (ignoring whitespace). + const char* lineEnd = trimWhiteSpace(line) + (strlen(trimWhiteSpace(line)) - 1); + + // This line might begin or end a namespace, + // or it might be a key/value pair without '='. + + // Check for '{' on same line. + rc = strchr(line, '{'); + + // Check for inheritance: ':' + rcc = strchr(line, ':'); + + // Check for '}' on same line. + rccc = strchr(line, '}'); + + // Get the name of the namespace. + name = strtok(line, " \t\n{"); + name = trimWhiteSpace(name); + if (name == NULL) + { + CCLOGERROR("Error parsing properties file: failed to determine a valid token for line '%s'.", line); + return; + } + else if (name[0] == '}') + { + // End of namespace. + return; + } + + // Get its ID if it has one. + value = strtok(NULL, ":{"); + value = trimWhiteSpace(value); + + // Get its parent ID if it has one. + if (rcc != NULL) + { + parentID = strtok(NULL, "{"); + parentID = trimWhiteSpace(parentID); + } + + if (value != NULL && value[0] == '{') + { + // If the namespace ends on this line, seek back to right before the '}' character. + if (rccc && rccc == lineEnd) + { + if (seekFromCurrent(-1) == false) + { + CCLOGERROR("Failed to seek back to before a '}' character in properties file."); + return; + } + while (readChar() != '}') + { + if (seekFromCurrent(-2) == false) + { + CCLOGERROR("Failed to seek back to before a '}' character in properties file."); + return; + } + } + if (seekFromCurrent(-1) == false) + { + CCLOGERROR("Failed to seek back to before a '}' character in properties file."); + return; + } + } + + // New namespace without an ID. + Properties* space = new (std::nothrow) Properties(_data, _dataIdx, name, NULL, parentID, this); + _namespaces.push_back(space); + + // If the namespace ends on this line, seek to right after the '}' character. + if (rccc && rccc == lineEnd) + { + if (seekFromCurrent(1) == false) + { + CCLOGERROR("Failed to seek to immediately after a '}' character in properties file."); + return; + } + } + } + else + { + // If '{' appears on the same line. + if (rc != NULL) + { + // If the namespace ends on this line, seek back to right before the '}' character. + if (rccc && rccc == lineEnd) + { + if (seekFromCurrent(-1) == false) + { + CCLOGERROR("Failed to seek back to before a '}' character in properties file."); + return; + } + while (readChar() != '}') + { + if (seekFromCurrent(-2) == false) + { + CCLOGERROR("Failed to seek back to before a '}' character in properties file."); + return; + } + } + if (seekFromCurrent(-1) == false) + { + CCLOGERROR("Failed to seek back to before a '}' character in properties file."); + return; + } + } + + // Create new namespace. + Properties* space = new (std::nothrow) Properties(_data, _dataIdx, name, value, parentID, this); + _namespaces.push_back(space); + + // If the namespace ends on this line, seek to right after the '}' character. + if (rccc && rccc == lineEnd) + { + if (seekFromCurrent(1) == false) + { + CCLOGERROR("Failed to seek to immediately after a '}' character in properties file."); + return; + } + } + } + else + { + // Find out if the next line starts with "{" + skipWhiteSpace(); + c = readChar(); + if (c == '{') + { + // Create new namespace. + Properties* space = new (std::nothrow) Properties(_data, _dataIdx, name, value, parentID, this); + _namespaces.push_back(space); + } + else + { + // Back up from fgetc() + if (seekFromCurrent(-1) == false) + CCLOGERROR("Failed to seek backwards a single character after testing if the next line starts with '{'."); + + // Store "name value" as a name/value pair, or even just "name". + if (value != NULL) + { + _properties.push_back(Property(name, value)); + } + else + { + _properties.push_back(Property(name, "")); + } + } + } + } + } + } + } +} + +Properties::~Properties() +{ + CC_SAFE_DELETE(_dirPath); + for (size_t i = 0, count = _namespaces.size(); i < count; ++i) + { + CC_SAFE_DELETE(_namespaces[i]); + } + + CC_SAFE_DELETE(_variables); +} + +// +// Stream simulation +// +signed char Properties::readChar() +{ + if (eof()) + return EOF; + return _data->_bytes[(*_dataIdx)++]; +} + +char* Properties::readLine(char* output, int num) +{ + int idx=0; + + if (eof()) + return nullptr; + + // little optimization: avoid uneeded dereferences + ssize_t dataIdx = *_dataIdx; + + while (dataIdx<_data->_size && _data->_bytes[dataIdx]!='\n' && idx-1_bytes[*_dataIdx], idx); + output[idx] = '\0'; + + // restore value + *_dataIdx = dataIdx; + + return output; +} + +bool Properties::seekFromCurrent(int offset) +{ + (*_dataIdx) += offset; + + return (!eof() && *_dataIdx >= 0); +} + +bool Properties::eof() +{ + return (*_dataIdx >= _data->_size); +} + +void Properties::skipWhiteSpace() +{ + signed char c; + do + { + c = readChar(); + } while (isspace(c) && c != EOF); + + // If we are not at the end of the file, then since we found a + // non-whitespace character, we put the cursor back in front of it. + if (c != EOF) + { + if (seekFromCurrent(-1) == false) + { + CCLOGERROR("Failed to seek backwards one character after skipping whitespace."); + } + } +} + +char* Properties::trimWhiteSpace(char *str) +{ + if (str == NULL) + { + return str; + } + + char *end; + + // Trim leading space. + while (isspace(*str)) + str++; + + // All spaces? + if (*str == 0) + { + return str; + } + + // Trim trailing space. + end = str + strlen(str) - 1; + while (end > str && isspace(*end)) + end--; + + // Write new null terminator. + *(end+1) = 0; + + return str; +} + +void Properties::resolveInheritance(const char* id) +{ + // Namespaces can be defined like so: + // "name id : parentID { }" + // This method merges data from the parent namespace into the child. + + // Get a top-level namespace. + Properties* derived; + if (id) + { + derived = getNamespace(id); + } + else + { + derived = getNextNamespace(); + } + while (derived) + { + // If the namespace has a parent ID, find the parent. + if (!derived->_parentID.empty()) + { + Properties* parent = getNamespace(derived->_parentID.c_str()); + if (parent) + { + resolveInheritance(parent->getId()); + + // Copy the child. + Properties* overrides = new (std::nothrow) Properties(*derived); + + // Delete the child's data. + for (size_t i = 0, count = derived->_namespaces.size(); i < count; i++) + { + CC_SAFE_DELETE(derived->_namespaces[i]); + } + + // Copy data from the parent into the child. + derived->_properties = parent->_properties; + derived->_namespaces = std::vector(); + std::vector::const_iterator itt; + for (const auto space: parent->_namespaces) + { + derived->_namespaces.push_back(new (std::nothrow) Properties(*space)); + } + derived->rewind(); + + // Take the original copy of the child and override the data copied from the parent. + derived->mergeWith(overrides); + + // Delete the child copy. + CC_SAFE_DELETE(overrides); + } + } + + // Resolve inheritance within this namespace. + derived->resolveInheritance(); + + // Get the next top-level namespace and check again. + if (!id) + { + derived = getNextNamespace(); + } + else + { + derived = NULL; + } + } +} + +void Properties::mergeWith(Properties* overrides) +{ + CCASSERT(overrides, "Invalid overrides"); + + // Overwrite or add each property found in child. + overrides->rewind(); + const char* name = overrides->getNextProperty(); + while (name) + { + this->setString(name, overrides->getString()); + name = overrides->getNextProperty(); + } + this->_propertiesItr = this->_properties.end(); + + // Merge all common nested namespaces, add new ones. + Properties* overridesNamespace = overrides->getNextNamespace(); + while (overridesNamespace) + { + bool merged = false; + + rewind(); + Properties* derivedNamespace = getNextNamespace(); + while (derivedNamespace) + { + if (strcmp(derivedNamespace->getNamespace(), overridesNamespace->getNamespace()) == 0 && + strcmp(derivedNamespace->getId(), overridesNamespace->getId()) == 0) + { + derivedNamespace->mergeWith(overridesNamespace); + merged = true; + } + + derivedNamespace = getNextNamespace(); + } + + if (!merged) + { + // Add this new namespace. + Properties* newNamespace = new (std::nothrow) Properties(*overridesNamespace); + + this->_namespaces.push_back(newNamespace); + this->_namespacesItr = this->_namespaces.end(); + } + + overridesNamespace = overrides->getNextNamespace(); + } +} + +const char* Properties::getNextProperty() +{ + if (_propertiesItr == _properties.end()) + { + // Restart from the beginning + _propertiesItr = _properties.begin(); + } + else + { + // Move to the next property + ++_propertiesItr; + } + + return _propertiesItr == _properties.end() ? NULL : _propertiesItr->name.c_str(); +} + +Properties* Properties::getNextNamespace() +{ + if (_namespacesItr == _namespaces.end()) + { + // Restart from the beginning + _namespacesItr = _namespaces.begin(); + } + else + { + ++_namespacesItr; + } + + if (_namespacesItr != _namespaces.end()) + { + Properties* ns = *_namespacesItr; + return ns; + } + + return NULL; +} + +void Properties::rewind() +{ + _propertiesItr = _properties.end(); + _namespacesItr = _namespaces.end(); +} + +Properties* Properties::getNamespace(const char* id, bool searchNames, bool recurse) const +{ + CCASSERT(id, "invalid id"); + + for (std::vector::const_iterator it = _namespaces.begin(); it < _namespaces.end(); ++it) + { + Properties* p = *it; + if (strcmp(searchNames ? p->_namespace.c_str() : p->_id.c_str(), id) == 0) + return p; + + if (recurse) + { + // Search recursively. + p = p->getNamespace(id, searchNames, true); + if (p) + return p; + } + } + + return NULL; +} + +const char* Properties::getNamespace() const +{ + return _namespace.c_str(); +} + +const char* Properties::getId() const +{ + return _id.c_str(); +} + +bool Properties::exists(const char* name) const +{ + if (name == NULL) + return false; + + for (std::vector::const_iterator itr = _properties.begin(); itr != _properties.end(); ++itr) + { + if (itr->name == name) + return true; + } + + return false; +} + +static const bool isStringNumeric(const char* str) +{ + CCASSERT(str, "invalid str"); + + // The first character may be '-' + if (*str == '-') + str++; + + // The first character after the sign must be a digit + if (!isdigit(*str)) + return false; + str++; + + // All remaining characters must be digits, with a single decimal (.) permitted + unsigned int decimalCount = 0; + while (*str) + { + if (!isdigit(*str)) + { + if (*str == '.' && decimalCount == 0) + { + // Max of 1 decimal allowed + decimalCount++; + } + else + { + return false; + } + } + str++; + } + return true; +} + +Properties::Type Properties::getType(const char* name) const +{ + const char* value = getString(name); + if (!value) + { + return Properties::NONE; + } + + // Parse the value to determine the format + unsigned int commaCount = 0; + char* valuePtr = const_cast(value); + while ((valuePtr = strchr(valuePtr, ','))) + { + valuePtr++; + commaCount++; + } + + switch (commaCount) + { + case 0: + return isStringNumeric(value) ? Properties::NUMBER : Properties::STRING; + case 1: + return Properties::VECTOR2; + case 2: + return Properties::VECTOR3; + case 3: + return Properties::VECTOR4; + case 15: + return Properties::MATRIX; + default: + return Properties::STRING; + } +} + +const char* Properties::getString(const char* name, const char* defaultValue) const +{ + char variable[256]; + const char* value = NULL; + + if (name) + { + // If 'name' is a variable, return the variable value + if (isVariable(name, variable, 256)) + { + return getVariable(variable, defaultValue); + } + + for (std::vector::const_iterator itr = _properties.begin(); itr != _properties.end(); ++itr) + { + if (itr->name == name) + { + value = itr->value.c_str(); + break; + } + } + } + else + { + // No name provided - get the value at the current iterator position + if (_propertiesItr != _properties.end()) + { + value = _propertiesItr->value.c_str(); + } + } + + if (value) + { + // If the value references a variable, return the variable value + if (isVariable(value, variable, 256)) + return getVariable(variable, defaultValue); + + return value; + } + + return defaultValue; +} + +bool Properties::setString(const char* name, const char* value) +{ + if (name) + { + for (std::vector::iterator itr = _properties.begin(); itr != _properties.end(); ++itr) + { + if (itr->name == name) + { + // Update the first property that matches this name + itr->value = value ? value : ""; + return true; + } + } + + // There is no property with this name, so add one + _properties.push_back(Property(name, value ? value : "")); + } + else + { + // If there's a current property, set its value + if (_propertiesItr == _properties.end()) + return false; + + _propertiesItr->value = value ? value : ""; + } + + return true; +} + +bool Properties::getBool(const char* name, bool defaultValue) const +{ + const char* valueString = getString(name); + if (valueString) + { + return (strcmp(valueString, "true") == 0); + } + + return defaultValue; +} + +int Properties::getInt(const char* name) const +{ + const char* valueString = getString(name); + if (valueString) + { + int value; + int scanned; + scanned = sscanf(valueString, "%d", &value); + if (scanned != 1) + { + CCLOGERROR("Error attempting to parse property '%s' as an integer.", name); + return 0; + } + return value; + } + + return 0; +} + +float Properties::getFloat(const char* name) const +{ + const char* valueString = getString(name); + if (valueString) + { + float value; + int scanned; + scanned = sscanf(valueString, "%f", &value); + if (scanned != 1) + { + CCLOGERROR("Error attempting to parse property '%s' as a float.", name); + return 0.0f; + } + return value; + } + + return 0.0f; +} + +long Properties::getLong(const char* name) const +{ + const char* valueString = getString(name); + if (valueString) + { + long value; + int scanned; + scanned = sscanf(valueString, "%ld", &value); + if (scanned != 1) + { + CCLOGERROR("Error attempting to parse property '%s' as a long integer.", name); + return 0L; + } + return value; + } + + return 0L; +} + +bool Properties::getMat4(const char* name, Mat4* out) const +{ + CCASSERT(out, "Invalid out"); + + const char* valueString = getString(name); + if (valueString) + { + float m[16]; + int scanned; + scanned = sscanf(valueString, "%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f", + &m[0], &m[1], &m[2], &m[3], &m[4], &m[5], &m[6], &m[7], + &m[8], &m[9], &m[10], &m[11], &m[12], &m[13], &m[14], &m[15]); + + if (scanned != 16) + { + CCLOGERROR("Error attempting to parse property '%s' as a matrix.", name); + out->setIdentity(); + return false; + } + + out->set(m); + return true; + } + + out->setIdentity(); + return false; +} + +bool Properties::getVec2(const char* name, Vec2* out) const +{ + return parseVec2(getString(name), out); +} + +bool Properties::getVec3(const char* name, Vec3* out) const +{ + return parseVec3(getString(name), out); +} + +bool Properties::getVec4(const char* name, Vec4* out) const +{ + return parseVec4(getString(name), out); +} + +bool Properties::getQuaternionFromAxisAngle(const char* name, Quaternion* out) const +{ + return parseAxisAngle(getString(name), out); +} + +bool Properties::getColor(const char* name, Vec3* out) const +{ + return parseColor(getString(name), out); +} + +bool Properties::getColor(const char* name, Vec4* out) const +{ + return parseColor(getString(name), out); +} + +bool Properties::getPath(const char* name, std::string* path) const +{ + CCASSERT(name && path, "Invalid name or path"); + const char* valueString = getString(name); + if (valueString) + { + if (FileUtils::getInstance()->isFileExist(valueString)) + { + path->assign(valueString); + return true; + } + else + { + const Properties* prop = this; + while (prop != NULL) + { + // Search for the file path relative to the bundle file + const std::string* dirPath = prop->_dirPath; + if (dirPath != NULL && !dirPath->empty()) + { + std::string relativePath = *dirPath; + relativePath.append(valueString); + if (FileUtils::getInstance()->isFileExist(relativePath.c_str())) + { + path->assign(relativePath); + return true; + } + } + prop = prop->_parent; + } + } + } + return false; +} + +const char* Properties::getVariable(const char* name, const char* defaultValue) const +{ + if (name == NULL) + return defaultValue; + + // Search for variable in this Properties object + if (_variables) + { + for (size_t i = 0, count = _variables->size(); i < count; ++i) + { + Property& prop = (*_variables)[i]; + if (prop.name == name) + return prop.value.c_str(); + } + } + + // Search for variable in parent Properties + return _parent ? _parent->getVariable(name, defaultValue) : defaultValue; +} + +void Properties::setVariable(const char* name, const char* value) +{ + CCASSERT(name, "Invalid name"); + + Property* prop = NULL; + + // Search for variable in this Properties object and parents + Properties* current = const_cast(this); + while (current) + { + if (current->_variables) + { + for (size_t i = 0, count = current->_variables->size(); i < count; ++i) + { + Property* p = &(*current->_variables)[i]; + if (p->name == name) + { + prop = p; + break; + } + } + } + current = current->_parent; + } + + if (prop) + { + // Found an existing property, set it + prop->value = value ? value : ""; + } + else + { + // Add a new variable with this name + if (!_variables) + _variables = new (std::nothrow) std::vector(); + _variables->push_back(Property(name, value ? value : "")); + } +} + +Properties* Properties::clone() +{ + Properties* p = new (std::nothrow) Properties(); + + p->_namespace = _namespace; + p->_id = _id; + p->_parentID = _parentID; + p->_properties = _properties; + p->_propertiesItr = p->_properties.end(); + p->setDirectoryPath(_dirPath); + + for (size_t i = 0, count = _namespaces.size(); i < count; i++) + { + CCASSERT(_namespaces[i], "Invalid namespace"); + Properties* child = _namespaces[i]->clone(); + p->_namespaces.push_back(child); + child->_parent = p; + } + p->_namespacesItr = p->_namespaces.end(); + + return p; +} + +void Properties::setDirectoryPath(const std::string* path) +{ + if (path) + { + setDirectoryPath(*path); + } + else + { + CC_SAFE_DELETE(_dirPath); + } +} + +void Properties::setDirectoryPath(const std::string& path) +{ + if (_dirPath == NULL) + { + _dirPath = new (std::nothrow) std::string(path); + } + else + { + _dirPath->assign(path); + } +} + +void calculateNamespacePath(const std::string& urlString, std::string& fileString, std::vector& namespacePath) +{ + // If the url references a specific namespace within the file, + // calculate the full namespace path to the final namespace. + size_t loc = urlString.rfind("#"); + if (loc != std::string::npos) + { + fileString = urlString.substr(0, loc); + std::string namespacePathString = urlString.substr(loc + 1); + while ((loc = namespacePathString.find("/")) != std::string::npos) + { + namespacePath.push_back(namespacePathString.substr(0, loc)); + namespacePathString = namespacePathString.substr(loc + 1); + } + namespacePath.push_back(namespacePathString); + } + else + { + fileString = urlString; + } +} + +Properties* getPropertiesFromNamespacePath(Properties* properties, const std::vector& namespacePath) +{ + // If the url references a specific namespace within the file, + // return the specified namespace or notify the user if it cannot be found. + if (namespacePath.size() > 0) + { + size_t size = namespacePath.size(); + properties->rewind(); + Properties* iter = properties->getNextNamespace(); + for (size_t i = 0; i < size; ) + { + while (true) + { + if (iter == NULL) + { + CCLOGWARN("Failed to load properties object from url."); + return NULL; + } + + if (strcmp(iter->getId(), namespacePath[i].c_str()) == 0) + { + if (i != size - 1) + { + properties = iter->getNextNamespace(); + iter = properties; + } + else + properties = iter; + + i++; + break; + } + + iter = properties->getNextNamespace(); + } + } + + return properties; + } + else + return properties; +} + +bool Properties::parseVec2(const char* str, Vec2* out) +{ + if (str) + { + float x, y; + if (sscanf(str, "%f,%f", &x, &y) == 2) + { + if (out) + out->set(x, y); + return true; + } + else + { + CCLOGWARN("Error attempting to parse property as a two-dimensional vector: %s", str); + } + } + + if (out) + out->set(0.0f, 0.0f); + return false; +} + +bool Properties::parseVec3(const char* str, Vec3* out) +{ + if (str) + { + float x, y, z; + if (sscanf(str, "%f,%f,%f", &x, &y, &z) == 3) + { + if (out) + out->set(x, y, z); + return true; + } + else + { + CCLOGWARN("Error attempting to parse property as a three-dimensional vector: %s", str); + } + } + + if (out) + out->set(0.0f, 0.0f, 0.0f); + return false; +} + +bool Properties::parseVec4(const char* str, Vec4* out) +{ + if (str) + { + float x, y, z, w; + if (sscanf(str, "%f,%f,%f,%f", &x, &y, &z, &w) == 4) + { + if (out) + out->set(x, y, z, w); + return true; + } + else + { + CCLOGWARN("Error attempting to parse property as a four-dimensional vector: %s", str); + } + } + + if (out) + out->set(0.0f, 0.0f, 0.0f, 0.0f); + return false; +} + +bool Properties::parseAxisAngle(const char* str, Quaternion* out) +{ + if (str) + { + float x, y, z, theta; + if (sscanf(str, "%f,%f,%f,%f", &x, &y, &z, &theta) == 4) + { + if (out) + out->set(Vec3(x, y, z), MATH_DEG_TO_RAD(theta)); + return true; + } + else + { + CCLOGWARN("Error attempting to parse property as an axis-angle rotation: %s", str); + } + } + + if (out) + out->set(0.0f, 0.0f, 0.0f, 1.0f); + return false; +} + +bool Properties::parseColor(const char* str, Vec3* out) +{ + if (str) + { + if (strlen(str) == 7 && str[0] == '#') + { + // Read the string into an int as hex. + unsigned int color; + if (sscanf(str + 1, "%x", &color) == 1) + { + if (out) + out->set(Vec3::fromColor(color)); + return true; + } + else + { + // Invalid format + CCLOGWARN("Error attempting to parse property as an RGB color: %s", str); + } + } + else + { + // Not a color string. + CCLOGWARN("Error attempting to parse property as an RGB color (not specified as a color string): %s", str); + } + } + + if (out) + out->set(0.0f, 0.0f, 0.0f); + return false; +} + +bool Properties::parseColor(const char* str, Vec4* out) +{ + if (str) + { + if (strlen(str) == 9 && str[0] == '#') + { + // Read the string into an int as hex. + unsigned int color; + if (sscanf(str + 1, "%x", &color) == 1) + { + if (out) + out->set(Vec4::fromColor(color)); + return true; + } + else + { + // Invalid format + CCLOGWARN("Error attempting to parse property as an RGBA color: %s", str); + } + } + else + { + // Not a color string. + CCLOGWARN("Error attempting to parse property as an RGBA color (not specified as a color string): %s", str); + } + } + + if (out) + out->set(0.0f, 0.0f, 0.0f, 0.0f); + return false; +} + + + diff --git a/cocos/base/CCProperties.h b/cocos/base/CCProperties.h new file mode 100644 index 0000000000..70cd2e48fb --- /dev/null +++ b/cocos/base/CCProperties.h @@ -0,0 +1,616 @@ +/** + Copyright 2013 BlackBerry Inc. + Copyright (c) 2015 Chukong Technologies + + 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. + + Original file from GamePlay3D: http://gameplay3d.org + + This file was modified to fit the cocos2d-x project + */ + + +#ifndef __cocos2d_libs__CCProperties__ +#define __cocos2d_libs__CCProperties__ + +#include +#include +#include +#include + +#include "renderer/CCTexture2D.h" +#include "platform/CCPlatformMacros.h" +#include "base/CCRef.h" +#include "base/ccTypes.h" +#include "base/CCVector.h" + +NS_CC_BEGIN + +class Properties; +class Vec2; +class Vec3; +class Vec4; +class Mat4; +class Data; +class Data; + + +/** + * Defines a properties file for loading text files. + * + * A properties file has very simple syntax and can contain only namespaces and + * name/value pairs (the properties of a namespace). + * The file can have any file extension a user specifies. + * + * Here's an example of a simple + * file that uses all the available features of the markup language: + + @verbatim + // This is a comment. + + // This property is in the default namespace: + integerProperty = 5 + + // This line defines a namespace of type "mynamespace" without an ID: + mynamespace + { + // This namespace can be retrieved by searching for its ID, "spriteTexture", + // or by its name "texture": + texture spriteTexture + { + fileName = sprite.png + width = 64 + height = 64 + } + + // This property is in the "space" namespace: + booleanProperty = true + + // It's legal to have a name without a value if you leave out the '=' character: + foo + + // In fact, the '=' character is optional if you'd rather write: + bar 23 + + // But don't write this or you'll get an error: + // illegalProperty = + + // Or this: + // = 15 + + // Properties objects let you retrieve values as various types. + floatProperty = 3.333 + stringProperty = This is a string. + vector3Property = 1.0, 5.0, 3.55 + colorProperty = 1.0, 0.4, 0.0, 1.0 + } + @endverbatim + + * Retrieving information out of a file like this could be done in two ways. If the + * available namespaces and name/value pairs are known in advance they can be queried by ID or name. + * For example, if the namespace "spriteTexture" and its properties are required then they can + * be retrieved with a call to getNamespace() followed by calls to getString() and getInt(). + * A namespace is stored and retrieved as a Properties object. + * Reading the spriteTexture properties out of the file above in this way could be done with the following code: + + @verbatim + // Create the top-level Properties object. + Properties* properties = Properties::createWithoutAutorelease("example.properties"); + // Retrieve the "spriteTexture" namespace. + Properties* spriteTexture = properties->getNamespace("spriteTexture"); + + // Get the values of known texture properties out of the namespace. + const char* fileName = spriteTexture->getString("fileName"); + int width = spriteTexture->getInt("width"); + int height = spriteTexture->getInt("height"); + + // Deleting the top-level Properties object will clean up all nested namespaces. + SAFE_DELETE(properties); + @endverbatim + + * On the other hand, if the structure of the file is not known in advance its + * namespaces and name/value pairs can be retrieved one by one using the getNextNamespace() + * and getNextProperty() methods. The following method prints the contents of any properties file + * to the console: + + @verbatim + void printProperties(Properties* properties) + { + // Print the name and ID of the current namespace. + const char* spacename = properties->getNamespace(); + const char* id = properties->getId(); + GP_WARN("Namespace: %s ID: %s\n{", spacename, id); + + // Print all properties in this namespace. + const char* name = properties->getNextProperty(); + const char* value = NULL; + while (name != NULL) + { + value = properties->getString(name); + GP_WARN("%s = %s", name, value); + name = properties->getNextProperty(); + } + GP_WARN("}\n"); + + // Print the properties of every namespace within this one. + Properties* space = properties->getNextNamespace(); + while (space != NULL) + { + printProperties(space); + space = properties->getNextNamespace(); + } + } + @endverbatim + + * Note that this method does not keep track of the namespace hierarchy, but could be + * modified to do so. Also note that nothing in a properties file indicates the type + * of a property. If the type is unknown, its string can be retrieved and interpreted + * as necessary. + */ +class CC_DLL Properties +{ + friend class Game; + +public: + + /** + * Data types supported by the properties class. + */ + enum Type + { + NONE, + STRING, + NUMBER, + VECTOR2, + VECTOR3, + VECTOR4, + MATRIX + }; + + /** + * Creates a Properties runtime settings from the specified URL, where the URL is of + * the format ".#//.../" + * (and "#//.../" is optional). + * + * @param url The URL to create the properties from. + * + * @return The created Properties or NULL if there was an error. + * @script{create} + */ + static Properties* createWithoutAutorelease(const std::string& url); + + /** + * Destructor. + */ + ~Properties(); + + /** + * 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. + */ + const char* getNextProperty(); + + /** + * Get the next namespace. + */ + Properties* getNextNamespace(); + + /** + * Rewind the getNextProperty() and getNextNamespace() iterators + * to the beginning of the file. + */ + void rewind(); + + /** + * Get a specific namespace by ID or name. This method will optionally + * perform a depth-first search on all namespaces and inner namespaces + * within this Property. + * + * @param id The ID or name of the namespace to find. + * @param searchNames If true, namespace names are used in the search, + * instead of namespace IDs. By default this parameter is false + * and namespace IDs are searched. + * @param recurse If true, perform a depth-first search, otherwise search + * only the immediate child namespaces. + * + * @return A properties object with the given ID or name. + */ + Properties* getNamespace(const char* id, bool searchNames = false, bool recurse = true) const; + + /** + * Get the name of this Property's namespace. + * + * @return The name of this Property's namespace. + */ + const char* getNamespace() const; + + /** + * 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. + */ + const char* getId() const; + + /** + * 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. + */ + bool exists(const char* name) const; + + /** + * 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. + */ + Type getType(const char* name = NULL) const; + + /** + * 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. + */ + const char* getString(const char* name = NULL, const char* defaultValue = NULL) const; + + /** + * 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. + */ + bool setString(const char* name, const char* value); + + /** + * 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. + */ + bool getBool(const char* name = NULL, bool defaultValue = false) const; + + /** + * 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. + */ + int getInt(const char* name = NULL) const; + + /** + * 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. + */ + float getFloat(const char* name = NULL) const; + + /** + * 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. + */ + long getLong(const char* name = NULL) const; + + /** + * 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. + */ + bool getMat4(const char* name, Mat4* out) const; + + /** + * 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. + */ + bool getVec2(const char* name, Vec2* out) const; + + /** + * 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. + */ + bool getVec3(const char* name, Vec3* out) const; + + /** + * 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. + */ + bool getVec4(const char* name, Vec4* out) const; + + /** + * 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. + */ + bool getQuaternionFromAxisAngle(const char* name, Quaternion* out) const; + + /** + * Interpret the value of the given property as an RGB color in hex and write this color to a Vector3. + * E.g. 0xff0000 represents red and sets the vector to (1, 0, 0). + * 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. + */ + bool getColor(const char* name, Vec3* out) const; + + /** + * Interpret the value of the given property as an RGBA color in hex and write this color to a Vector4. + * E.g. 0xff0000ff represents opaque red and sets the vector to (1, 0, 0, 1). + * 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. + */ + bool getColor(const char* name, Vec4* out) const; + + /** + * 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} + */ + bool getPath(const char* name, std::string* path) const; + + /** + * 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. + */ + const char* getVariable(const char* name, const char* defaultValue = NULL) const; + + /** + * Sets the value of the specified variable. + * + * @param name Name of the variable to set. + * @param value The value to set. + */ + void setVariable(const char* name, const char* value); + + /** + * 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. + */ + static bool parseVec2(const char* str, Vec2* out); + + /** + * 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. + */ + static bool parseVec3(const char* str, Vec3* out); + + /** + * 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. + */ + static bool parseVec4(const char* str, Vec4* out); + + /** + * 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. + */ + static bool parseAxisAngle(const char* str, Quaternion* out); + + /** + * Atempts to parse the specified string as an RGB color value. + * + * @param str The string to parse. + * @param out The value to populate if successful. + * + * @return True if a valid RGB color was parsed, false otherwise. + */ + static bool parseColor(const char* str, Vec3* out); + + /** + * Atempts to parse the specified string as an RGBA color value. + * + * @param str The string to parse. + * @param out The value to populate if successful. + * + * @return True if a valid RGBA color was parsed, false otherwise. + */ + static bool parseColor(const char* str, Vec4* out); + +private: + + /** + * Internal structure containing a single property. + */ + struct Property + { + std::string name; + std::string value; + Property(const std::string& aname, const std::string& avalue) : name(aname), value(avalue) { } + }; + + /** + * Constructor. + */ + Properties(); + + /** + * Constructs the Properties class from a file. + * + * @param stream The stream used for reading the properties from file. + */ + Properties(Data* data, ssize_t* dataIdx); + Properties(const Properties& copy); + + /** + * Constructor. Read from the beginning of namespace specified. + */ + Properties(Data* data, ssize_t* dataIdx, const std::string& name, const char* id, const char* parentID, Properties* parent); + + // Data manipulation methods + void readProperties(); + void skipWhiteSpace(); + char* trimWhiteSpace(char* str); + signed char readChar(); + char* readLine(char* output, int num); + bool seekFromCurrent(int offset); + bool eof(); + + // Called after createWithoutAutorelease(); copies info from parents into derived namespaces. + void resolveInheritance(const char* id = NULL); + + // Called by resolveInheritance(). + void mergeWith(Properties* overrides); + + // Clones the Properties object. + Properties* clone(); + + void setDirectoryPath(const std::string* path); + void setDirectoryPath(const std::string& path); + + /** + * Reads the next character from the Data. Returns EOF if the end of the Data is reached. + */ + + // XXX: hack in order to simulate GamePlay's Stream with Cocos2d's Data + ssize_t *_dataIdx; + Data *_data; + + std::string _namespace; + std::string _id; + std::string _parentID; + std::vector _properties; + std::vector::iterator _propertiesItr; + std::vector _namespaces; + std::vector::const_iterator _namespacesItr; + std::vector* _variables; + std::string* _dirPath; + Properties* _parent; +}; + +} + +#endif // __cocos2d_libs__CCProperties__ diff --git a/cocos/base/CMakeLists.txt b/cocos/base/CMakeLists.txt index fa1dca6eab..9d6cee3a81 100644 --- a/cocos/base/CMakeLists.txt +++ b/cocos/base/CMakeLists.txt @@ -8,10 +8,6 @@ endif() # todo: also base/CCController-android.cpp set(COCOS_BASE_SRC - base/allocator/CCAllocatorDiagnostics.cpp - base/allocator/CCAllocatorGlobal.cpp - base/allocator/CCAllocatorGlobalNewDelete.cpp - base/ccFPSImages.c base/CCAsyncTaskPool.cpp base/CCAutoreleasePool.cpp base/CCConfiguration.cpp @@ -40,6 +36,7 @@ set(COCOS_BASE_SRC base/CCIMEDispatcher.cpp base/CCNS.cpp base/CCProfiling.cpp + base/CCProperties.cpp base/CCRef.cpp base/CCScheduler.cpp base/CCScriptSupport.cpp @@ -49,9 +46,13 @@ set(COCOS_BASE_SRC base/ObjectFactory.cpp base/TGAlib.cpp base/ZipUtils.cpp + base/allocator/CCAllocatorDiagnostics.cpp + base/allocator/CCAllocatorGlobal.cpp + base/allocator/CCAllocatorGlobalNewDelete.cpp base/atitc.cpp base/base64.cpp base/ccCArray.cpp + base/ccFPSImages.c base/ccRandom.cpp base/ccTypes.cpp base/ccUTF8.cpp diff --git a/cocos/base/ZipUtils.h b/cocos/base/ZipUtils.h index 310a51ffdb..42ce40c251 100644 --- a/cocos/base/ZipUtils.h +++ b/cocos/base/ZipUtils.h @@ -34,7 +34,7 @@ THE SOFTWARE. #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include "platform/android/CCFileUtils-android.h" -#elif(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#elif(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) // for import ssize_t on win32 platform #include "platform/CCStdC.h" #endif diff --git a/cocos/base/allocator/CCAllocatorGlobalNewDelete.cpp b/cocos/base/allocator/CCAllocatorGlobalNewDelete.cpp index b53d6bb864..0a5104cd52 100644 --- a/cocos/base/allocator/CCAllocatorGlobalNewDelete.cpp +++ b/cocos/base/allocator/CCAllocatorGlobalNewDelete.cpp @@ -28,7 +28,7 @@ #include #include -#include "base/ccMacros.h" +#include USING_NS_CC_ALLOCATOR; @@ -45,7 +45,7 @@ namespace void* operator new[] (std::size_t size) { void* ptr = global.allocate(size); - CCASSERT(ptr, "No memory"); + assert(ptr && "No memory"); // dissabling exceptions since cocos2d-x doesn't use them //#if CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID @@ -59,7 +59,7 @@ void* operator new[] (std::size_t size) void* operator new(std::size_t size) { void* ptr = global.allocate(size); - CCASSERT(ptr, "No memory"); + assert(ptr && "No memory"); // dissabling exceptions since cocos2d-x doesn't use them //#if CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID diff --git a/cocos/base/allocator/CCAllocatorMutex.h b/cocos/base/allocator/CCAllocatorMutex.h index 778549f872..48e52ce1a4 100644 --- a/cocos/base/allocator/CCAllocatorMutex.h +++ b/cocos/base/allocator/CCAllocatorMutex.h @@ -41,7 +41,7 @@ pthread_mutex_lock(&m); #define MUTEX_UNLOCK(m) \ pthread_mutex_unlock(&m); -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #include "windows.h" #define MUTEX HANDLE #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 @@ -49,7 +49,7 @@ m = CreateMutex(0, FALSE, 0) #define MUTEX_LOCK(m) \ WaitForSingleObject(m, INFINITE) -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #define MUTEX_INIT(m) \ m = CreateMutexEx(NULL,FALSE,0,NULL); #define MUTEX_LOCK(m) \ diff --git a/cocos/base/ccConfig.h b/cocos/base/ccConfig.h index f261e02570..aa494ba416 100644 --- a/cocos/base/ccConfig.h +++ b/cocos/base/ccConfig.h @@ -252,6 +252,13 @@ THE SOFTWARE. #define CC_USE_PHYSICS 1 #endif +/** 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) +#define CC_USE_3D_PHYSICS 1 +#endif +#endif + /** Use culling or not. */ #ifndef CC_USE_CULLING #define CC_USE_CULLING 1 @@ -278,7 +285,7 @@ THE SOFTWARE. /** Support webp or not. If your application don't use webp format picture, you can undefine this macro to save package size. */ #ifndef CC_USE_WEBP -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) #define CC_USE_WEBP 1 #endif #endif // CC_USE_WEBP diff --git a/cocos/base/ccUtils.cpp b/cocos/base/ccUtils.cpp index 5ae5d66d92..d57011c301 100644 --- a/cocos/base/ccUtils.cpp +++ b/cocos/base/ccUtils.cpp @@ -74,16 +74,7 @@ void onCaptureScreen(const std::function& afterC } glPixelStorei(GL_PACK_ALIGNMENT, 1); - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - // The frame buffer is always created with portrait orientation on WP8. - // So if the current device orientation is landscape, we need to rotate the frame buffer. - auto renderTargetSize = glView->getRenerTargetSize(); - CCASSERT(width * height == static_cast(renderTargetSize.width * renderTargetSize.height), "The frame size is not matched"); - glReadPixels(0, 0, (int)renderTargetSize.width, (int)renderTargetSize.height, GL_RGBA, GL_UNSIGNED_BYTE, buffer.get()); -#else glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer.get()); -#endif std::shared_ptr flippedBuffer(new GLubyte[width * height * 4], [](GLubyte* p) { CC_SAFE_DELETE_ARRAY(p); }); if (!flippedBuffer) @@ -91,32 +82,10 @@ void onCaptureScreen(const std::function& afterC break; } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - if (width == static_cast(renderTargetSize.width)) - { - // The current device orientation is portrait. - for (int row = 0; row < height; ++row) - { - memcpy(flippedBuffer.get() + (height - row - 1) * width * 4, buffer.get() + row * width * 4, width * 4); - } - } - else - { - // The current device orientation is landscape. - for (int row = 0; row < width; ++row) - { - for (int col = 0; col < height; ++col) - { - *(int*)(flippedBuffer.get() + (height - col - 1) * width * 4 + row * 4) = *(int*)(buffer.get() + row * height * 4 + col * 4); - } - } - } -#else for (int row = 0; row < height; ++row) { memcpy(flippedBuffer.get() + (height - row - 1) * width * 4, buffer.get() + row * width * 4, width * 4); } -#endif std::shared_ptr image(new Image); if (image) diff --git a/cocos/cocos2d.cpp b/cocos/cocos2d.cpp index 7088ec8589..0584742ae5 100644 --- a/cocos/cocos2d.cpp +++ b/cocos/cocos2d.cpp @@ -31,7 +31,7 @@ NS_CC_BEGIN CC_DLL const char* cocos2dVersion() { - return "cocos2d-x 3.6"; + return "cocos2d-x 3.7-github"; } NS_CC_END diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index 2888e7b54b..0fed03e9df 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -29,8 +29,8 @@ THE SOFTWARE. #define __COCOS2D_H__ // 0x00 HI ME LO -// 00 03 03 00 -#define COCOS2D_VERSION 0x00030600 +// 00 03 07 00 +#define COCOS2D_VERSION 0x00030700 // // all cocos2d include files @@ -38,107 +38,108 @@ THE SOFTWARE. #include "base/ccConfig.h" // base +#include "base/CCAsyncTaskPool.h" +#include "base/CCAutoreleasePool.h" +#include "base/CCConfiguration.h" +#include "base/CCConsole.h" +#include "base/CCData.h" +#include "base/CCDirector.h" +#include "base/CCIMEDelegate.h" +#include "base/CCIMEDispatcher.h" +#include "base/CCMap.h" +#include "base/CCNS.h" +#include "base/CCProfiling.h" +#include "base/CCProperties.h" #include "base/CCRef.h" #include "base/CCRefPtr.h" -#include "base/CCVector.h" -#include "base/CCMap.h" -#include "base/CCAutoreleasePool.h" -#include "base/CCNS.h" -#include "base/CCData.h" +#include "base/CCScheduler.h" +#include "base/CCUserDefault.h" #include "base/CCValue.h" +#include "base/CCVector.h" +#include "base/ZipUtils.h" +#include "base/base64.h" #include "base/ccConfig.h" #include "base/ccMacros.h" #include "base/ccTypes.h" -#include "base/CCConfiguration.h" -#include "base/CCDirector.h" -#include "base/CCScheduler.h" -#include "base/base64.h" -#include "base/ZipUtils.h" -#include "base/CCProfiling.h" -#include "base/CCConsole.h" #include "base/ccUTF8.h" -#include "base/CCUserDefault.h" -#include "base/CCIMEDelegate.h" -#include "base/CCIMEDispatcher.h" #include "base/ccUtils.h" // EventDispatcher -#include "base/CCEventType.h" -#include "base/CCEventDispatcher.h" -#include "base/CCEventListenerTouch.h" -#include "base/CCEventTouch.h" -#include "base/CCEventListenerKeyboard.h" -#include "base/CCEventKeyboard.h" -#include "base/CCEventListenerMouse.h" -#include "base/CCEventMouse.h" #include "base/CCEventAcceleration.h" -#include "base/CCEventListenerAcceleration.h" #include "base/CCEventCustom.h" -#include "base/CCEventListenerCustom.h" +#include "base/CCEventDispatcher.h" #include "base/CCEventFocus.h" +#include "base/CCEventKeyboard.h" +#include "base/CCEventListenerAcceleration.h" +#include "base/CCEventListenerCustom.h" #include "base/CCEventListenerFocus.h" +#include "base/CCEventListenerKeyboard.h" +#include "base/CCEventListenerMouse.h" +#include "base/CCEventListenerTouch.h" +#include "base/CCEventMouse.h" +#include "base/CCEventTouch.h" +#include "base/CCEventType.h" // math #include "math/CCAffineTransform.h" #include "math/CCGeometry.h" +#include "math/CCVertex.h" +#include "math/Mat4.h" +#include "math/MathUtil.h" +#include "math/Quaternion.h" #include "math/Vec2.h" #include "math/Vec3.h" #include "math/Vec4.h" -#include "math/Mat4.h" -#include "math/Quaternion.h" -#include "math/MathUtil.h" -#include "math/CCVertex.h" // actions #include "2d/CCAction.h" -#include "2d/CCActionInterval.h" #include "2d/CCActionCamera.h" -#include "2d/CCActionManager.h" -#include "2d/CCActionEase.h" -#include "2d/CCActionPageTurn3D.h" -#include "2d/CCActionGrid.h" -#include "2d/CCActionProgressTimer.h" -#include "2d/CCActionGrid3D.h" -#include "2d/CCActionTiledGrid.h" -#include "2d/CCActionInstant.h" -#include "2d/CCActionTween.h" #include "2d/CCActionCatmullRom.h" +#include "2d/CCActionEase.h" +#include "2d/CCActionGrid.h" +#include "2d/CCActionGrid3D.h" +#include "2d/CCActionInstant.h" +#include "2d/CCActionInterval.h" +#include "2d/CCActionManager.h" +#include "2d/CCActionPageTurn3D.h" +#include "2d/CCActionProgressTimer.h" +#include "2d/CCActionTiledGrid.h" +#include "2d/CCActionTween.h" #include "2d/CCTweenFunction.h" // 2d nodes -#include "2d/CCNode.h" -#include "2d/CCProtectedNode.h" #include "2d/CCAtlasNode.h" -#include "2d/CCDrawingPrimitives.h" +#include "2d/CCClippingNode.h" +#include "2d/CCClippingRectangleNode.h" #include "2d/CCDrawNode.h" -#include "2d/CCLabelAtlas.h" -#include "2d/CCLabelTTF.h" -#include "2d/CCLabelBMFont.h" -#include "2d/CCLabel.h" +#include "2d/CCDrawingPrimitives.h" #include "2d/CCFontFNT.h" +#include "2d/CCLabel.h" +#include "2d/CCLabelAtlas.h" +#include "2d/CCLabelBMFont.h" +#include "2d/CCLabelTTF.h" #include "2d/CCLayer.h" +#include "2d/CCMenu.h" +#include "2d/CCMenuItem.h" +#include "2d/CCMotionStreak.h" +#include "2d/CCNode.h" +#include "2d/CCNodeGrid.h" +#include "2d/CCParticleBatchNode.h" +#include "2d/CCParticleExamples.h" +#include "2d/CCParticleSystem.h" +#include "2d/CCParticleSystemQuad.h" +#include "2d/CCProgressTimer.h" +#include "2d/CCProtectedNode.h" +#include "2d/CCRenderTexture.h" #include "2d/CCScene.h" #include "2d/CCTransition.h" #include "2d/CCTransitionPageTurn.h" #include "2d/CCTransitionProgress.h" -#include "2d/CCMenu.h" -#include "2d/CCMenuItem.h" -#include "2d/CCClippingNode.h" -#include "2d/CCClippingRectangleNode.h" -#include "2d/CCMotionStreak.h" -#include "2d/CCProgressTimer.h" -#include "2d/CCRenderTexture.h" -#include "2d/CCNodeGrid.h" -#include "2d/CCParticleBatchNode.h" -#include "2d/CCParticleSystem.h" -#include "2d/CCParticleExamples.h" -#include "2d/CCParticleSystemQuad.h" // 2d utils +#include "2d/CCCamera.h" #include "2d/CCGrabber.h" #include "2d/CCGrid.h" - -#include "2d/CCCamera.h" #include "2d/CCLight.h" // include @@ -146,40 +147,45 @@ THE SOFTWARE. // renderer #include "renderer/CCCustomCommand.h" -#include "renderer/CCGroupCommand.h" -#include "renderer/CCQuadCommand.h" -#include "renderer/CCRenderCommand.h" -#include "renderer/CCRenderCommandPool.h" -#include "renderer/CCRenderer.h" #include "renderer/CCGLProgram.h" #include "renderer/CCGLProgramCache.h" #include "renderer/CCGLProgramState.h" -#include "renderer/ccGLStateCache.h" -#include "renderer/ccShaders.h" -#include "renderer/CCTexture2D.h" -#include "renderer/CCTextureCache.h" -#include "renderer/CCVertexIndexBuffer.h" -#include "renderer/CCVertexIndexData.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCMaterial.h" +#include "renderer/CCPass.h" #include "renderer/CCPrimitive.h" #include "renderer/CCPrimitiveCommand.h" +#include "renderer/CCQuadCommand.h" +#include "renderer/CCRenderCommand.h" +#include "renderer/CCRenderCommandPool.h" +#include "renderer/CCRenderState.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCTechnique.h" +#include "renderer/CCTexture2D.h" +#include "renderer/CCTextureCache.h" #include "renderer/CCTrianglesCommand.h" +#include "renderer/CCVertexAttribBinding.h" +#include "renderer/CCVertexIndexBuffer.h" +#include "renderer/CCVertexIndexData.h" +#include "renderer/ccGLStateCache.h" +#include "renderer/ccShaders.h" // physics #include "physics/CCPhysicsBody.h" #include "physics/CCPhysicsContact.h" -#include "physics/CCPhysicsShape.h" #include "physics/CCPhysicsJoint.h" +#include "physics/CCPhysicsShape.h" #include "physics/CCPhysicsWorld.h" // platform -#include "platform/CCDevice.h" #include "platform/CCCommon.h" +#include "platform/CCDevice.h" #include "platform/CCFileUtils.h" #include "platform/CCImage.h" -#include "platform/CCSAXParser.h" -#include "platform/CCThread.h" #include "platform/CCPlatformConfig.h" #include "platform/CCPlatformMacros.h" +#include "platform/CCSAXParser.h" +#include "platform/CCThread.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "platform/ios/CCApplication-ios.h" @@ -230,14 +236,6 @@ THE SOFTWARE. #include "platform/winrt/CCStdC.h" #endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - #include "platform/winrt/CCApplication.h" - #include "platform/wp8/CCGLViewImpl-wp8.h" - #include "platform/winrt/CCGL.h" - #include "platform/winrt/CCStdC.h" - #include "platform/winrt/CCPrecompiledShaders.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - // script_support #include "base/CCScriptSupport.h" @@ -262,8 +260,8 @@ THE SOFTWARE. #include "2d/CCTMXTiledMap.h" #include "2d/CCTMXXMLParser.h" #include "2d/CCTileMapAtlas.h" -#include "2d/CCFastTMXTiledMap.h" #include "2d/CCFastTMXLayer.h" +#include "2d/CCFastTMXTiledMap.h" // component #include "2d/CCComponent.h" @@ -271,34 +269,34 @@ THE SOFTWARE. //3d #include "3d/CCAABB.h" -#include "3d/CCOBB.h" -#include "3d/CCRay.h" -#include "3d/CCSprite3D.h" -#include "3d/CCMesh.h" -#include "3d/CCMeshSkin.h" #include "3d/CCAnimate3D.h" #include "3d/CCAnimation3D.h" -#include "3d/CCSprite3DMaterial.h" #include "3d/CCAttachNode.h" -#include "3d/CCMeshVertexIndexData.h" -#include "3d/CCSkeleton3D.h" #include "3d/CCBillBoard.h" #include "3d/CCFrustum.h" +#include "3d/CCMesh.h" +#include "3d/CCMeshSkin.h" +#include "3d/CCMeshVertexIndexData.h" +#include "3d/CCOBB.h" #include "3d/CCPlane.h" -#include "3d/CCTextureCube.h" +#include "3d/CCRay.h" +#include "3d/CCSkeleton3D.h" #include "3d/CCSkybox.h" +#include "3d/CCSprite3D.h" +#include "3d/CCSprite3DMaterial.h" #include "3d/CCTerrain.h" +#include "3d/CCTextureCube.h" // Deprecated include -#include "deprecated/CCDictionary.h" #include "deprecated/CCArray.h" -#include "deprecated/CCSet.h" -#include "deprecated/CCInteger.h" -#include "deprecated/CCFloat.h" -#include "deprecated/CCDouble.h" #include "deprecated/CCBool.h" -#include "deprecated/CCString.h" +#include "deprecated/CCDictionary.h" +#include "deprecated/CCDouble.h" +#include "deprecated/CCFloat.h" +#include "deprecated/CCInteger.h" #include "deprecated/CCNotificationCenter.h" +#include "deprecated/CCSet.h" +#include "deprecated/CCString.h" // CCDeprecated.h must be included at the end #include "deprecated/CCDeprecated.h" diff --git a/cocos/editor-support/cocosbuilder/CCBReader.h b/cocos/editor-support/cocosbuilder/CCBReader.h index d89b153c76..925fdfef94 100644 --- a/cocos/editor-support/cocosbuilder/CCBReader.h +++ b/cocos/editor-support/cocosbuilder/CCBReader.h @@ -131,11 +131,6 @@ public: MULTIPLY_RESOLUTION, }; -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 -#ifdef ABSOLUTE -#undef ABSOLUTE -#endif -#endif enum class SizeType { ABSOLUTE, diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp index e102894f8e..38cc6dc528 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp @@ -282,7 +282,7 @@ void SkewFrame::onEnter(Frame *nextFrame, int currentFrameIndex) void SkewFrame::onApply(float percent) { - if ((nullptr != _node && _betweenSkewX != 0) || _betweenSkewY != 0) + if ((nullptr != _node) && (_betweenSkewX != 0 || _betweenSkewY != 0)) { float skewx = _skewX + percent * _betweenSkewX; float skewy = _skewY + percent * _betweenSkewY; @@ -342,7 +342,7 @@ void RotationSkewFrame::onEnter(Frame *nextFrame, int currentFrameIndex) void RotationSkewFrame::onApply(float percent) { - if ((nullptr != _node && _betweenSkewX != 0) || _betweenSkewY != 0) + if ((nullptr != _node) && (_betweenSkewX != 0 || _betweenSkewY != 0)) { float skewx = _skewX + percent * _betweenSkewX; float skewy = _skewY + percent * _betweenSkewY; @@ -400,7 +400,7 @@ void PositionFrame::onEnter(Frame *nextFrame, int currentFrameIndex) void PositionFrame::onApply(float percent) { - if (nullptr != _node && (_betweenX != 0 || _betweenY != 0)) + if ((nullptr != _node) && (_betweenX != 0 || _betweenY != 0)) { Point p; p.x = _position.x + _betweenX * percent; @@ -460,7 +460,7 @@ void ScaleFrame::onEnter(Frame *nextFrame, int currentFrameIndex) void ScaleFrame::onApply(float percent) { - if ((nullptr != _node && _betweenScaleX != 0) || _betweenScaleY != 0) + if ((nullptr != _node) && (_betweenScaleX != 0 || _betweenScaleY != 0)) { float scaleX = _scaleX + _betweenScaleX * percent; float scaleY = _scaleY + _betweenScaleY * percent; @@ -682,7 +682,7 @@ void ColorFrame::onEnter(Frame *nextFrame, int currentFrameIndex) void ColorFrame::onApply(float percent) { - if ((nullptr != _node && _betweenRed != 0) || _betweenGreen != 0 || _betweenBlue != 0) + if ((nullptr != _node) && (_betweenRed != 0 || _betweenGreen != 0 || _betweenBlue != 0)) { Color3B color; color.r = _color.r+ _betweenRed * percent; diff --git a/cocos/editor-support/cocostudio/CCComAudio.cpp b/cocos/editor-support/cocostudio/CCComAudio.cpp index fccc541c87..f6412ef667 100644 --- a/cocos/editor-support/cocostudio/CCComAudio.cpp +++ b/cocos/editor-support/cocostudio/CCComAudio.cpp @@ -128,7 +128,7 @@ bool ComAudio::serialize(void* r) } if (strcmp(className, "CCBackgroundAudio") == 0) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) std::string::size_type pos = filePath.find(".mp3"); if (pos == filePath.npos) { diff --git a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj old mode 100755 new mode 100644 index fe1ae21064..3efce3e924 --- a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj +++ b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj @@ -83,21 +83,19 @@ StaticLibrary true - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp Unicode StaticLibrary false - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp true Unicode diff --git a/cocos/network/HttpRequest.h b/cocos/network/HttpRequest.h index 034e0e4037..b076bc9cbc 100644 --- a/cocos/network/HttpRequest.h +++ b/cocos/network/HttpRequest.h @@ -55,7 +55,7 @@ typedef void (cocos2d::Ref::*SEL_HttpResponse)(HttpClient* client, HttpResponse* * @lua NA */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #ifdef DELETE #undef DELETE #endif diff --git a/cocos/network/SocketIO.cpp b/cocos/network/SocketIO.cpp index 1b5f565bbf..2aa7754b38 100644 --- a/cocos/network/SocketIO.cpp +++ b/cocos/network/SocketIO.cpp @@ -28,12 +28,13 @@ ****************************************************************************/ #include "SocketIO.h" +#include +#include +#include #include "base/CCDirector.h" #include "base/CCScheduler.h" #include "WebSocket.h" #include "HttpClient.h" -#include -#include NS_CC_BEGIN diff --git a/cocos/physics3d/CCPhysics3D.cpp b/cocos/physics3d/CCPhysics3D.cpp new file mode 100644 index 0000000000..02018b2081 --- /dev/null +++ b/cocos/physics3d/CCPhysics3D.cpp @@ -0,0 +1,98 @@ +/**************************************************************************** + Copyright (c) 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 "CCPhysics3D.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + + + +NS_CC_BEGIN + +CC_DLL const char* physics3dVersion() +{ +#if CC_ENABLE_BULLET_INTEGRATION + return "bullet2.82"; +#endif +} + +NS_CC_END + + +cocos2d::Vec3 convertbtVector3ToVec3( const btVector3 &btVec3 ) +{ + return cocos2d::Vec3(btVec3.x(), btVec3.y(), btVec3.z()); +} + +btVector3 convertVec3TobtVector3( const cocos2d::Vec3 &vec3 ) +{ + return btVector3(vec3.x, vec3.y, vec3.z); +} + +cocos2d::Mat4 convertbtTransformToMat4( const btTransform &btTrans ) +{ + cocos2d::Mat4 mat; + auto rot = btTrans.getBasis(); + auto row = rot.getRow(0); + mat.m[0] = row.getX(); + mat.m[4] = row.getY(); + mat.m[8] = row.getZ(); + row = rot.getRow(1); + mat.m[1] = row.getX(); + mat.m[5] = row.getY(); + mat.m[9] = row.getZ(); + row = rot.getRow(2); + mat.m[2] = row.getX(); + mat.m[6] = row.getY(); + mat.m[10] = row.getZ(); + + row = btTrans.getOrigin(); + mat.m[12] = row.getX(); + mat.m[13] = row.getY(); + mat.m[14] = row.getZ(); + return mat; +} + +btTransform convertMat4TobtTransform( const cocos2d::Mat4 &mat4 ) +{ + btTransform btTrans; + btTrans.setFromOpenGLMatrix(mat4.m); + return btTrans; +} + +cocos2d::Quaternion convertbtQuatToQuat( const btQuaternion &btQuat ) +{ + return cocos2d::Quaternion(btQuat.x(), btQuat.y(), btQuat.z(), btQuat.w()); +} + +btQuaternion convertQuatTobtQuat( const cocos2d::Quaternion &quat ) +{ + return btQuaternion(quat.x, quat.y, quat.z, quat.w); +} + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif //CC_USE_3D_PHYSICS diff --git a/cocos/physics3d/CCPhysics3D.h b/cocos/physics3d/CCPhysics3D.h new file mode 100644 index 0000000000..7519ee8e70 --- /dev/null +++ b/cocos/physics3d/CCPhysics3D.h @@ -0,0 +1,69 @@ +/**************************************************************************** + Copyright (c) 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. + ****************************************************************************/ + +#ifndef __PHYSICS_3D_H__ +#define __PHYSICS_3D_H__ + +#include "base/ccConfig.h" +#include "math/CCMath.h" + +#if CC_USE_3D_PHYSICS + +#include "CCPhysics3DShape.h" +#include "CCPhysicsSprite3D.h" +#include "CCPhysics3DWorld.h" +#include "CCPhysics3DDebugDrawer.h" +#include "CCPhysics3DObject.h" +#include "CCPhysics3DComponent.h" +#include "CCPhysics3DConstraint.h" + +NS_CC_BEGIN + +CC_DLL const char* physics3dVersion(); + +NS_CC_END + +#if (CC_ENABLE_BULLET_INTEGRATION) + +//include bullet header files +#include "bullet/LinearMath/btTransform.h" +#include "bullet/LinearMath/btVector3.h" +#include "bullet/LinearMath/btQuaternion.h" + +#include "bullet/btBulletCollisionCommon.h" +#include "bullet/btBulletDynamicsCommon.h" + +//convert between cocos and bullet +cocos2d::Vec3 convertbtVector3ToVec3(const btVector3 &btVec3); +btVector3 convertVec3TobtVector3(const cocos2d::Vec3 &vec3); +cocos2d::Mat4 convertbtTransformToMat4(const btTransform &btTrans); +btTransform convertMat4TobtTransform(const cocos2d::Mat4 &mat4); +cocos2d::Quaternion convertbtQuatToQuat(const btQuaternion &btQuat); +btQuaternion convertQuatTobtQuat(const cocos2d::Quaternion &quat); + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif //CC_USE_3D_PHYSICS + +#endif // __PHYSICS_3D_H__ diff --git a/cocos/physics3d/CCPhysics3DComponent.cpp b/cocos/physics3d/CCPhysics3DComponent.cpp new file mode 100644 index 0000000000..c7bb88795f --- /dev/null +++ b/cocos/physics3d/CCPhysics3DComponent.cpp @@ -0,0 +1,244 @@ + /**************************************************************************** + Copyright (c) 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 "CCPhysics3D.h" +#include "2d/CCNode.h" +#include "2d/CCScene.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +NS_CC_BEGIN + +Physics3DComponent::~Physics3DComponent() +{ + CC_SAFE_RELEASE(_physics3DObj); +} + +std::string& Physics3DComponent::getPhysics3DComponentName() +{ + static std::string comName = "___Physics3DComponent___"; + return comName; +} + +bool Physics3DComponent::init() +{ + setName(getPhysics3DComponentName()); + return Component::init(); +} + +Physics3DComponent* Physics3DComponent::create(Physics3DObject* physicsObj, const cocos2d::Vec3& translateInPhysics, const cocos2d::Quaternion& rotInPhsyics) +{ + auto ret = new (std::nothrow) Physics3DComponent(); + if (ret && ret->init()) + { + ret->setPhysics3DObject(physicsObj); + ret->setTransformInPhysics(translateInPhysics, rotInPhsyics); + ret->autorelease(); + return ret; + } + CC_SAFE_DELETE(ret); + return nullptr; +} + +void Physics3DComponent::setPhysics3DObject(Physics3DObject* physicsObj) +{ + CC_SAFE_RETAIN(physicsObj); + CC_SAFE_RELEASE(_physics3DObj); + _physics3DObj = physicsObj; +} + +Physics3DComponent::Physics3DComponent() +: _physics3DObj(nullptr) +, _syncFlag(Physics3DComponent::PhysicsSyncFlag::NODE_AND_NODE) +{ + +} + +void Physics3DComponent::setEnabled(bool b) +{ + bool oldBool = b; + Component::setEnabled(b); + if (_physics3DObj && oldBool != _enabled) + { + _enabled ? _physics3DObj->getPhysicsWorld()->addPhysics3DObject(_physics3DObj) : _physics3DObj->getPhysicsWorld()->removePhysics3DObject(_physics3DObj); + } +} + +void Physics3DComponent::addToPhysicsWorld(Physics3DWorld* world) +{ + //add component to physics world + if (_physics3DObj) + { + _physics3DObj->setPhysicsWorld(world); + world->addPhysics3DObject(_physics3DObj); + auto& components = world->_physicsComponents; + auto it = std::find(components.begin(), components.end(), this); + if (it == components.end()) + { + auto parent = _owner->getParent(); + while (parent) { + for (int i = 0; i < components.size(); i++) { + if (parent == components[i]->getOwner()) + { + //insert it here + components.insert(components.begin() + i, this); + return; + } + } + parent = parent->getParent(); + } + + components.insert(components.begin(), this); + } + } +} + +void Physics3DComponent::onEnter() +{ + Component::onEnter(); + + if (_physics3DObj->getPhysicsWorld() == nullptr && _owner) + { + auto scene = _owner->getScene(); + if (scene) + addToPhysicsWorld(scene->getPhysics3DWorld()); + } +} + +void Physics3DComponent::onExit() +{ + Component::onExit(); + setEnabled(false); + + //remove component from physics world + if (_physics3DObj) + { + auto& components = _physics3DObj->getPhysicsWorld()->_physicsComponents; + auto it = std::find(components.begin(), components.end(), this); + if (it != components.end()) + components.erase(it); + } +} + +void Physics3DComponent::preSimulate() +{ + if (((int)_syncFlag & (int)Physics3DComponent::PhysicsSyncFlag::NODE_TO_PHYSICS) && _physics3DObj && _owner) + { + syncToNode(); + } +} + +void Physics3DComponent::postSimulate() +{ + if (((int)_syncFlag & (int)Physics3DComponent::PhysicsSyncFlag::PHYSICS_TO_NODE) && _physics3DObj && _owner) + { + syncToPhysics(); + } +} + +void Physics3DComponent::setTransformInPhysics(const cocos2d::Vec3& translateInPhysics, const cocos2d::Quaternion& rotInPhsyics) +{ + Mat4::createRotation(rotInPhsyics, &_transformInPhysics); + _transformInPhysics.m[12] = translateInPhysics.x; + _transformInPhysics.m[13] = translateInPhysics.y; + _transformInPhysics.m[14] = translateInPhysics.z; + + _invTransformInPhysics = _transformInPhysics.getInversed(); +} + +void Physics3DComponent::setSyncFlag(PhysicsSyncFlag syncFlag) +{ + _syncFlag = syncFlag; +} + +void Physics3DComponent::syncToPhysics() +{ + if (_physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY) + { + Mat4 parentMat; + if (_owner->getParent()) + parentMat = _owner->getParent()->getNodeToWorldTransform(); + + auto mat = parentMat.getInversed() * _physics3DObj->getWorldTransform(); + //remove scale, no scale support for physics + float oneOverLen = 1.f / sqrtf(mat.m[0] * mat.m[0] + mat.m[1] * mat.m[1] + mat.m[2] * mat.m[2]); + mat.m[0] *= oneOverLen; + mat.m[1] *= oneOverLen; + mat.m[2] *= oneOverLen; + oneOverLen = 1.f / sqrtf(mat.m[4] * mat.m[4] + mat.m[5] * mat.m[5] + mat.m[6] * mat.m[6]); + mat.m[4] *= oneOverLen; + mat.m[5] *= oneOverLen; + mat.m[6] *= oneOverLen; + oneOverLen = 1.f / sqrtf(mat.m[8] * mat.m[8] + mat.m[9] * mat.m[9] + mat.m[10] * mat.m[10]); + mat.m[8] *= oneOverLen; + mat.m[9] *= oneOverLen; + mat.m[10] *= oneOverLen; + + mat *= _transformInPhysics; + static Vec3 scale, translation; + static Quaternion quat; + mat.decompose(&scale, &quat, &translation); + _owner->setPosition3D(translation); + quat.normalize(); + _owner->setRotationQuat(quat); + } +} + +void Physics3DComponent::syncToNode() +{ + if (_physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY) + { + auto mat = _owner->getNodeToWorldTransform(); + //remove scale, no scale support for physics + float oneOverLen = 1.f / sqrtf(mat.m[0] * mat.m[0] + mat.m[1] * mat.m[1] + mat.m[2] * mat.m[2]); + mat.m[0] *= oneOverLen; + mat.m[1] *= oneOverLen; + mat.m[2] *= oneOverLen; + oneOverLen = 1.f / sqrtf(mat.m[4] * mat.m[4] + mat.m[5] * mat.m[5] + mat.m[6] * mat.m[6]); + mat.m[4] *= oneOverLen; + mat.m[5] *= oneOverLen; + mat.m[6] *= oneOverLen; + oneOverLen = 1.f / sqrtf(mat.m[8] * mat.m[8] + mat.m[9] * mat.m[9] + mat.m[10] * mat.m[10]); + mat.m[8] *= oneOverLen; + mat.m[9] *= oneOverLen; + mat.m[10] *= oneOverLen; + + mat *= _invTransformInPhysics; + if (_physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY) + { + auto body = static_cast(_physics3DObj)->getRigidBody(); + auto motionState = body->getMotionState(); + motionState->setWorldTransform(convertMat4TobtTransform(mat)); + body->setMotionState(motionState); + } + } +} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif //CC_USE_3D_PHYSICS diff --git a/cocos/physics3d/CCPhysics3DComponent.h b/cocos/physics3d/CCPhysics3DComponent.h new file mode 100644 index 0000000000..1c036c8225 --- /dev/null +++ b/cocos/physics3d/CCPhysics3DComponent.h @@ -0,0 +1,145 @@ +/**************************************************************************** + Copyright (c) 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. + ****************************************************************************/ + +#ifndef __PHYSICS_3D_COMPONENT_H__ +#define __PHYSICS_3D_COMPONENT_H__ + +#include "base/ccConfig.h" +#include "math/CCMath.h" + +#include "2d/CCComponent.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +NS_CC_BEGIN + +/** + * @addtogroup _3d + * @{ + */ + +class Physics3DObject; +class Physics3DWorld; + +/** @brief Physics3DComponent: A component with 3D physics, you can add a rigid body to it, and then add this component to a node, the node will move and rotate with this rigid body */ +class CC_DLL Physics3DComponent : public cocos2d::Component +{ + friend class Physics3DWorld; +public: + enum class 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 = NODE_TO_PHYSICS | PHYSICS_TO_NODE, //pre simulation, align the physics object to the node and align the node transform according to physics object after simulation + }; + + CREATE_FUNC(Physics3DComponent); + virtual ~Physics3DComponent(); + virtual bool init() override; + + /** + * create Physics3DComponent + * @param physicsObj pointer to a Physics object contain in the component + * @param translateInPhysics offset that the owner node in the physics object's space + * @param rotInPhsyics offset rotation that the owner node in the physics object's space + * @return created Physics3DComponent + */ + static Physics3DComponent* create(Physics3DObject* physicsObj, const cocos2d::Vec3& translateInPhysics = cocos2d::Vec3::ZERO, const cocos2d::Quaternion& rotInPhsyics = cocos2d::Quaternion::ZERO); + + /** + * set Physics object to the component + */ + void setPhysics3DObject(Physics3DObject* physicsObj); + + /** + * get physics object + */ + Physics3DObject* getPhysics3DObject() const { return _physics3DObj; } + + /** + * get the component name, it is used to find whether it is Physics3DComponent + */ + static std::string& getPhysics3DComponentName(); + + /** + * set it enable or not + */ + virtual void setEnabled(bool b) override; + + + virtual void onEnter() override; + virtual void onExit() override; + + /** + * add this component to physics world, called by scene + */ + void addToPhysicsWorld(Physics3DWorld* world); + + /** + * The node's transform in physics object space + */ + void setTransformInPhysics(const cocos2d::Vec3& translateInPhysics, const cocos2d::Quaternion& rotInPhsyics); + + /** + * synchronization between node and physics is time consuming, you can skip some synchronization using this function + */ + void setSyncFlag(PhysicsSyncFlag syncFlag); + + /** + * align node and physics according to physics object + */ + void syncToPhysics(); + + /** + * align node and physics according to node + */ + void syncToNode(); + +CC_CONSTRUCTOR_ACCESS: + Physics3DComponent(); + +protected: + void preSimulate(); + + void postSimulate(); + + cocos2d::Mat4 _transformInPhysics; //transform in physics space + cocos2d::Mat4 _invTransformInPhysics; + + Physics3DObject* _physics3DObj; + PhysicsSyncFlag _syncFlag; +}; + +// end of 3d group +/// @} +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif //CC_USE_3D_PHYSICS + +#endif // __PHYSICS_3D_COMPONENT_H__ diff --git a/cocos/physics3d/CCPhysics3DConstraint.cpp b/cocos/physics3d/CCPhysics3DConstraint.cpp new file mode 100644 index 0000000000..dc59d370b4 --- /dev/null +++ b/cocos/physics3d/CCPhysics3DConstraint.cpp @@ -0,0 +1,840 @@ +/**************************************************************************** + Copyright (c) 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 "CCPhysics3D.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +NS_CC_BEGIN + +Physics3DConstraint::Physics3DConstraint() +: _bodyA(nullptr) +, _bodyB(nullptr) +, _constraint(nullptr) +, _type(Physics3DConstraint::ConstraintType::UNKNOWN) +, _userData(nullptr) +{ + +} + +Physics3DConstraint::~Physics3DConstraint() +{ + CC_SAFE_RELEASE(_bodyA); + CC_SAFE_RELEASE(_bodyB); + CC_SAFE_DELETE(_constraint); +} + +float Physics3DConstraint::getBreakingImpulse() const +{ + return _constraint->getBreakingImpulseThreshold(); +} + +void Physics3DConstraint::setBreakingImpulse(float impulse) +{ + _constraint->setBreakingImpulseThreshold(impulse); +} + +bool Physics3DConstraint::isEnabled() const +{ + return _constraint->isEnabled(); +} + +void Physics3DConstraint::setEnabled(bool enabled) +{ + return _constraint->setEnabled(enabled); +} + +int Physics3DConstraint::getOverrideNumSolverIterations() const +{ + return _constraint->getOverrideNumSolverIterations(); +} + +///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 +void Physics3DConstraint::setOverrideNumSolverIterations(int overideNumIterations) +{ + _constraint->setOverrideNumSolverIterations(overideNumIterations); +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +Physics3DPointToPointConstraint* Physics3DPointToPointConstraint::create(Physics3DRigidBody* rbA, const cocos2d::Vec3& pivotPointInA) +{ + auto ret = new (std::nothrow) Physics3DPointToPointConstraint(); + if (ret && ret->init(rbA, pivotPointInA)) + { + ret->autorelease(); + return ret; + } + + CC_SAFE_DELETE(ret); + return ret; +} + + +Physics3DPointToPointConstraint* Physics3DPointToPointConstraint::create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Vec3& pivotPointInA, const cocos2d::Vec3& pivotPointInB) +{ + auto ret = new (std::nothrow) Physics3DPointToPointConstraint(); + if (ret && ret->init(rbA, rbB, pivotPointInA, pivotPointInB)) + { + ret->autorelease(); + return ret; + } + + CC_SAFE_DELETE(ret); + return ret; +} + +bool Physics3DPointToPointConstraint::init(Physics3DRigidBody* rbA, const cocos2d::Vec3& pivotPointInA) +{ + + _constraint = new btPoint2PointConstraint(*rbA->getRigidBody(), convertVec3TobtVector3(pivotPointInA)); + _bodyA = rbA; + _bodyA->retain(); + + return true; +} + +bool Physics3DPointToPointConstraint::init(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Vec3& pivotPointInA, const cocos2d::Vec3& pivotPointInB) +{ + _constraint = new btPoint2PointConstraint(*rbA->getRigidBody(), *rbB->getRigidBody(), convertVec3TobtVector3(pivotPointInA), convertVec3TobtVector3(pivotPointInB)); + _bodyA = rbA; + _bodyB = rbB; + _bodyA->retain(); + _bodyB->retain(); + + return true; +} + +void Physics3DPointToPointConstraint::setPivotPointInA(const cocos2d::Vec3& pivotA) +{ + auto point = convertVec3TobtVector3(pivotA); + static_cast(_constraint)->setPivotA(point); +} + +void Physics3DPointToPointConstraint::setPivotPointInB(const cocos2d::Vec3& pivotB) +{ + auto point = convertVec3TobtVector3(pivotB); + static_cast(_constraint)->setPivotB(point); +} + +cocos2d::Vec3 Physics3DPointToPointConstraint::getPivotPointInA() const +{ + const auto& point = static_cast(_constraint)->getPivotInA(); + return convertbtVector3ToVec3(point); +} + +cocos2d::Vec3 Physics3DPointToPointConstraint::getPivotPointInB() const +{ + const auto& point = static_cast(_constraint)->getPivotInB(); + return convertbtVector3ToVec3(point); +} + +Physics3DPointToPointConstraint::Physics3DPointToPointConstraint() +{ + _type = Physics3DConstraint::ConstraintType::POINT_TO_POINT; +} + +Physics3DPointToPointConstraint::~Physics3DPointToPointConstraint() +{ + +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +Physics3DHingeConstraint* Physics3DHingeConstraint::create(Physics3DRigidBody* rbA, const cocos2d::Mat4& rbAFrame, bool useReferenceFrameA) +{ + auto ret = new (std::nothrow) Physics3DHingeConstraint(); + ret->_constraint = new btHingeConstraint(*rbA->getRigidBody(), convertMat4TobtTransform(rbAFrame), useReferenceFrameA); + ret->_bodyA = rbA; + rbA->retain(); + + ret->autorelease(); + return ret; +} + +Physics3DHingeConstraint* Physics3DHingeConstraint::create(Physics3DRigidBody* rbA, const cocos2d::Vec3& pivotInA, const cocos2d::Vec3& axisInA, bool useReferenceFrameA) +{ + auto ret = new (std::nothrow) Physics3DHingeConstraint(); + ret->_constraint = new btHingeConstraint(*rbA->getRigidBody(), convertVec3TobtVector3(pivotInA), convertVec3TobtVector3(axisInA), useReferenceFrameA); + ret->_bodyA = rbA; + rbA->retain(); + + ret->autorelease(); + return ret; +} + +Physics3DHingeConstraint* Physics3DHingeConstraint::create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Vec3& pivotInA,const cocos2d::Vec3& pivotInB, cocos2d::Vec3& axisInA, cocos2d::Vec3& axisInB, bool useReferenceFrameA) +{ + auto ret = new (std::nothrow) Physics3DHingeConstraint(); + ret->_constraint = new btHingeConstraint(*rbA->getRigidBody(), *rbB->getRigidBody(), convertVec3TobtVector3(pivotInA), convertVec3TobtVector3(pivotInB), convertVec3TobtVector3(axisInA), convertVec3TobtVector3(axisInB), useReferenceFrameA); + ret->_bodyA = rbA; + rbA->retain(); + ret->_bodyB = rbB; + rbB->retain(); + + ret->autorelease(); + return ret; +} + +Physics3DHingeConstraint* Physics3DHingeConstraint::create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Mat4& rbAFrame, const cocos2d::Mat4& rbBFrame, bool useReferenceFrameA) +{ + auto ret = new (std::nothrow) Physics3DHingeConstraint(); + ret->_constraint = new btHingeConstraint(*rbA->getRigidBody(), *rbB->getRigidBody(), convertMat4TobtTransform(rbAFrame), convertMat4TobtTransform(rbBFrame), useReferenceFrameA); + ret->_bodyA = rbA; + rbA->retain(); + ret->_bodyB = rbB; + rbB->retain(); + + ret->autorelease(); + return ret; +} + +cocos2d::Mat4 Physics3DHingeConstraint::getFrameOffsetA() const +{ + const auto& transform = static_cast(_constraint)->getFrameOffsetA(); + return convertbtTransformToMat4(transform); +} + +cocos2d::Mat4 Physics3DHingeConstraint::getFrameOffsetB() const +{ + const auto& transform = static_cast(_constraint)->getFrameOffsetB(); + return convertbtTransformToMat4(transform); +} + +void Physics3DHingeConstraint::setFrames(const cocos2d::Mat4& frameA, const cocos2d::Mat4& frameB) +{ + auto transformA = convertMat4TobtTransform(frameA); + auto transformB = convertMat4TobtTransform(frameB); + static_cast(_constraint)->setFrames(transformA, transformB); +} + +void Physics3DHingeConstraint::setAngularOnly(bool angularOnly) +{ + static_cast(_constraint)->setAngularOnly(angularOnly); +} + +void Physics3DHingeConstraint::enableAngularMotor(bool enableMotor, float targetVelocity, float maxMotorImpulse) +{ + static_cast(_constraint)->enableAngularMotor(enableMotor, targetVelocity, maxMotorImpulse); +} + +void Physics3DHingeConstraint::enableMotor(bool enableMotor) +{ + static_cast(_constraint)->enableMotor(enableMotor); +} +void Physics3DHingeConstraint::setMaxMotorImpulse(float maxMotorImpulse) +{ + static_cast(_constraint)->setMaxMotorImpulse(maxMotorImpulse); +} +void Physics3DHingeConstraint::setMotorTarget(const cocos2d::Quaternion& qAinB, float dt) +{ + static_cast(_constraint)->setMotorTarget(convertQuatTobtQuat(qAinB), dt); +} +void Physics3DHingeConstraint::setMotorTarget(float targetAngle, float dt) +{ + static_cast(_constraint)->setMotorTarget(targetAngle, dt); +} + + +void Physics3DHingeConstraint::setLimit(float low, float high, float softness, float biasFactor, float relaxationFactor) +{ + static_cast(_constraint)->setLimit(low, high, softness, biasFactor, relaxationFactor); +} + +void Physics3DHingeConstraint::setAxis(const cocos2d::Vec3& axisInA) +{ + auto axis = convertVec3TobtVector3(axisInA); + static_cast(_constraint)->setAxis(axis); +} + +float Physics3DHingeConstraint::getLowerLimit() const +{ + return static_cast(_constraint)->getLowerLimit(); +} + +float Physics3DHingeConstraint::getUpperLimit() const +{ + return static_cast(_constraint)->getUpperLimit(); +} + +float Physics3DHingeConstraint::getHingeAngle() const +{ + return static_cast(_constraint)->getHingeAngle(); +} + +float Physics3DHingeConstraint::getHingeAngle(const cocos2d::Mat4& transA, const cocos2d::Mat4& transB) +{ + auto btTransA = convertMat4TobtTransform(transA); + auto btTransB = convertMat4TobtTransform(transB); + return static_cast(_constraint)->getHingeAngle(btTransA, btTransB); +} + +cocos2d::Mat4 Physics3DHingeConstraint::getAFrame() const +{ + const auto& trans = static_cast(_constraint)->getAFrame(); + return convertbtTransformToMat4(trans); +} +cocos2d::Mat4 Physics3DHingeConstraint::getBFrame() const +{ + const auto& trans = static_cast(_constraint)->getBFrame(); + return convertbtTransformToMat4(trans); +} + +bool Physics3DHingeConstraint::getAngularOnly() const +{ + return static_cast(_constraint)->getAngularOnly(); +} +bool Physics3DHingeConstraint::getEnableAngularMotor() const +{ + return static_cast(_constraint)->getEnableAngularMotor(); +} +float Physics3DHingeConstraint::getMotorTargetVelosity() const +{ + return static_cast(_constraint)->getMotorTargetVelosity(); +} +float Physics3DHingeConstraint::getMaxMotorImpulse() const +{ + return static_cast(_constraint)->getMaxMotorImpulse(); +} + +bool Physics3DHingeConstraint::getUseFrameOffset() const +{ + return static_cast(_constraint)->getUseFrameOffset(); +} +void Physics3DHingeConstraint::setUseFrameOffset(bool frameOffsetOnOff) +{ + static_cast(_constraint)->setUseFrameOffset(frameOffsetOnOff); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +Physics3DSliderConstraint* Physics3DSliderConstraint::create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Mat4& frameInA, const cocos2d::Mat4& frameInB ,bool useLinearReferenceFrameA) +{ + auto ret = new (std::nothrow) Physics3DSliderConstraint(); + ret->_bodyA = rbA; + ret->_bodyB = rbB; + rbA->retain(); + rbB->retain(); + + auto transformA = convertMat4TobtTransform(frameInA); + auto transformB = convertMat4TobtTransform(frameInB); + ret->_constraint = new btSliderConstraint(*rbA->getRigidBody(), *rbB->getRigidBody(), transformA, transformB, useLinearReferenceFrameA); + ret->autorelease(); + return ret; +} + +cocos2d::Mat4 Physics3DSliderConstraint::getFrameOffsetA() const +{ + const auto& frameOff = static_cast(_constraint)->getFrameOffsetA(); + return convertbtTransformToMat4(frameOff); +} +cocos2d::Mat4 Physics3DSliderConstraint::getFrameOffsetB() const +{ + const auto& frameOff = static_cast(_constraint)->getFrameOffsetB(); + return convertbtTransformToMat4(frameOff); +} +float Physics3DSliderConstraint::getLowerLinLimit() const +{ + return static_cast(_constraint)->getLowerLinLimit(); +} +void Physics3DSliderConstraint::setLowerLinLimit(float lowerLimit) +{ + static_cast(_constraint)->setLowerLinLimit(lowerLimit); +} +float Physics3DSliderConstraint::getUpperLinLimit() const +{ + return static_cast(_constraint)->getUpperLinLimit(); +} +void Physics3DSliderConstraint::setUpperLinLimit(float upperLimit) +{ + static_cast(_constraint)->setUpperLinLimit(upperLimit); +} +float Physics3DSliderConstraint::getLowerAngLimit() const +{ + return static_cast(_constraint)->getLowerAngLimit(); +} +void Physics3DSliderConstraint::setLowerAngLimit(float lowerLimit) +{ + static_cast(_constraint)->setLowerAngLimit(lowerLimit); +} +float Physics3DSliderConstraint::getUpperAngLimit() const +{ + return static_cast(_constraint)->getUpperAngLimit(); +} +void Physics3DSliderConstraint::setUpperAngLimit(float upperLimit) +{ + static_cast(_constraint)->setUpperAngLimit(upperLimit); +} +bool Physics3DSliderConstraint::getUseLinearReferenceFrameA() const +{ + return static_cast(_constraint)->getUseLinearReferenceFrameA(); +} +float Physics3DSliderConstraint::getSoftnessDirLin() const +{ + return static_cast(_constraint)->getSoftnessDirLin(); +} +float Physics3DSliderConstraint::getRestitutionDirLin() const +{ + return static_cast(_constraint)->getRestitutionDirLin(); +} +float Physics3DSliderConstraint::getDampingDirLin() const +{ + return static_cast(_constraint)->getDampingDirLin(); +} +float Physics3DSliderConstraint::getSoftnessDirAng() const +{ + return static_cast(_constraint)->getSoftnessDirAng(); +} +float Physics3DSliderConstraint::getRestitutionDirAng() const +{ + return static_cast(_constraint)->getRestitutionDirAng(); +} +float Physics3DSliderConstraint::getDampingDirAng() const +{ + return static_cast(_constraint)->getDampingDirAng(); +} +float Physics3DSliderConstraint::getSoftnessLimLin() const +{ + return static_cast(_constraint)->getSoftnessLimLin(); +} +float Physics3DSliderConstraint::getRestitutionLimLin() const +{ + return static_cast(_constraint)->getRestitutionLimLin(); +} +float Physics3DSliderConstraint::getDampingLimLin() const +{ + return static_cast(_constraint)->getDampingLimAng(); +} +float Physics3DSliderConstraint::getSoftnessLimAng() const +{ + return static_cast(_constraint)->getSoftnessLimAng(); +} +float Physics3DSliderConstraint::getRestitutionLimAng() const +{ + return static_cast(_constraint)->getRestitutionLimAng(); +} +float Physics3DSliderConstraint::getDampingLimAng() const +{ + return static_cast(_constraint)->getDampingLimAng(); +} +float Physics3DSliderConstraint::getSoftnessOrthoLin() const +{ + return static_cast(_constraint)->getSoftnessOrthoLin(); +} +float Physics3DSliderConstraint::getRestitutionOrthoLin() const +{ + return static_cast(_constraint)->getRestitutionOrthoAng(); +} +float Physics3DSliderConstraint::getDampingOrthoLin() const +{ + return static_cast(_constraint)->getDampingOrthoLin(); +} +float Physics3DSliderConstraint::getSoftnessOrthoAng() const +{ + return static_cast(_constraint)->getSoftnessOrthoAng(); +} +float Physics3DSliderConstraint::getRestitutionOrthoAng() const +{ + return static_cast(_constraint)->getRestitutionOrthoAng(); +} +float Physics3DSliderConstraint::getDampingOrthoAng() const +{ + return static_cast(_constraint)->getDampingOrthoAng(); +} +void Physics3DSliderConstraint::setSoftnessDirLin(float softnessDirLin) +{ + static_cast(_constraint)->setSoftnessDirLin(softnessDirLin); +} +void Physics3DSliderConstraint::setRestitutionDirLin(float restitutionDirLin) +{ + static_cast(_constraint)->setRestitutionDirLin(restitutionDirLin); +} +void Physics3DSliderConstraint::setDampingDirLin(float dampingDirLin) +{ + static_cast(_constraint)->setDampingDirLin(dampingDirLin); +} +void Physics3DSliderConstraint::setSoftnessDirAng(float softnessDirAng) +{ + static_cast(_constraint)->setSoftnessDirAng(softnessDirAng); +} +void Physics3DSliderConstraint::setRestitutionDirAng(float restitutionDirAng) +{ + static_cast(_constraint)->setRestitutionDirAng(restitutionDirAng); +} +void Physics3DSliderConstraint::setDampingDirAng(float dampingDirAng) +{ + static_cast(_constraint)->setDampingDirAng(dampingDirAng); +} +void Physics3DSliderConstraint::setSoftnessLimLin(float softnessLimLin) +{ + static_cast(_constraint)->setSoftnessLimLin(softnessLimLin); +} +void Physics3DSliderConstraint::setRestitutionLimLin(float restitutionLimLin) +{ + static_cast(_constraint)->setRestitutionDirLin(restitutionLimLin); +} +void Physics3DSliderConstraint::setDampingLimLin(float dampingLimLin) +{ + static_cast(_constraint)->setDampingLimLin(dampingLimLin); +} +void Physics3DSliderConstraint::setSoftnessLimAng(float softnessLimAng) +{ + static_cast(_constraint)->setSoftnessLimAng(softnessLimAng); +} +void Physics3DSliderConstraint::setRestitutionLimAng(float restitutionLimAng) +{ + static_cast(_constraint)->setRestitutionLimAng(restitutionLimAng); +} +void Physics3DSliderConstraint::setDampingLimAng(float dampingLimAng) +{ + static_cast(_constraint)->setDampingLimAng(dampingLimAng); +} +void Physics3DSliderConstraint::setSoftnessOrthoLin(float softnessOrthoLin) +{ + static_cast(_constraint)->setSoftnessOrthoLin(softnessOrthoLin); +} +void Physics3DSliderConstraint::setRestitutionOrthoLin(float restitutionOrthoLin) +{ + static_cast(_constraint)->setRestitutionOrthoLin(restitutionOrthoLin); +} +void Physics3DSliderConstraint::setDampingOrthoLin(float dampingOrthoLin) +{ + static_cast(_constraint)->setDampingLimLin(dampingOrthoLin); +} +void Physics3DSliderConstraint::setSoftnessOrthoAng(float softnessOrthoAng) +{ + static_cast(_constraint)->setSoftnessOrthoAng(softnessOrthoAng); +} +void Physics3DSliderConstraint::setRestitutionOrthoAng(float restitutionOrthoAng) +{ + static_cast(_constraint)->setRestitutionOrthoAng(restitutionOrthoAng); +} +void Physics3DSliderConstraint::setDampingOrthoAng(float dampingOrthoAng) +{ + static_cast(_constraint)->setDampingOrthoAng(dampingOrthoAng); +} +void Physics3DSliderConstraint::setPoweredLinMotor(bool onOff) +{ + static_cast(_constraint)->setPoweredLinMotor(onOff); +} +bool Physics3DSliderConstraint::getPoweredLinMotor() const +{ + return static_cast(_constraint)->getPoweredLinMotor(); +} +void Physics3DSliderConstraint::setTargetLinMotorVelocity(float targetLinMotorVelocity) +{ + static_cast(_constraint)->setTargetLinMotorVelocity(targetLinMotorVelocity); +} +float Physics3DSliderConstraint::getTargetLinMotorVelocity() const +{ + return static_cast(_constraint)->getTargetLinMotorVelocity(); +} +void Physics3DSliderConstraint::setMaxLinMotorForce(float maxLinMotorForce) +{ + static_cast(_constraint)->setMaxLinMotorForce(maxLinMotorForce); +} +float Physics3DSliderConstraint::getMaxLinMotorForce() const +{ + return static_cast(_constraint)->getMaxLinMotorForce(); +} +void Physics3DSliderConstraint::setPoweredAngMotor(bool onOff) +{ + static_cast(_constraint)->setPoweredAngMotor(onOff); +} +bool Physics3DSliderConstraint::getPoweredAngMotor() const +{ + return static_cast(_constraint)->getPoweredAngMotor(); +} +void Physics3DSliderConstraint::setTargetAngMotorVelocity(float targetAngMotorVelocity) +{ + return static_cast(_constraint)->setTargetAngMotorVelocity(targetAngMotorVelocity); +} +float Physics3DSliderConstraint::getTargetAngMotorVelocity() const +{ + return static_cast(_constraint)->getTargetAngMotorVelocity(); +} +void Physics3DSliderConstraint::setMaxAngMotorForce(float maxAngMotorForce) +{ + return static_cast(_constraint)->setMaxAngMotorForce(maxAngMotorForce); +} +float Physics3DSliderConstraint::getMaxAngMotorForce() const +{ + return static_cast(_constraint)->getMaxAngMotorForce(); +} + +float Physics3DSliderConstraint::getLinearPos() const +{ + return static_cast(_constraint)->getLinearPos(); +} +float Physics3DSliderConstraint::getAngularPos() const +{ + return static_cast(_constraint)->getAngularPos(); +} + +// access for UseFrameOffset +bool Physics3DSliderConstraint::getUseFrameOffset() const +{ + return static_cast(_constraint)->getUseFrameOffset(); +} +void Physics3DSliderConstraint::setUseFrameOffset(bool frameOffsetOnOff) +{ + static_cast(_constraint)->setUseFrameOffset(frameOffsetOnOff); +} + +void Physics3DSliderConstraint::setFrames(const cocos2d::Mat4& frameA, const cocos2d::Mat4& frameB) +{ + auto btFrameA = convertMat4TobtTransform(frameA); + auto btFrameB = convertMat4TobtTransform(frameB); + static_cast(_constraint)->setFrames(btFrameA, btFrameB); +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +Physics3DConeTwistConstraint* Physics3DConeTwistConstraint::create(Physics3DRigidBody* rbA, const cocos2d::Mat4& frameA) +{ + auto ret = new (std::nothrow) Physics3DConeTwistConstraint(); + ret->_bodyA = rbA; + rbA->retain(); + + auto btFrame = convertMat4TobtTransform(frameA); + ret->_constraint = new btConeTwistConstraint(*rbA->getRigidBody(), btFrame); + + ret->autorelease(); + return ret; +} +Physics3DConeTwistConstraint* Physics3DConeTwistConstraint::create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Mat4& frameA, const cocos2d::Mat4& frameB) +{ + auto ret = new (std::nothrow) Physics3DConeTwistConstraint(); + ret->_bodyA = rbA; + ret->_bodyB = rbB; + rbA->retain(); + rbB->retain(); + + auto btFrameA = convertMat4TobtTransform(frameA); + auto btFrameB = convertMat4TobtTransform(frameB); + + ret->_constraint = new btConeTwistConstraint(*rbA->getRigidBody(), *rbB->getRigidBody(), btFrameA, btFrameB); + + ret->autorelease(); + return ret; +} + +void Physics3DConeTwistConstraint::setLimit(float swingSpan1,float swingSpan2,float twistSpan, float softness, float biasFactor, float relaxationFactor) +{ + static_cast(_constraint)->setLimit(swingSpan1, swingSpan2, twistSpan, softness, biasFactor, relaxationFactor); +} + +cocos2d::Mat4 Physics3DConeTwistConstraint::getAFrame() const +{ + const auto& frame = static_cast(_constraint)->getAFrame(); + return convertbtTransformToMat4(frame); +} +cocos2d::Mat4 Physics3DConeTwistConstraint::getBFrame() const +{ + const auto& frame = static_cast(_constraint)->getBFrame(); + return convertbtTransformToMat4(frame); +} + +float Physics3DConeTwistConstraint::getSwingSpan1() const +{ + return static_cast(_constraint)->getSwingSpan1(); +} +float Physics3DConeTwistConstraint::getSwingSpan2() const +{ + return static_cast(_constraint)->getSwingSpan2(); +} +float Physics3DConeTwistConstraint::getTwistSpan() const +{ + return static_cast(_constraint)->getTwistSpan(); +} +float Physics3DConeTwistConstraint::getTwistAngle() const +{ + return static_cast(_constraint)->getTwistAngle(); +} + +void Physics3DConeTwistConstraint::setDamping(float damping) +{ + static_cast(_constraint)->setDamping(damping); +} + +void Physics3DConeTwistConstraint::enableMotor(bool b) +{ + static_cast(_constraint)->enableMotor(b); +} +void Physics3DConeTwistConstraint::setMaxMotorImpulse(float maxMotorImpulse) +{ + static_cast(_constraint)->setMaxMotorImpulse(maxMotorImpulse); +} +void Physics3DConeTwistConstraint::setMaxMotorImpulseNormalized(float maxMotorImpulse) +{ + static_cast(_constraint)->setMaxMotorImpulseNormalized(maxMotorImpulse); +} + +float Physics3DConeTwistConstraint::getFixThresh() const +{ + return static_cast(_constraint)->getFixThresh(); +} +void Physics3DConeTwistConstraint::setFixThresh(float fixThresh) +{ + static_cast(_constraint)->setFixThresh(fixThresh); +} + +void Physics3DConeTwistConstraint::setMotorTarget(const btQuaternion &q) +{ + static_cast(_constraint)->setMotorTarget(q); +} + +// same as above, but q is the desired rotation of frameA wrt frameB in constraint space +void Physics3DConeTwistConstraint::setMotorTargetInConstraintSpace(const btQuaternion &q) +{ + static_cast(_constraint)->setMotorTargetInConstraintSpace(q); +} + +cocos2d::Vec3 Physics3DConeTwistConstraint::GetPointForAngle(float fAngleInRadians, float fLength) const +{ + const auto& point = static_cast(_constraint)->GetPointForAngle(fAngleInRadians, fLength); + return convertbtVector3ToVec3(point); +} + +void Physics3DConeTwistConstraint::setFrames(const cocos2d::Mat4& frameA, const cocos2d::Mat4& frameB) +{ + const auto& btFrameA = convertMat4TobtTransform(frameA); + const auto& btFrameB = convertMat4TobtTransform(frameB); + + static_cast(_constraint)->setFrames(btFrameA, btFrameB); +} + +cocos2d::Mat4 Physics3DConeTwistConstraint::getFrameOffsetA() const +{ + const auto& trans = static_cast(_constraint)->getFrameOffsetA(); + return convertbtTransformToMat4(trans); +} + +cocos2d::Mat4 Physics3DConeTwistConstraint::getFrameOffsetB() const +{ + const auto& trans = static_cast(_constraint)->getFrameOffsetB(); + return convertbtTransformToMat4(trans); +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +Physics3D6DofConstraint* Physics3D6DofConstraint::create(Physics3DRigidBody* rbB, const cocos2d::Mat4& frameInB, bool useLinearReferenceFrameB) +{ + auto ret = new Physics3D6DofConstraint(); + ret->_bodyB = rbB; + rbB->retain(); + + auto frameB = convertMat4TobtTransform(frameInB); + ret->_constraint = new btGeneric6DofConstraint(*rbB->getRigidBody(), frameB, useLinearReferenceFrameB); + + ret->autorelease(); + return ret; +} + +Physics3D6DofConstraint* Physics3D6DofConstraint::create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Mat4& frameInA, const cocos2d::Mat4& frameInB, bool useLinearReferenceFrameA) +{ + auto ret = new Physics3D6DofConstraint(); + ret->_bodyA = rbA; + ret->_bodyB = rbB; + rbA->retain(); + rbB->retain(); + + auto frameA = convertMat4TobtTransform(frameInA); + auto frameB = convertMat4TobtTransform(frameInB); + ret->_constraint = new btGeneric6DofConstraint(*rbA->getRigidBody(), *rbB->getRigidBody(), frameA, frameB, useLinearReferenceFrameA); + + ret->autorelease(); + return ret; +} + +void Physics3D6DofConstraint::setLinearLowerLimit(const cocos2d::Vec3& linearLower) +{ + auto lower = convertVec3TobtVector3(linearLower); + static_cast(_constraint)->setLinearLowerLimit(lower); +} + +cocos2d::Vec3 Physics3D6DofConstraint::getLinearLowerLimit() const +{ + btVector3 lower; + static_cast(_constraint)->getLinearLowerLimit(lower); + return convertbtVector3ToVec3(lower); +} + +void Physics3D6DofConstraint::setLinearUpperLimit(const cocos2d::Vec3& linearUpper) +{ + auto upper = convertVec3TobtVector3(linearUpper); + static_cast(_constraint)->setLinearUpperLimit(upper); +} + +cocos2d::Vec3 Physics3D6DofConstraint::getLinearUpperLimit() const +{ + btVector3 upper; + static_cast(_constraint)->getLinearUpperLimit(upper); + return convertbtVector3ToVec3(upper); +} + +void Physics3D6DofConstraint::setAngularLowerLimit(const cocos2d::Vec3& angularLower) +{ + auto lower = convertVec3TobtVector3(angularLower); + static_cast(_constraint)->setAngularLowerLimit(lower); +} + +cocos2d::Vec3 Physics3D6DofConstraint::getAngularLowerLimit() const +{ + btVector3 lower; + static_cast(_constraint)->getAngularLowerLimit(lower); + return convertbtVector3ToVec3(lower); +} + +void Physics3D6DofConstraint::setAngularUpperLimit(const cocos2d::Vec3& angularUpper) +{ + auto upper = convertVec3TobtVector3(angularUpper); + static_cast(_constraint)->setAngularUpperLimit(upper); +} + +cocos2d::Vec3 Physics3D6DofConstraint::getAngularUpperLimit() const +{ + btVector3 upper; + static_cast(_constraint)->getAngularUpperLimit(upper); + return convertbtVector3ToVec3(upper); +} + +bool Physics3D6DofConstraint::isLimited(int limitIndex) const +{ + return static_cast(_constraint)->isLimited(limitIndex); +} + +bool Physics3D6DofConstraint::getUseFrameOffset() const +{ + return static_cast(_constraint)->getUseFrameOffset(); +} +void Physics3D6DofConstraint::setUseFrameOffset(bool frameOffsetOnOff) const +{ + static_cast(_constraint)->setUseFrameOffset(frameOffsetOnOff); +} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif //CC_USE_3D_PHYSICS diff --git a/cocos/physics3d/CCPhysics3DConstraint.h b/cocos/physics3d/CCPhysics3DConstraint.h new file mode 100644 index 0000000000..afad5ce3ad --- /dev/null +++ b/cocos/physics3d/CCPhysics3DConstraint.h @@ -0,0 +1,593 @@ +/**************************************************************************** + Copyright (c) 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. + ****************************************************************************/ + +#ifndef __PHYSICS_3D_CONSTRAINT_H__ +#define __PHYSICS_3D_CONSTRAINT_H__ + +#include "math/CCMath.h" +#include "base/CCRef.h" +#include "base/ccConfig.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +class btTypedConstraint; + +NS_CC_BEGIN + +/** + * @addtogroup _3d + * @{ + */ + +class Physics3DRigidBody; + +/** @brief Physics3DConstraint: Constraint affects the movement of physics object, it usually connet one or two physics object. There are some types of physics constraints. */ +class CC_DLL Physics3DConstraint : public Ref +{ +public: + enum class ConstraintType + { + UNKNOWN, + POINT_TO_POINT, + HINGE, + SLIDER, + CONE_TWIST, + SIX_DOF, + }; + /** + * get the impulse that break the constraint + */ + float getBreakingImpulse() const; + + /** + * set the impulse that break the constraint + */ + void setBreakingImpulse(float impulse); + + /** + * is it enabled + */ + bool isEnabled() const; + + /** + * set enable or not + */ + void setEnabled(bool enabled); + + /** + * get rigid body a + */ + Physics3DRigidBody* getBodyA() const { return _bodyA; } + + /** + * get rigid body b + */ + Physics3DRigidBody* getBodyB() const { return _bodyB; } + + /** + * get constraint type + */ + ConstraintType getConstraintType() const { return _type; } + + /** + * get user data + */ + void setUserData(void* userData) { _userData = userData; } + + /** + * get user data + */ + void* getUserData() const { return _userData; } + + /** + * get override number of solver iterations + */ + int getOverrideNumSolverIterations() const; + + /** + * 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 + */ + void setOverrideNumSolverIterations(int overideNumIterations); + +#if (CC_ENABLE_BULLET_INTEGRATION) + btTypedConstraint* getbtContraint() { return _constraint; } +#endif + +protected: + + Physics3DConstraint(); + virtual ~Physics3DConstraint(); + + btTypedConstraint* _constraint; + + Physics3DRigidBody* _bodyA; + Physics3DRigidBody* _bodyB; + + ConstraintType _type; + void* _userData; +}; + +/** + * Point to point constraint limits the translation so that the local pivot points of 2 rigidbodies match in worldspace. + */ +class CC_DLL Physics3DPointToPointConstraint : public Physics3DConstraint +{ +public: + /** + * create point to point constraint, limits the translation of local pivot point of rigid body A + * @param rbA The rigid body going to be fixed + * @param pivotPointInA local pivot point in A's local space + * @return created constraint + */ + static Physics3DPointToPointConstraint* create(Physics3DRigidBody* rbA, const cocos2d::Vec3& pivotPointInA); + + /** + * create point to point constraint, make the local pivot points of 2 rigid bodies match in worldspace. + * @param rbA The rigid body A going to be fixed + * @param rbB The rigid body B going to be fixed + * @param pivotPointInA local pivot point in A's local space + * @param pivotPointInB local pivot point in B's local space + * @return created constraint + */ + static Physics3DPointToPointConstraint* create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Vec3& pivotPointInA, const cocos2d::Vec3& pivotPointInB); + + /** + * set pivot point in A's local space + */ + void setPivotPointInA(const cocos2d::Vec3& pivotA); + + /** + * set pivot point in B's local space + */ + void setPivotPointInB(const cocos2d::Vec3& pivotB); + + /** + * get pivot point in A's local space + */ + cocos2d::Vec3 getPivotPointInA() const; + + /** + * get pivot point in B's local space + */ + cocos2d::Vec3 getPivotPointInB() const; + +CC_CONSTRUCTOR_ACCESS: + Physics3DPointToPointConstraint(); + virtual ~Physics3DPointToPointConstraint(); + +protected: + bool init(Physics3DRigidBody* rbA, const cocos2d::Vec3& pivotPointInA); + bool init(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Vec3& pivotPointInA, const cocos2d::Vec3& pivotPointInB); + +}; + +/** + * Hinge constraint restricts two additional angular degrees of freedom, so the body can only rotate around one axis, the hinge axis. This can be useful to represent doors or wheels rotating around one axis. + * hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space + */ +class CC_DLL Physics3DHingeConstraint : public Physics3DConstraint +{ +public: + /** + * create hinge constraint + * @param rbA rigid body A + * @param rbAFrame rigid body A's frame + * @param useReferenceFrameA use frame A as reference + */ + static Physics3DHingeConstraint* create(Physics3DRigidBody* rbA, const cocos2d::Mat4& rbAFrame, bool useReferenceFrameA = false); + + /** + * create hinge constraint + * @param rbA rigid body A + * @param pivotInA pivot in rigid body A's local space + * @param axisInA axis in rigid body A's local space + * @param useReferenceFrameA use frame A as reference + */ + static Physics3DHingeConstraint* create(Physics3DRigidBody* rbA, const cocos2d::Vec3& pivotInA, const cocos2d::Vec3& axisInA, bool useReferenceFrameA = false); + + /** + * create hinge constraint + * @param rbA rigid body A + * @param rbB rigid body B + * @param pivotInA pivot point in A's local space + * @param pivotInB pivot point in B's local space + * @param axisInA axis in A's local space + * @param axisInB axis in B's local space + * @param useReferenceFrameA use frame A as reference + */ + static Physics3DHingeConstraint* create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Vec3& pivotInA,const cocos2d::Vec3& pivotInB, cocos2d::Vec3& axisInA, cocos2d::Vec3& axisInB, bool useReferenceFrameA = false); + + /** + * create hinge constraint + * @param rbA rigid body A + * @param rbB rigid body B + * @param rbAFrame rigid body A's frame + * @param rbBFrame rigid body B's frame + * @param useReferenceFrameA use frame A as reference + */ + static Physics3DHingeConstraint* create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Mat4& rbAFrame, const cocos2d::Mat4& rbBFrame, bool useReferenceFrameA = false); + + /** + * get rigid body A's frame offset + */ + cocos2d::Mat4 getFrameOffsetA() const; + + /** + * get rigid body B's frame offset + */ + cocos2d::Mat4 getFrameOffsetB() const; + + /** + * set frames for rigid body A and B + */ + void setFrames(const cocos2d::Mat4& frameA, const cocos2d::Mat4& frameB); + + /** + * set angular only + */ + void setAngularOnly(bool angularOnly); + + /** enable angular motor */ + void enableAngularMotor(bool enableMotor, float targetVelocity, float maxMotorImpulse); + + // extra motor API, including ability to set a target rotation (as opposed to angular velocity) + // note: setMotorTarget sets angular velocity under the hood, so you must call it every tick to + // maintain a given angular target. + void enableMotor(bool enableMotor); + /** set max motor impulse */ + void setMaxMotorImpulse(float maxMotorImpulse); + /** + * set motor target + */ + void setMotorTarget(const cocos2d::Quaternion& qAinB, float dt); + /** set motor target */ + void setMotorTarget(float targetAngle, float dt); + + /** set limit */ + void setLimit(float low, float high, float _softness = 0.9f, float _biasFactor = 0.3f, float _relaxationFactor = 1.0f); + /**set axis*/ + void setAxis(const cocos2d::Vec3& axisInA); + /**get lower limit*/ + float getLowerLimit() const; + /**get upper limit*/ + float getUpperLimit() const; + /**get hinge angle*/ + float getHingeAngle() const; + /**get hinge angle*/ + float getHingeAngle(const cocos2d::Mat4& transA, const cocos2d::Mat4& transB); + + /**get A's frame */ + cocos2d::Mat4 getAFrame() const; + /**get B's frame*/ + cocos2d::Mat4 getBFrame() const; + /**get angular only*/ + bool getAngularOnly() const; + /**get enable angular motor*/ + bool getEnableAngularMotor() const; + /**get motor target velosity*/ + float getMotorTargetVelosity() const; + /**get max motor impulse*/ + float getMaxMotorImpulse() const; + + /** access for UseFrameOffset*/ + bool getUseFrameOffset() const; + /**set use frame offset*/ + void setUseFrameOffset(bool frameOffsetOnOff); + +CC_CONSTRUCTOR_ACCESS: + Physics3DHingeConstraint() + { + _type = ConstraintType::HINGE; + } + virtual ~Physics3DHingeConstraint(){} +}; + +/** + * It allows the body to rotate around x axis and translate along this axis. + * softness, restitution and damping for different cases + * DirLin - moving inside linear limits + * LimLin - hitting linear limit + * DirAng - moving inside angular limits + * LimAng - hitting angular limit + * OrthoLin, OrthoAng - against constraint axis + */ +class CC_DLL Physics3DSliderConstraint : public Physics3DConstraint +{ +public: + /** + * 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 + */ + static Physics3DSliderConstraint* create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Mat4& frameInA, const cocos2d::Mat4& frameInB ,bool useLinearReferenceFrameA); + + /**get A's frame offset*/ + cocos2d::Mat4 getFrameOffsetA() const; + /**get B's frame offset*/ + cocos2d::Mat4 getFrameOffsetB() const; + /**get lower linear limit*/ + float getLowerLinLimit() const; + /**set lower linear limit*/ + void setLowerLinLimit(float lowerLimit); + /**get upper linear limit*/ + float getUpperLinLimit() const; + /**set upper linear limit*/ + void setUpperLinLimit(float upperLimit); + /**get lower angular limit*/ + float getLowerAngLimit() const; + /**set lower angualr limit*/ + void setLowerAngLimit(float lowerLimit); + /**get upper anglular limit*/ + float getUpperAngLimit() const; + /**set upper anglular limit*/ + void setUpperAngLimit(float upperLimit); + /**use A's frame as linear refference*/ + bool getUseLinearReferenceFrameA() const; + + float getSoftnessDirLin() const; + float getRestitutionDirLin() const; + float getDampingDirLin() const; + float getSoftnessDirAng() const; + float getRestitutionDirAng() const; + float getDampingDirAng() const; + float getSoftnessLimLin() const; + float getRestitutionLimLin() const; + float getDampingLimLin() const; + float getSoftnessLimAng() const; + float getRestitutionLimAng() const; + float getDampingLimAng() const; + float getSoftnessOrthoLin() const; + float getRestitutionOrthoLin() const; + float getDampingOrthoLin() const; + float getSoftnessOrthoAng() const; + float getRestitutionOrthoAng() const; + float getDampingOrthoAng() const; + void setSoftnessDirLin(float softnessDirLin); + void setRestitutionDirLin(float restitutionDirLin); + void setDampingDirLin(float dampingDirLin); + void setSoftnessDirAng(float softnessDirAng); + void setRestitutionDirAng(float restitutionDirAng); + void setDampingDirAng(float dampingDirAng); + void setSoftnessLimLin(float softnessLimLin); + void setRestitutionLimLin(float restitutionLimLin); + void setDampingLimLin(float dampingLimLin); + void setSoftnessLimAng(float softnessLimAng); + void setRestitutionLimAng(float restitutionLimAng); + void setDampingLimAng(float dampingLimAng); + void setSoftnessOrthoLin(float softnessOrthoLin); + void setRestitutionOrthoLin(float restitutionOrthoLin); + void setDampingOrthoLin(float dampingOrthoLin); + void setSoftnessOrthoAng(float softnessOrthoAng); + void setRestitutionOrthoAng(float restitutionOrthoAng); + void setDampingOrthoAng(float dampingOrthoAng); + void setPoweredLinMotor(bool onOff); + bool getPoweredLinMotor() const; + void setTargetLinMotorVelocity(float targetLinMotorVelocity); + float getTargetLinMotorVelocity() const; + void setMaxLinMotorForce(float maxLinMotorForce); + float getMaxLinMotorForce() const; + void setPoweredAngMotor(bool onOff); + bool getPoweredAngMotor() const; + void setTargetAngMotorVelocity(float targetAngMotorVelocity); + float getTargetAngMotorVelocity() const; + void setMaxAngMotorForce(float maxAngMotorForce); + float getMaxAngMotorForce() const; + + float getLinearPos() const; + float getAngularPos() const; + + /** access for UseFrameOffset*/ + bool getUseFrameOffset() const; + /**set use frame offset*/ + void setUseFrameOffset(bool frameOffsetOnOff); + + /**set frames for rigid body A and B*/ + void setFrames(const cocos2d::Mat4& frameA, const cocos2d::Mat4& frameB); + +CC_CONSTRUCTOR_ACCESS: + Physics3DSliderConstraint() + { + _type = ConstraintType::SLIDER; + } + virtual ~Physics3DSliderConstraint(){} +}; + +/** + * It is a special point to point constraint that adds cone and twist axis limits. The x-axis serves as twist axis. + */ +class CC_DLL Physics3DConeTwistConstraint : public Physics3DConstraint +{ +public: + /** + * create cone twist constraint + * rbA rigid body A + * frameA A's local frame + */ + static Physics3DConeTwistConstraint* create(Physics3DRigidBody* rbA, const cocos2d::Mat4& frameA); + /** + * create cone twist constraint + * rbA rigid body A + * rbB rigid body B + * frameA rigid body A's local frame + * frameB rigid body B's local frame + */ + static Physics3DConeTwistConstraint* create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Mat4& frameA, const cocos2d::Mat4& frameB); + + /** + * 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. + */ + void setLimit(float swingSpan1,float swingSpan2,float twistSpan, float softness = 1.f, float biasFactor = 0.3f, float relaxationFactor = 1.0f); + + /**get A's frame*/ + cocos2d::Mat4 getAFrame() const; + /**get B's frame*/ + cocos2d::Mat4 getBFrame() const; + + /**get swing span1*/ + float getSwingSpan1() const; + /**get swing span2*/ + float getSwingSpan2() const; + /**get twist span*/ + float getTwistSpan() const; + /**get twist angle*/ + float getTwistAngle() const; + + /**set damping*/ + void setDamping(float damping); + + /**enable motor*/ + void enableMotor(bool b); + /**set max motor impulse*/ + void setMaxMotorImpulse(float maxMotorImpulse); + /**set max motor impulse normalize*/ + void setMaxMotorImpulseNormalized(float maxMotorImpulse); + /**get fix thresh*/ + float getFixThresh() const; + /**set fix thresh*/ + void setFixThresh(float fixThresh); + + /** + * setMotorTarget + * @param q the desired rotation of bodyA wrt bodyB. Note: if q violates the joint limits, the internal target is clamped to avoid conflicting impulses (very bad for stability), also don't forget to enableMotor() + */ + void setMotorTarget(const btQuaternion &q); + + /** setMotorTarget, q is the desired rotation of frameA wrt frameB in constraint space*/ + void setMotorTargetInConstraintSpace(const btQuaternion &q); + + /**get point for angle*/ + cocos2d::Vec3 GetPointForAngle(float fAngleInRadians, float fLength) const; + + /**set A and B's frame*/ + virtual void setFrames(const cocos2d::Mat4& frameA, const cocos2d::Mat4& frameB); + + /**get A's frame offset*/ + cocos2d::Mat4 getFrameOffsetA() const; + + /**get B's frame offset*/ + cocos2d::Mat4 getFrameOffsetB() const; + +CC_CONSTRUCTOR_ACCESS: + Physics3DConeTwistConstraint() + { + _type = ConstraintType::CONE_TWIST; + } + virtual ~Physics3DConeTwistConstraint(){} +}; + +/** + * This generic constraint can emulate a variety of standard constraints, by configuring each of the 6 degrees of freedom (dof). + * The first 3 dof axis are linear axis, which represent translation of rigidbodies, and the latter 3 dof axis represent the angular motion. + * Each axis can be either locked, free or limited. All axis are locked by default. + * For each axis: + * Lowerlimit == Upperlimit -> axis is locked. + * Lowerlimit > Upperlimit -> axis is free + * Lowerlimit < Upperlimit -> axis it limited in that range + */ +class CC_DLL Physics3D6DofConstraint : public Physics3DConstraint +{ +public: + /** + * create 6 dof 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 + */ + static Physics3D6DofConstraint* create(Physics3DRigidBody* rbA, Physics3DRigidBody* rbB, const cocos2d::Mat4& frameInA, const cocos2d::Mat4& frameInB, bool useLinearReferenceFrameA); + + /** + * create 6 dof constraint + * @param rbB rigid body B + * @param frameInB frame in B's local space + * @param useLinearReferenceFrameB use fixed frame B for linear limits + */ + static Physics3D6DofConstraint* create(Physics3DRigidBody* rbB, const cocos2d::Mat4& frameInB, bool useLinearReferenceFrameB); + + /**set linear lower limit*/ + void setLinearLowerLimit(const cocos2d::Vec3& linearLower); + + /**get linear lower limit*/ + cocos2d::Vec3 getLinearLowerLimit() const; + + /**set linear upper limit*/ + void setLinearUpperLimit(const cocos2d::Vec3& linearUpper); + + /**get linear upper limit*/ + cocos2d::Vec3 getLinearUpperLimit() const; + + /**set angular lower limit*/ + void setAngularLowerLimit(const cocos2d::Vec3& angularLower); + + /**get angular lower limit*/ + cocos2d::Vec3 getAngularLowerLimit() const; + + /**set angular upper limit*/ + void setAngularUpperLimit(const cocos2d::Vec3& angularUpper); + + /**get angular upper limit*/ + cocos2d::Vec3 getAngularUpperLimit() const; + + /** + * is limited? + * @param limitIndex first 3 are linear, next 3 are angular + */ + bool isLimited(int limitIndex) const; + + /** access for UseFrameOffset*/ + bool getUseFrameOffset() const; + /**set use frame offset*/ + void setUseFrameOffset(bool frameOffsetOnOff) const; + + +CC_CONSTRUCTOR_ACCESS: + Physics3D6DofConstraint() + { + _type = ConstraintType::SIX_DOF; + } + virtual ~Physics3D6DofConstraint(){} +}; + +// end of 3d group +/// @} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif // CC_USE_3D_PHYSICS + +#endif // __PHYSICS_3D_CONSTRAINT_H__ diff --git a/cocos/physics3d/CCPhysics3DDebugDrawer.cpp b/cocos/physics3d/CCPhysics3DDebugDrawer.cpp new file mode 100644 index 0000000000..b7b1eb4e8e --- /dev/null +++ b/cocos/physics3d/CCPhysics3DDebugDrawer.cpp @@ -0,0 +1,203 @@ +/**************************************************************************** + Copyright (c) 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 "CCPhysics3D.h" +#include "base/CCConfiguration.h" +#include "base/ccMacros.h" +#include "base/CCDirector.h" +#include "renderer/CCGLProgram.h" +#include "renderer/CCRenderer.h" +#include "renderer/ccGLStateCache.h" +#include "renderer/CCGLProgramCache.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +NS_CC_BEGIN + +void Physics3DDebugDrawer::drawLine( const btVector3& from,const btVector3& to,const btVector3& color ) +{ + int count = 2; + ensureCapacity(count); + + Vec3 col = convertbtVector3ToVec3(color); + + V3F_V4F *lines = (V3F_V4F *)(_buffer + _bufferCount); + lines[0].vertex = convertbtVector3ToVec3(from); + lines[0].color = Vec4(col.x, col.y, col.z, 1.0f); + lines[1].vertex = convertbtVector3ToVec3(to); + lines[1].color = Vec4(col.x, col.y, col.z, 1.0f); + + _bufferCount += count; + _dirty = true; +} + +void Physics3DDebugDrawer::drawContactPoint( const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color ) +{ + drawLine(PointOnB, PointOnB + normalOnB * distance, color); +} + +void Physics3DDebugDrawer::reportErrorWarning( const char* warningString ) +{ + CCLOG("%s", warningString); +} + +void Physics3DDebugDrawer::draw3dText( const btVector3& location,const char* textString ) +{ + +} + +void Physics3DDebugDrawer::setDebugMode( int debugMode ) +{ + _debugMode = debugMode; +} + +int Physics3DDebugDrawer::getDebugMode() const +{ + return _debugMode; +} + +void Physics3DDebugDrawer::draw( Renderer *renderer) +{ + _customCommand.init(0, Mat4::IDENTITY, 0); + _customCommand.func = CC_CALLBACK_0(Physics3DDebugDrawer::drawImplementation, this, Mat4::IDENTITY, 0); + renderer->addCommand(&_customCommand); +} + +Physics3DDebugDrawer::Physics3DDebugDrawer() + : _vao(0) + , _vbo(0) + , _bufferCapacity(0) + , _bufferCount(0) + , _buffer(nullptr) + , _blendFunc(BlendFunc::DISABLE) + , _dirty(true) + , _debugMode(DBG_DrawWireframe | DBG_DrawConstraints | DBG_DrawConstraintLimits) +{ + init(); +} + +Physics3DDebugDrawer::~Physics3DDebugDrawer() +{ + free(_buffer); + + if (_vao) + { + glDeleteVertexArrays(1, &_vao); + _vao = 0; + } + if (_vbo) + { + glDeleteBuffers(1, &_vbo); + _vbo = 0; + } +} + +void Physics3DDebugDrawer::ensureCapacity( int count ) +{ + CCASSERT(count>=0, "capacity must be >= 0"); + + if(_bufferCount + count > _bufferCapacity) + { + _bufferCapacity += MAX(_bufferCapacity, count); + _buffer = (V3F_V4F*)realloc(_buffer, _bufferCapacity*sizeof(V3F_V4F)); + } +} + +void Physics3DDebugDrawer::drawImplementation( const Mat4 &transform, uint32_t flags ) +{ + _program->use(); + _program->setUniformsForBuiltins(transform); + glEnable(GL_DEPTH_TEST); + GL::blendFunc(_blendFunc.src, _blendFunc.dst); + + if (_dirty) + { + glBindBuffer(GL_ARRAY_BUFFER, _vbo); + glBufferData(GL_ARRAY_BUFFER, sizeof(V3F_V4F) * _bufferCapacity, _buffer, GL_STREAM_DRAW); + _dirty = false; + } + if (Configuration::getInstance()->supportsShareableVAO()) + { + GL::bindVAO(_vao); + } + else + { + GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POSITION | GL::VERTEX_ATTRIB_FLAG_COLOR); + + glBindBuffer(GL_ARRAY_BUFFER, _vbo); + // vertex + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, sizeof(V3F_V4F), (GLvoid *)offsetof(V3F_V4F, vertex)); + // color + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_FLOAT, GL_FALSE, sizeof(V3F_V4F), (GLvoid *)offsetof(V3F_V4F, color)); + } + + glDrawArrays(GL_LINES, 0, _bufferCount); + glBindBuffer(GL_ARRAY_BUFFER, 0); + + CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_bufferCount); + glDisable(GL_DEPTH_TEST); +} + +void Physics3DDebugDrawer::init() +{ + _program = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_COLOR); + + ensureCapacity(512); + + if (Configuration::getInstance()->supportsShareableVAO()) + { + glGenVertexArrays(1, &_vao); + GL::bindVAO(_vao); + } + + glGenBuffers(1, &_vbo); + glBindBuffer(GL_ARRAY_BUFFER, _vbo); + glBufferData(GL_ARRAY_BUFFER, sizeof(V3F_V4F)* _bufferCapacity, _buffer, GL_STREAM_DRAW); + + glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, sizeof(V3F_V4F), (GLvoid *)offsetof(V3F_V4F, vertex)); + + glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_FLOAT, GL_FALSE, sizeof(V3F_V4F), (GLvoid *)offsetof(V3F_V4F, color)); + + glBindBuffer(GL_ARRAY_BUFFER, 0); + + if (Configuration::getInstance()->supportsShareableVAO()) + { + GL::bindVAO(0); + } +} + +void Physics3DDebugDrawer::clear() +{ + _bufferCount = 0; +} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif //CC_USE_3D_PHYSICS diff --git a/cocos/physics3d/CCPhysics3DDebugDrawer.h b/cocos/physics3d/CCPhysics3DDebugDrawer.h new file mode 100644 index 0000000000..fcae14b648 --- /dev/null +++ b/cocos/physics3d/CCPhysics3DDebugDrawer.h @@ -0,0 +1,108 @@ +/**************************************************************************** + Copyright (c) 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. + ****************************************************************************/ + +#ifndef __PHYSICS_3D_VIEWER_H__ +#define __PHYSICS_3D_VIEWER_H__ + +#include "math/CCMath.h" +#include "base/CCRef.h" +#include "base/ccTypes.h" +#include "base/ccConfig.h" +#include "renderer/CCCustomCommand.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) +#include "renderer/CCCustomCommand.h" +#include "bullet/LinearMath/btIDebugDraw.h" + +NS_CC_BEGIN + +/** + * @addtogroup _3d + * @{ + */ + +class GLProgram; +class Renderer; + +/** @brief Physics3DDebugDrawer: debug draw the physics object, used by Physics3DWorld */ +class Physics3DDebugDrawer : public btIDebugDraw +{ +public: + + Physics3DDebugDrawer(); + virtual ~Physics3DDebugDrawer(); + + void draw(cocos2d::Renderer *renderer); + + // override function + virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color) override; + virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color) override; + virtual void reportErrorWarning(const char* warningString) override; + virtual void draw3dText(const btVector3& location,const char* textString) override; + virtual void setDebugMode(int debugMode) override; + virtual int getDebugMode() const override; + + void clear(); + +protected: + + void init(); + void ensureCapacity(int count); + void drawImplementation(const cocos2d::Mat4 &transform, uint32_t flags); + +protected: + + struct V3F_V4F + { + cocos2d::Vec3 vertex; + cocos2d::Vec4 color; + }; + + GLuint _vao; + GLuint _vbo; + + int _bufferCapacity; + GLsizei _bufferCount; + V3F_V4F* _buffer; + + cocos2d::BlendFunc _blendFunc; + cocos2d::CustomCommand _customCommand; + cocos2d::GLProgram *_program; + + bool _dirty; + int _debugMode; +}; + +// end of 3d group +/// @} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif // CC_USE_3D_PHYSICS + +#endif // __PHYSICS_3D_VIEWER_H__ diff --git a/cocos/physics3d/CCPhysics3DObject.cpp b/cocos/physics3d/CCPhysics3DObject.cpp new file mode 100644 index 0000000000..7fe4c26135 --- /dev/null +++ b/cocos/physics3d/CCPhysics3DObject.cpp @@ -0,0 +1,377 @@ +/**************************************************************************** + Copyright (c) 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 "CCPhysics3D.h" +#include "base/ccUTF8.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +#include "bullet/btBulletCollisionCommon.h" +#include "bullet/btBulletDynamicsCommon.h" + +NS_CC_BEGIN + +Physics3DRigidBody::Physics3DRigidBody() +: _btRigidBody(nullptr) +, _physics3DShape(nullptr) +{ + +} + +Physics3DRigidBody::~Physics3DRigidBody() +{ + if (_physicsWorld) + { + for(auto constraint : _constraintList) + { + _physicsWorld->removePhysics3DConstraint(constraint); + } + _constraintList.clear(); + } + auto ms = _btRigidBody->getMotionState(); + CC_SAFE_DELETE(ms); + CC_SAFE_DELETE(_btRigidBody); + CC_SAFE_RELEASE(_physics3DShape); +} + +Physics3DRigidBody* Physics3DRigidBody::create(Physics3DRigidBodyDes* info) +{ + auto ret = new (std::nothrow) Physics3DRigidBody(); + if (ret->init(info)) + { + ret->autorelease(); + return ret; + } + + CC_SAFE_DELETE(ret); + return ret; +} + +bool Physics3DRigidBody::init(Physics3DRigidBodyDes* info) +{ + if (info->shape == nullptr) + return false; + + btScalar mass = info->mass; + auto shape = info->shape->getbtShape(); + auto localInertia = convertVec3TobtVector3(info->localInertia); + if (mass != 0.f) + { + shape->calculateLocalInertia(mass,localInertia); + } + + auto transform = convertMat4TobtTransform(info->originalTransform); + btDefaultMotionState* myMotionState = new btDefaultMotionState(transform); + btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,shape,localInertia); + _btRigidBody = new btRigidBody(rbInfo); + _type = Physics3DObject::PhysicsObjType::RIGID_BODY; + _physics3DShape = info->shape; + _physics3DShape->retain(); + if (info->disableSleep) + _btRigidBody->setActivationState(DISABLE_DEACTIVATION); + return true; +} + +void Physics3DRigidBody::setActive(bool active) +{ + if (_btRigidBody) + { + _btRigidBody->setActivationState(active ? ACTIVE_TAG : WANTS_DEACTIVATION); + } +} + +void Physics3DRigidBody::applyForce( const cocos2d::Vec3& force, const cocos2d::Vec3& rel_pos ) +{ + _btRigidBody->applyForce(convertVec3TobtVector3(force), convertVec3TobtVector3(rel_pos)); +} + +void Physics3DRigidBody::setLinearVelocity( const cocos2d::Vec3& lin_vel ) +{ + _btRigidBody->setLinearVelocity(convertVec3TobtVector3(lin_vel)); +} + +void Physics3DRigidBody::applyCentralForce( const cocos2d::Vec3& force ) +{ + _btRigidBody->applyCentralForce(convertVec3TobtVector3(force)); +} + +void Physics3DRigidBody::applyCentralImpulse( const cocos2d::Vec3& impulse ) +{ + _btRigidBody->applyCentralImpulse(convertVec3TobtVector3(impulse)); +} + +void Physics3DRigidBody::applyTorque( const cocos2d::Vec3& torque ) +{ + _btRigidBody->applyTorque(convertVec3TobtVector3(torque)); +} + +void Physics3DRigidBody::applyTorqueImpulse( const cocos2d::Vec3& torque ) +{ + _btRigidBody->applyTorqueImpulse(convertVec3TobtVector3(torque)); +} + +void Physics3DRigidBody::applyImpulse( const cocos2d::Vec3& impulse, const cocos2d::Vec3& rel_pos ) +{ + _btRigidBody->applyImpulse(convertVec3TobtVector3(impulse), convertVec3TobtVector3(rel_pos)); +} + +void Physics3DRigidBody::applyDamping( float timeStep ) +{ + _btRigidBody->applyDamping(timeStep); +} + +cocos2d::Vec3 Physics3DRigidBody::getLinearVelocity() const +{ + return convertbtVector3ToVec3(_btRigidBody->getLinearVelocity()); +} + +void Physics3DRigidBody::setLinearFactor( const cocos2d::Vec3& linearFactor ) +{ + _btRigidBody->setLinearFactor(convertVec3TobtVector3(linearFactor)); +} + +cocos2d::Vec3 Physics3DRigidBody::getLinearFactor() const +{ + return convertbtVector3ToVec3(_btRigidBody->getLinearFactor()); +} + +void Physics3DRigidBody::setAngularFactor( const cocos2d::Vec3& angFac ) +{ + _btRigidBody->setAngularFactor(convertVec3TobtVector3(angFac)); +} + +void Physics3DRigidBody::setAngularFactor( float angFac ) +{ + _btRigidBody->setAngularFactor(angFac); +} + +cocos2d::Vec3 Physics3DRigidBody::getAngularFactor() const +{ + return convertbtVector3ToVec3(_btRigidBody->getAngularFactor()); +} + +void Physics3DRigidBody::setAngularVelocity( const cocos2d::Vec3& ang_vel ) +{ + _btRigidBody->setAngularVelocity(convertVec3TobtVector3(ang_vel)); +} + +cocos2d::Vec3 Physics3DRigidBody::getAngularVelocity() const +{ + return convertbtVector3ToVec3(_btRigidBody->getAngularVelocity()); +} + +void Physics3DRigidBody::setCenterOfMassTransform( const cocos2d::Mat4& xform ) +{ + _btRigidBody->setCenterOfMassTransform(convertMat4TobtTransform(xform)); +} + +cocos2d::Mat4 Physics3DRigidBody::getCenterOfMassTransform() const +{ + return convertbtTransformToMat4(_btRigidBody->getCenterOfMassTransform()); +} + +void Physics3DRigidBody::setDamping( float lin_damping, float ang_damping ) +{ + _btRigidBody->setDamping(lin_damping, ang_damping); +} + +float Physics3DRigidBody::getLinearDamping() const +{ + return _btRigidBody->getLinearDamping(); +} + +float Physics3DRigidBody::getAngularDamping() const +{ + return _btRigidBody->getAngularDamping(); +} + +void Physics3DRigidBody::setGravity( const cocos2d::Vec3& acceleration ) +{ + _btRigidBody->setGravity(convertVec3TobtVector3(acceleration)); +} + +cocos2d::Vec3 Physics3DRigidBody::getGravity() const +{ + return convertbtVector3ToVec3(_btRigidBody->getGravity()); +} + +void Physics3DRigidBody::setInvInertiaDiagLocal( const cocos2d::Vec3& diagInvInertia ) +{ + _btRigidBody->setInvInertiaDiagLocal(convertVec3TobtVector3(diagInvInertia)); +} + +cocos2d::Vec3 Physics3DRigidBody::getInvInertiaDiagLocal() const +{ + return convertbtVector3ToVec3(_btRigidBody->getInvInertiaDiagLocal()); +} + +void Physics3DRigidBody::setMassProps( float mass, const cocos2d::Vec3& inertia ) +{ + _btRigidBody->setMassProps(mass, convertVec3TobtVector3(inertia)); +} + +float Physics3DRigidBody::getInvMass() const +{ + return _btRigidBody->getInvMass(); +} + +cocos2d::Vec3 Physics3DRigidBody::getTotalForce() const +{ + return convertbtVector3ToVec3(_btRigidBody->getTotalForce()); +} + +cocos2d::Vec3 Physics3DRigidBody::getTotalTorque() const +{ + return convertbtVector3ToVec3(_btRigidBody->getTotalTorque()); +} + +void Physics3DRigidBody::setRestitution( float rest ) +{ + _btRigidBody->setRestitution(rest); +} + +float Physics3DRigidBody::getRestitution() const +{ + return _btRigidBody->getRestitution(); +} + +void Physics3DRigidBody::setFriction( float frict ) +{ + _btRigidBody->setFriction(frict); +} + +float Physics3DRigidBody::getFriction() const +{ + return _btRigidBody->getFriction(); +} + +void Physics3DRigidBody::setRollingFriction( float frict ) +{ + _btRigidBody->setRollingFriction(frict); +} + +float Physics3DRigidBody::getRollingFriction() const +{ + return _btRigidBody->getRollingFriction(); +} + +void Physics3DRigidBody::setHitFraction( float hitFraction ) +{ + _btRigidBody->setHitFraction(hitFraction); +} + +float Physics3DRigidBody::getHitFraction() const +{ + return _btRigidBody->getHitFraction(); +} + +void Physics3DRigidBody::setCcdMotionThreshold( float ccdMotionThreshold ) +{ + _btRigidBody->setCcdMotionThreshold(ccdMotionThreshold); +} + +float Physics3DRigidBody::getCcdMotionThreshold() const +{ + return _btRigidBody->getCcdMotionThreshold(); +} + +void Physics3DRigidBody::setCcdSweptSphereRadius( float radius ) +{ + _btRigidBody->setCcdSweptSphereRadius(radius); +} + +float Physics3DRigidBody::getCcdSweptSphereRadius() const +{ + return _btRigidBody->getCcdSweptSphereRadius(); +} + +void Physics3DRigidBody::addConstraint( Physics3DConstraint *constraint ) +{ + auto iter = std::find(_constraintList.begin(), _constraintList.end(), constraint); + if (iter == _constraintList.end()){ + _constraintList.push_back(constraint); + constraint->retain(); + } +} + +void Physics3DRigidBody::removeConstraint( Physics3DConstraint *constraint ) +{ + auto iter = std::find(_constraintList.begin(), _constraintList.end(), constraint); + if (iter != _constraintList.end()){ + constraint->release(); + _constraintList.erase(iter); + } +} + +void Physics3DRigidBody::removeConstraint( unsigned int idx ) +{ + CCASSERT(idx < _constraintList.size(), "idx < _constraintList.size()"); + removeConstraint(_constraintList[idx]); +} + +Physics3DConstraint* Physics3DRigidBody::getConstraint( unsigned int idx ) const +{ + CCASSERT(idx < _constraintList.size(), "idx < _constraintList.size()"); + return _constraintList[idx]; +} + +unsigned int Physics3DRigidBody::getConstraintCount() const +{ + return (unsigned int)_constraintList.size(); +} + +cocos2d::Mat4 Physics3DRigidBody::getWorldTransform() const +{ + const auto& transform = _btRigidBody->getWorldTransform(); + return convertbtTransformToMat4(transform); +} + +void Physics3DRigidBody::setKinematic(bool kinematic) +{ + if (kinematic) + { + _btRigidBody->setCollisionFlags(_btRigidBody->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT); + _btRigidBody->setActivationState(DISABLE_DEACTIVATION); + } + else + { + _btRigidBody->setCollisionFlags(_btRigidBody->getCollisionFlags() & ~btCollisionObject::CF_KINEMATIC_OBJECT); + _btRigidBody->setActivationState(ACTIVE_TAG); + } +} + +bool Physics3DRigidBody::isKinematic() const +{ + if (_btRigidBody) + return _btRigidBody->isKinematicObject(); + return false; +} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif // CC_USE_3D_PHYSICS diff --git a/cocos/physics3d/CCPhysics3DObject.h b/cocos/physics3d/CCPhysics3DObject.h new file mode 100644 index 0000000000..a26d209b21 --- /dev/null +++ b/cocos/physics3d/CCPhysics3DObject.h @@ -0,0 +1,370 @@ +/**************************************************************************** + Copyright (c) 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. + ****************************************************************************/ + +#ifndef __PHYSICS_3D_OBJECT_H__ +#define __PHYSICS_3D_OBJECT_H__ + +#include "math/CCMath.h" +#include "base/CCRef.h" +#include "base/ccConfig.h" + +#include + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +class btCollisionShape; +class btRigidBody; +class btPersistentManifold; + +NS_CC_BEGIN +/** + * @addtogroup _3d + * @{ + */ + +class Physics3DShape; +class Physics3DWorld; +class Physics3DConstraint; +class Physics3DObject; +/** + * @brief The collision information of Physics3DObject. + */ +struct CC_DLL Physics3DCollisionInfo +{ + struct CollisionPoint + { + Vec3 localPositionOnA; + Vec3 worldPositionOnA; + Vec3 localPositionOnB; + Vec3 worldPositionOnB; + Vec3 worldNormalOnB; + }; + + Physics3DObject *objA; + Physics3DObject *objB; + std::vector collisionPointList; +}; +/** + * @brief Inherit from Ref, base class + */ +class CC_DLL Physics3DObject : public Ref +{ +public: + typedef std::function CollisionCallbackFunc; + + enum class PhysicsObjType + { + UNKNOWN = 0, + RIGID_BODY, + }; + + /** Get the Physics3DObject Type. */ + virtual PhysicsObjType getObjType() const { return _type; } + + /** Set the user data. */ + void setUserData(void* userData) { _userData = userData; } + + /** Get the user data. */ + void* getUserData() const { return _userData; } + + /** Internal method. Set the pointer of Physics3DWorld. */ + void setPhysicsWorld(Physics3DWorld* world) { _physicsWorld = world; }; + + /** Get the pointer of Physics3DWorld. */ + Physics3DWorld* getPhysicsWorld() const { return _physicsWorld; } + + /** Get the world matrix of Physics3DObject. */ + virtual cocos2d::Mat4 getWorldTransform() const = 0; + + /** Set the collision callback function. */ + void setCollisionCallback(const CollisionCallbackFunc &func) { _collisionCallbackFunc = func; }; + + /** Get the collision callback function. */ + const CollisionCallbackFunc& getCollisionCallback() const { return _collisionCallbackFunc; } + + /** Check has collision callback function. */ + bool needCollisionCallback() { return _collisionCallbackFunc != nullptr; }; + + /** Set the mask of Physics3DObject. */ + void setMask(unsigned int mask) { _mask = mask; }; + + /** Get the mask of Physics3DObject. */ + unsigned int getMask() const { return _mask; }; + +CC_CONSTRUCTOR_ACCESS: + Physics3DObject() + : _type(PhysicsObjType::UNKNOWN) + , _userData(nullptr) + , _isEnabled(true) + , _physicsWorld(nullptr) + , _mask(-1) + { + + } + virtual ~Physics3DObject(){} + + +protected: + bool _isEnabled; + PhysicsObjType _type; + void* _userData; + Physics3DWorld* _physicsWorld; + CollisionCallbackFunc _collisionCallbackFunc; + unsigned int _mask; +}; + +/** + * @brief The description of Physics3DRigidBody. + */ +struct CC_DLL Physics3DRigidBodyDes +{ + float mass; //Note: mass equals zero means static, default 0 + cocos2d::Vec3 localInertia; //default (0, 0, 0) + Physics3DShape* shape; + cocos2d::Mat4 originalTransform; + bool disableSleep; //it is always active if disabled + + Physics3DRigidBodyDes() + : mass(0.f) + , localInertia(0.f, 0.f, 0.f) + , shape(nullptr) + , disableSleep(false) + { + + } +}; + +/** + * @brief Inherit from Physics3DObject, the main class for rigid body objects + */ +class CC_DLL Physics3DRigidBody : public Physics3DObject +{ + friend class Physics3DWorld; +public: + + /** + * Creates a Physics3DRigidBody with Physics3DRigidBody. + * + * @return An autoreleased Physics3DRigidBody object. + */ + static Physics3DRigidBody* create(Physics3DRigidBodyDes* info); + + /** Get the pointer of btRigidBody. */ + btRigidBody* getRigidBody() const { return _btRigidBody; } + + /** + * Apply a force. + * + * @param force the value of the force + * @param rel_pos the position of the force + */ + void applyForce(const cocos2d::Vec3& force, const cocos2d::Vec3& rel_pos); + + /** + * Apply a central force. + * + * @param force the value of the force + */ + void applyCentralForce(const cocos2d::Vec3& force); + + /** + * Apply a central impulse. + * + * @param impulse the value of the impulse + */ + void applyCentralImpulse(const cocos2d::Vec3& impulse); + + /** + * Apply a torque. + * + * @param torque the value of the torque + */ + void applyTorque(const cocos2d::Vec3& torque); + + /** + * Apply a torque impulse. + * + * @param torque the value of the torque + */ + void applyTorqueImpulse(const cocos2d::Vec3& torque); + + /** + * Apply a impulse. + * + * @param impulse the value of the impulse + * @param rel_pos the position of the impulse + */ + void applyImpulse(const cocos2d::Vec3& impulse, const cocos2d::Vec3& rel_pos); + + /** Damps the velocity, using the given linearDamping and angularDamping. */ + void applyDamping(float timeStep); + + /** Set the linear velocity. */ + void setLinearVelocity(const cocos2d::Vec3& lin_vel); + + /** Get the linear velocity. */ + cocos2d::Vec3 getLinearVelocity() const; + + /** Set the linear factor. */ + void setLinearFactor(const cocos2d::Vec3& linearFactor); + + /** Get the linear factor. */ + cocos2d::Vec3 getLinearFactor() const; + + /** Set the angular factor. */ + void setAngularFactor(const cocos2d::Vec3& angFac); + + /** Set the angular factor, use unified factor. */ + void setAngularFactor(float angFac); + + /** Get the angular factor. */ + cocos2d::Vec3 getAngularFactor() const; + + /** Set the angular velocity. */ + void setAngularVelocity(const cocos2d::Vec3& ang_vel); + + /** Get the angular velocity. */ + cocos2d::Vec3 getAngularVelocity() const; + + /** Set the center of mass. */ + void setCenterOfMassTransform(const cocos2d::Mat4& xform); + + /** Get the center of mass. */ + cocos2d::Mat4 getCenterOfMassTransform() const; + + /** Set linear damping and angular damping. */ + void setDamping(float lin_damping, float ang_damping); + + /** Get linear damping. */ + float getLinearDamping() const; + + /** Get angular damping. */ + float getAngularDamping() const; + + /** Set the acceleration. */ + void setGravity(const cocos2d::Vec3& acceleration); + + /** Get the acceleration. */ + cocos2d::Vec3 getGravity() const; + + /** Set the inverse of local inertia. */ + void setInvInertiaDiagLocal(const cocos2d::Vec3& diagInvInertia); + + /** Get the inverse of local inertia. */ + cocos2d::Vec3 getInvInertiaDiagLocal() const; + + /** Set mass and inertia. */ + void setMassProps(float mass, const cocos2d::Vec3& inertia); + + /** Get inverse of mass. */ + float getInvMass() const; + + /** Get total force. */ + cocos2d::Vec3 getTotalForce() const; + + /** Get total torque. */ + cocos2d::Vec3 getTotalTorque() const; + + /** Set restitution. */ + void setRestitution(float rest); + + /** Get restitution. */ + float getRestitution() const; + + /** Set friction. */ + void setFriction(float frict); + + /** Get friction. */ + float getFriction() const; + + /** Set rolling friction. */ + void setRollingFriction(float frict); + + /** Get rolling friction. */ + float getRollingFriction() const; + + /** Set hit friction. */ + void setHitFraction(float hitFraction); + + /** Get hit friction. */ + float getHitFraction() const; + + /** Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold */ + void setCcdMotionThreshold(float ccdMotionThreshold); + + /** Get motion threshold. */ + float getCcdMotionThreshold() const; + + /** Set swept sphere radius. */ + void setCcdSweptSphereRadius(float radius); + + /** Get swept sphere radius. */ + float getCcdSweptSphereRadius() const; + + /** Set kinematic object. */ + void setKinematic(bool kinematic); + + /** Check rigid body is kinematic object. */ + bool isKinematic() const; + + /** override. */ + virtual cocos2d::Mat4 getWorldTransform() const override; + + /** Get constraint by index. */ + Physics3DConstraint* getConstraint(unsigned int idx) const; + + /** Get the total number of constraints. */ + unsigned int getConstraintCount() const; + + /** Active or inactive. */ + void setActive(bool active); + +CC_CONSTRUCTOR_ACCESS: + Physics3DRigidBody(); + virtual ~Physics3DRigidBody(); + + bool init(Physics3DRigidBodyDes* info); + + void addConstraint(Physics3DConstraint *constraint); + void removeConstraint(Physics3DConstraint *constraint); + void removeConstraint(unsigned int idx); + +protected: + btRigidBody* _btRigidBody; + Physics3DShape *_physics3DShape; + std::vector _constraintList; +}; + +// end of 3d group +/// @} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif //CC_USE_3D_PHYSICS + +#endif // __PHYSICS_3D_OBJECT_H__ diff --git a/cocos/physics3d/CCPhysics3DShape.cpp b/cocos/physics3d/CCPhysics3DShape.cpp new file mode 100644 index 0000000000..4ceee16dc9 --- /dev/null +++ b/cocos/physics3d/CCPhysics3DShape.cpp @@ -0,0 +1,208 @@ +/**************************************************************************** + Copyright (c) 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 "CCPhysics3D.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) +#include "bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h" + +NS_CC_BEGIN + +Physics3DShape::ShapeType Physics3DShape::getShapeType() const +{ + return _shapeType; +} + +Physics3DShape::Physics3DShape() +: _shapeType(ShapeType::UNKNOWN) +{ +#if (CC_ENABLE_BULLET_INTEGRATION) + _btShape = nullptr; + _heightfieldData = nullptr; +#endif +} +Physics3DShape::~Physics3DShape() +{ +#if (CC_ENABLE_BULLET_INTEGRATION) + CC_SAFE_DELETE(_btShape); + CC_SAFE_DELETE_ARRAY(_heightfieldData); + for (auto iter : _compoundChildShapes){ + CC_SAFE_RELEASE(iter); + } + _compoundChildShapes.clear(); +#endif +} + +Physics3DShape* Physics3DShape::createBox(const cocos2d::Vec3& extent) +{ + auto shape = new (std::nothrow) Physics3DShape(); + shape->initBox(extent); + shape->autorelease(); + return shape; +} + +Physics3DShape* Physics3DShape::createSphere(float radius) +{ + auto shape = new (std::nothrow) Physics3DShape(); + shape->initSphere(radius); + shape->autorelease(); + return shape; +} + +Physics3DShape* Physics3DShape::createCylinder(float radius, float height) +{ + auto shape = new (std::nothrow) Physics3DShape(); + shape->initCylinder(radius, height); + shape->autorelease(); + return shape; +} + +Physics3DShape* Physics3DShape::createCapsule(float radius, float height) +{ + auto shape = new (std::nothrow) Physics3DShape(); + shape->initCapsule(radius, height); + shape->autorelease(); + return shape; +} + +Physics3DShape* Physics3DShape::createConvexHull( const cocos2d::Vec3 *points, int numPoints ) +{ + auto shape = new (std::nothrow) Physics3DShape(); + shape->initConvexHull(points, numPoints); + shape->autorelease(); + return shape; +} + +Physics3DShape* Physics3DShape::createMesh( const cocos2d::Vec3 *triangles, int numTriangles ) +{ + auto shape = new (std::nothrow) Physics3DShape(); + shape->initMesh(triangles, numTriangles); + shape->autorelease(); + return shape; +} + +Physics3DShape* Physics3DShape::createHeightfield( int heightStickWidth,int heightStickLength + , const void* heightfieldData, float heightScale + , float minHeight, float maxHeight + , bool useFloatDatam, bool flipQuadEdges + , bool useDiamondSubdivision) +{ + auto shape = new (std::nothrow) Physics3DShape(); + shape->initHeightfield(heightStickWidth, heightStickLength, heightfieldData, heightScale, minHeight, maxHeight, useFloatDatam, flipQuadEdges, useDiamondSubdivision); + shape->autorelease(); + return shape; +} + +Physics3DShape* Physics3DShape::createCompoundShape( const std::vector> &shapes ) +{ + auto shape = new (std::nothrow) Physics3DShape(); + shape->initCompoundShape(shapes); + shape->autorelease(); + return shape; +} + +bool Physics3DShape::initBox(const cocos2d::Vec3& ext) +{ + _shapeType = ShapeType::BOX; + _btShape = new btBoxShape(convertVec3TobtVector3(ext * 0.5f)); + return true; +} +bool Physics3DShape::initSphere(float radius) +{ + _shapeType = ShapeType::SPHERE; + _btShape = new btSphereShape(radius); + return true; +} +bool Physics3DShape::initCylinder(float radius, float height) +{ + _shapeType = ShapeType::CYLINDER; + _btShape = new btCylinderShape(convertVec3TobtVector3(cocos2d::Vec3(radius, height, radius) * 0.5f)); + return true; +} +bool Physics3DShape::initCapsule(float radius, float height) +{ + _shapeType = ShapeType::CAPSULE; + _btShape = new btCapsuleShape(radius, height); + return true; +} + +bool Physics3DShape::initConvexHull( const cocos2d::Vec3 *points, int numPoints ) +{ + _shapeType = ShapeType::CONVEX; + _btShape = new btConvexHullShape((btScalar *)points, numPoints, sizeof(cocos2d::Vec3)); + return true; +} + +bool Physics3DShape::initMesh( const cocos2d::Vec3 *triangles, int numTriangles ) +{ + _shapeType = ShapeType::MESH; + auto mesh = new btTriangleMesh(false); + for (int i = 0; i < numTriangles * 3; i += 3){ + mesh->addTriangle(convertVec3TobtVector3(triangles[i]), convertVec3TobtVector3(triangles[i + 1]), convertVec3TobtVector3(triangles[i + 2])); + } + _btShape = new btBvhTriangleMeshShape(mesh, true); + return true; +} + +bool Physics3DShape::initHeightfield( int heightStickWidth,int heightStickLength + , const void* heightfieldData, float heightScale + , float minHeight, float maxHeight + , bool useFloatDatam, bool flipQuadEdges + , bool useDiamondSubdivision) +{ + _shapeType = ShapeType::HEIGHT_FIELD; + PHY_ScalarType type = PHY_UCHAR; + unsigned int dataSizeInByte = heightStickWidth * heightStickLength; + if (useFloatDatam){ + type = PHY_FLOAT; + dataSizeInByte *= sizeof(float); + } + _heightfieldData = new unsigned char[dataSizeInByte]; + memcpy(_heightfieldData, heightfieldData, dataSizeInByte); + auto heightfield = new btHeightfieldTerrainShape(heightStickWidth, heightStickLength, _heightfieldData, heightScale, minHeight, maxHeight, 1, type, flipQuadEdges); + heightfield->setUseDiamondSubdivision(useDiamondSubdivision); + _btShape = heightfield; + return true; +} + +bool Physics3DShape::initCompoundShape( const std::vector> &shapes ) +{ + _shapeType = ShapeType::COMPOUND; + auto compound = new btCompoundShape; + for (auto iter : shapes){ + compound->addChildShape(convertMat4TobtTransform(iter.second), iter.first->getbtShape()); + CC_SAFE_RETAIN(iter.first); + _compoundChildShapes.push_back(iter.first); + } + _btShape = compound; + return true; +} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif // CC_USE_3D_PHYSICS diff --git a/cocos/physics3d/CCPhysics3DShape.h b/cocos/physics3d/CCPhysics3DShape.h new file mode 100644 index 0000000000..086be0a276 --- /dev/null +++ b/cocos/physics3d/CCPhysics3DShape.h @@ -0,0 +1,169 @@ +/**************************************************************************** + Copyright (c) 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. + ****************************************************************************/ + +#ifndef __PHYSICS_3D_SHAPE_H__ +#define __PHYSICS_3D_SHAPE_H__ + +#include "base/CCRef.h" +#include "base/ccConfig.h" +#include "math/CCMath.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +class btCollisionShape; + +NS_CC_BEGIN +/** + * @addtogroup _3d + * @{ + */ + +/** + * @brief Create a physical shape(box, sphere, cylinder, capsule, convexhull, mesh and heightfield) + */ +class CC_DLL Physics3DShape : public Ref +{ +public: + enum class ShapeType + { + UNKNOWN = 0, + BOX, + SPHERE, + CYLINDER, + CAPSULE, + CONVEX, + MESH, + HEIGHT_FIELD, + COMPOUND + }; + + /** + * get shape type + */ + virtual ShapeType getShapeType() const; + + /** + * create box shape + * @param extent The extent of sphere. + */ + static Physics3DShape* createBox(const cocos2d::Vec3& extent); + + /** + * create sphere shape + * @param radius The radius of sphere. + */ + static Physics3DShape* createSphere(float radius); + + /** + * create cylinder shape + * @param radius The radius of cylinder. + * @param height The height. + */ + static Physics3DShape* createCylinder(float radius, float height); + + /** + * create capsule shape + * @param radius The radius of casule. + * @param height The height (cylinder part). + */ + static Physics3DShape* createCapsule(float radius, float height); + + /** + * create convex hull + * @param points The vertices of convex hull + * @param numPoints The number of vertices. + */ + static Physics3DShape* createConvexHull(const cocos2d::Vec3 *points, int numPoints); + + /** + * create mesh + * @param triangles The pointer of triangle list + * @param numTriangles The number of triangles. + */ + static Physics3DShape* createMesh(const cocos2d::Vec3 *triangles, int numTriangles); + + /** + * create heightfield + * @param heightStickWidth The Width of heightfield + * @param heightStickLength The Length of heightfield. + * @param heightfieldData The Data of heightfield. + * @param minHeight The minHeight of heightfield. + * @param maxHeight The maxHeight of heightfield. + * @param flipQuadEdges if flip QuadEdges + */ + static Physics3DShape* createHeightfield(int heightStickWidth,int heightStickLength + , const void* heightfieldData, float heightScale + , float minHeight, float maxHeight + , bool useFloatDatam, bool flipQuadEdges, bool useDiamondSubdivision = false); + + /** + * create Compound Shape + * @param shapes The list of child shape + */ + static Physics3DShape* createCompoundShape(const std::vector> &shapes); + + +#if CC_ENABLE_BULLET_INTEGRATION + btCollisionShape* getbtShape() const { return _btShape; } +#endif + +protected: + Physics3DShape(); + ~Physics3DShape(); + + bool initBox(const cocos2d::Vec3& ext); + bool initSphere(float radius); + bool initCylinder(float radius, float height); + bool initCapsule(float radius, float height); + bool initConvexHull(const cocos2d::Vec3 *points, int numPoints); + bool initMesh(const cocos2d::Vec3 *triangles, int numTriangles); + bool initHeightfield(int heightStickWidth,int heightStickLength + , const void* heightfieldData, float heightScale + , float minHeight, float maxHeight + , bool useFloatDatam, bool flipQuadEdges + , bool useDiamondSubdivision); + bool initCompoundShape(const std::vector> &shapes); + + + ShapeType _shapeType; //shape type + +#if (CC_ENABLE_BULLET_INTEGRATION) + btCollisionShape* _btShape; + unsigned char *_heightfieldData; + std::vector _compoundChildShapes; +#endif +}; + +// end of 3d group +/// @} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif //CC_USE_3D_PHYSICS + +#endif // __PHYSICS_3D_SHAPE_H__ diff --git a/cocos/physics3d/CCPhysics3DWorld.cpp b/cocos/physics3d/CCPhysics3DWorld.cpp new file mode 100644 index 0000000000..f3cd4f35d9 --- /dev/null +++ b/cocos/physics3d/CCPhysics3DWorld.cpp @@ -0,0 +1,331 @@ +/**************************************************************************** + Copyright (c) 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 "CCPhysics3D.h" +#include "renderer/CCRenderer.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +NS_CC_BEGIN + +Physics3DWorld::Physics3DWorld() +: _btPhyiscsWorld(nullptr) +, _collisionConfiguration(nullptr) +, _dispatcher(nullptr) +, _broadphase(nullptr) +, _solver(nullptr) +, _debugDrawer(nullptr) +, _needCollisionChecking(false) +, _collisionCheckingFlag(false) +{ + +} +Physics3DWorld::~Physics3DWorld() +{ + removeAllPhysics3DConstraints(); + removeAllPhysics3DObjects(); + + CC_SAFE_DELETE(_collisionConfiguration); + CC_SAFE_DELETE(_dispatcher); + CC_SAFE_DELETE(_broadphase); + CC_SAFE_DELETE(_solver); + CC_SAFE_DELETE(_btPhyiscsWorld); + CC_SAFE_DELETE(_debugDrawer); + for (auto it : _physicsComponents) + it->setPhysics3DObject(nullptr); + _physicsComponents.clear(); +} + +Physics3DWorld* Physics3DWorld::create(Physics3DWorldDes* info) +{ + auto world = new (std::nothrow) Physics3DWorld(); + world->init(info); + world->autorelease(); + return world; +} + +bool Physics3DWorld::init(Physics3DWorldDes* info) +{ + ///collision configuration contains default setup for memory, collision setup + _collisionConfiguration = new (std::nothrow) btDefaultCollisionConfiguration(); + //_collisionConfiguration->setConvexConvexMultipointIterations(); + + ///use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded) + _dispatcher = new (std::nothrow) btCollisionDispatcher(_collisionConfiguration); + + _broadphase = new (std::nothrow) btDbvtBroadphase(); + + ///the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded) + btSequentialImpulseConstraintSolver* sol = new btSequentialImpulseConstraintSolver(); + _solver = sol; + + _btPhyiscsWorld = new btDiscreteDynamicsWorld(_dispatcher,_broadphase,_solver,_collisionConfiguration); + _btPhyiscsWorld->setGravity(convertVec3TobtVector3(info->gravity)); + if (info->isDebugDrawEnabled) + { + _debugDrawer = new (std::nothrow) Physics3DDebugDrawer(); + _btPhyiscsWorld->setDebugDrawer(_debugDrawer); + } + + return true; +} + +void Physics3DWorld::setDebugDrawEnable(bool enableDebugDraw) +{ + if (enableDebugDraw && _btPhyiscsWorld->getDebugDrawer() == nullptr) + { + _debugDrawer = new (std::nothrow) Physics3DDebugDrawer(); + } + enableDebugDraw ? _btPhyiscsWorld->setDebugDrawer(_debugDrawer) : _btPhyiscsWorld->setDebugDrawer(nullptr); +} + +bool Physics3DWorld::isDebugDrawEnabled() const +{ + return _btPhyiscsWorld->getDebugDrawer() != nullptr; +} + +void Physics3DWorld::addPhysics3DObject(Physics3DObject* physicsObj) +{ + auto it = std::find(_objects.begin(), _objects.end(), physicsObj); + if (it == _objects.end()) + { + _objects.push_back(physicsObj); + physicsObj->retain(); + if (physicsObj->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY) + { + _btPhyiscsWorld->addRigidBody(static_cast(physicsObj)->getRigidBody()); + } + _collisionCheckingFlag = true; + } +} + +void Physics3DWorld::removePhysics3DObject(Physics3DObject* physicsObj) +{ + auto it = std::find(_objects.begin(), _objects.end(), physicsObj); + if (it != _objects.end()) + { + if (physicsObj->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY) + { + _btPhyiscsWorld->removeRigidBody(static_cast(physicsObj)->getRigidBody()); + } + physicsObj->release(); + _objects.erase(it); + _collisionCheckingFlag = true; + } +} + +void Physics3DWorld::removeAllPhysics3DObjects() +{ + for (auto it : _objects) { + if (it->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY) + { + _btPhyiscsWorld->removeRigidBody(static_cast(it)->getRigidBody()); + } + it->release(); + } + _objects.clear(); + _collisionCheckingFlag = true; +} + +void Physics3DWorld::addPhysics3DConstraint(Physics3DConstraint* constraint, bool disableCollisionsBetweenLinkedObjs) +{ + auto body = constraint->getBodyA(); + if (body) + body->addConstraint(constraint); + + body = constraint->getBodyB(); + if (body) + { + body->addConstraint(constraint); + } + _btPhyiscsWorld->addConstraint(constraint->getbtContraint(), disableCollisionsBetweenLinkedObjs); +} + +void Physics3DWorld::removePhysics3DConstraint(Physics3DConstraint* constraint) +{ + _btPhyiscsWorld->removeConstraint(constraint->getbtContraint()); + + auto bodyA = constraint->getBodyA(); + auto bodyB = constraint->getBodyB(); + if (bodyA) + bodyA->removeConstraint(constraint); + if (bodyB) + bodyB->removeConstraint(constraint); +} + +void Physics3DWorld::removeAllPhysics3DConstraints() +{ + for(auto it : _objects) + { + auto type = it->getObjType(); + if (type == Physics3DObject::PhysicsObjType::RIGID_BODY) + { + auto& constraints = static_cast(it)->_constraintList; + for (auto constraint : constraints) { + _btPhyiscsWorld->removeConstraint(constraint->getbtContraint()); + constraint->release(); + } + constraints.clear(); + } + } + +} + +void Physics3DWorld::stepSimulate(float dt) +{ + if (_btPhyiscsWorld) + { + //should sync kinematic node before simulation + for (auto it : _physicsComponents) + { + it->preSimulate(); + } + _btPhyiscsWorld->stepSimulation(dt, 3); + //sync dynamic node after simulation + for (auto it : _physicsComponents) + { + it->postSimulate(); + } + if (needCollisionChecking()) + collisionChecking(); + } +} + +void Physics3DWorld::debugDraw(Renderer* renderer) +{ + if (_debugDrawer) + { + _debugDrawer->clear(); + _btPhyiscsWorld->debugDrawWorld(); + _debugDrawer->draw(renderer); + } +} + +bool Physics3DWorld::rayCast(const cocos2d::Vec3& startPos, const cocos2d::Vec3& endPos, Physics3DWorld::HitResult* result) +{ + auto btStart = convertVec3TobtVector3(startPos); + auto btEnd = convertVec3TobtVector3(endPos); + btCollisionWorld::ClosestRayResultCallback btResult(btStart, btEnd); + _btPhyiscsWorld->rayTest(btStart, btEnd, btResult); + if (btResult.hasHit()) + { + result->hitObj = getPhysicsObject(btResult.m_collisionObject); + result->hitPosition = convertbtVector3ToVec3(btResult.m_hitPointWorld); + result->hitNormal = convertbtVector3ToVec3(btResult.m_hitNormalWorld); + return true; + } + result->hitObj = nullptr; + return false; +} + +bool Physics3DWorld::sweepShape(Physics3DShape* shape, const cocos2d::Mat4& startTransform, const cocos2d::Mat4& endTransform, Physics3DWorld::HitResult* result) +{ + CC_ASSERT(shape->getShapeType() != Physics3DShape::ShapeType::HEIGHT_FIELD && shape->getShapeType() != Physics3DShape::ShapeType::MESH); + auto btStart = convertMat4TobtTransform(startTransform); + auto btEnd = convertMat4TobtTransform(endTransform); + btCollisionWorld::ClosestConvexResultCallback btResult(btStart.getOrigin(), btEnd.getOrigin()); + _btPhyiscsWorld->convexSweepTest((btConvexShape*)shape->getbtShape(), btStart, btEnd, btResult); + if (btResult.hasHit()) + { + result->hitObj = getPhysicsObject(btResult.m_hitCollisionObject); + result->hitPosition = convertbtVector3ToVec3(btResult.m_hitPointWorld); + result->hitNormal = convertbtVector3ToVec3(btResult.m_hitNormalWorld); + return true; + } + result->hitObj = nullptr; + return false; +} + +Physics3DObject* Physics3DWorld::getPhysicsObject(const btCollisionObject* btObj) +{ + for(auto it : _objects) + { + if (it->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY) + { + if (static_cast(it)->getRigidBody() == btObj) + return it; + } + } + return nullptr; +} + +void Physics3DWorld::collisionChecking() +{ + int numManifolds = _dispatcher->getNumManifolds(); + for (int i = 0; i < numManifolds; ++i){ + btPersistentManifold * contactManifold = _dispatcher->getManifoldByIndexInternal(i); + int numContacts = contactManifold->getNumContacts(); + if (0 < numContacts){ + const btCollisionObject* obA = static_cast(contactManifold->getBody0()); + const btCollisionObject* obB = static_cast(contactManifold->getBody1()); + Physics3DObject *poA = getPhysicsObject(obA); + Physics3DObject *poB = getPhysicsObject(obB); + if (poA->needCollisionCallback() || poB->needCollisionCallback()){ + Physics3DCollisionInfo ci; + ci.objA = poA; + ci.objB = poB; + for (int c = 0; c < numContacts; ++c){ + btManifoldPoint& pt = contactManifold->getContactPoint(c); + Physics3DCollisionInfo::CollisionPoint cp = { + convertbtVector3ToVec3(pt.m_localPointA), convertbtVector3ToVec3(pt.m_positionWorldOnA) + , convertbtVector3ToVec3(pt.m_localPointB), convertbtVector3ToVec3(pt.m_positionWorldOnB) + , convertbtVector3ToVec3(pt.m_normalWorldOnB) + }; + ci.collisionPointList.push_back(cp); + } + + if (poA->needCollisionCallback()){ + poA->getCollisionCallback()(ci); + } + if (poB->needCollisionCallback()){ + poB->getCollisionCallback()(ci); + } + } + } + } +} + +bool Physics3DWorld::needCollisionChecking() +{ + if (_collisionCheckingFlag){ + _needCollisionChecking = false; + for(auto it : _objects) + { + if (it->getCollisionCallback() != nullptr){ + _needCollisionChecking = true; + break; + } + } + _collisionCheckingFlag = false; + } + return _needCollisionChecking; +} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif //CC_USE_3D_PHYSICS diff --git a/cocos/physics3d/CCPhysics3DWorld.h b/cocos/physics3d/CCPhysics3DWorld.h new file mode 100644 index 0000000000..b238de3ebf --- /dev/null +++ b/cocos/physics3d/CCPhysics3DWorld.h @@ -0,0 +1,173 @@ +/**************************************************************************** + Copyright (c) 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. + ****************************************************************************/ + +#ifndef __PHYSICS_3D_WORLD_H__ +#define __PHYSICS_3D_WORLD_H__ + +#include "math/CCMath.h" +#include "base/CCRef.h" +#include "base/ccConfig.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +class btDynamicsWorld; +class btDefaultCollisionConfiguration; +class btCollisionDispatcher; +class btDbvtBroadphase; +class btSequentialImpulseConstraintSolver; +class btRigidBody; +class btCollisionObject; + +NS_CC_BEGIN +/** + * @addtogroup _3d + * @{ + */ + +class Physics3DObject; +class Physics3DConstraint; +class Physics3DDebugDrawer; +class Physics3DComponent; +class Physics3DShape; +class Renderer; + +/** + * @brief The description of Physics3DWorld. + */ +struct CC_DLL Physics3DWorldDes +{ + bool isDebugDrawEnabled; //using physics debug draw?, false by default + cocos2d::Vec3 gravity;//gravity, (0, -9.8, 0) + Physics3DWorldDes() + { + isDebugDrawEnabled = false; + gravity = cocos2d::Vec3(0.f, -9.8f, 0.f); + } +}; + +/** + * @brief The physics information container, include Physics3DObjects, Physics3DConstraints, collision information and so on. + */ +class CC_DLL Physics3DWorld : public Ref +{ + friend class Physics3DComponent; +public: + + struct HitResult + { + cocos2d::Vec3 hitPosition; + cocos2d::Vec3 hitNormal; + Physics3DObject* hitObj; + }; + + /** + * Creates a Physics3DWorld with Physics3DWorldDes. + * + * @return An autoreleased Physics3DWorld object. + */ + static Physics3DWorld* create(Physics3DWorldDes* info); + + /** Add a Physics3DObject. */ + void addPhysics3DObject(Physics3DObject* physicsObj); + + /** Remove a Physics3DObject. */ + void removePhysics3DObject(Physics3DObject* physicsObj); + + /** Remove all Physics3DObjects. */ + void removeAllPhysics3DObjects(); + + /** Add a Physics3DConstraint. */ + void addPhysics3DConstraint(Physics3DConstraint* constraint, bool disableCollisionsBetweenLinkedObjs = true); + + /** Remove a Physics3DConstraint. */ + void removePhysics3DConstraint(Physics3DConstraint* constraint); + + /** Remove all Physics3DConstraint. */ + void removeAllPhysics3DConstraints(); + + /** Simulate one frame. */ + void stepSimulate(float dt); + + /** Enable or disable debug drawing. */ + void setDebugDrawEnable(bool enableDebugDraw); + + /** Check debug drawing is enabled. */ + bool isDebugDrawEnabled() const; + + /** Internal method, the updater of debug drawing, need called each frame. */ + void debugDraw(cocos2d::Renderer* renderer); + + /** Get the list of Physics3DObjects. */ + const std::vector& getPhysicsObjects() const { return _objects; } + + /** + * Ray cast method + * @param startPos The start position of ray. + * @param endPos The end position of ray. + * @param result the result of ray cast. + */ + bool rayCast(const cocos2d::Vec3& startPos, const cocos2d::Vec3& endPos, HitResult* result); + + /** Performs a swept shape cast on all objects in the Physics3DWorld. */ + bool sweepShape(Physics3DShape* shape, const cocos2d::Mat4& startTransform, const cocos2d::Mat4& endTransform, HitResult* result); + +CC_CONSTRUCTOR_ACCESS: + + Physics3DWorld(); + virtual ~Physics3DWorld(); + + bool init(Physics3DWorldDes* info); + + Physics3DObject* getPhysicsObject(const btCollisionObject* btObj); + + void collisionChecking(); + bool needCollisionChecking(); + +protected: + std::vector _objects; + std::vector _physicsComponents; //physics3d components + bool _needCollisionChecking; + bool _collisionCheckingFlag; + +#if (CC_ENABLE_BULLET_INTEGRATION) + btDynamicsWorld* _btPhyiscsWorld; + btDefaultCollisionConfiguration* _collisionConfiguration; + btCollisionDispatcher* _dispatcher; + btDbvtBroadphase* _broadphase; + btSequentialImpulseConstraintSolver* _solver; + Physics3DDebugDrawer* _debugDrawer; +#endif // CC_ENABLE_BULLET_INTEGRATION +}; + +// end of 3d group +/// @} +NS_CC_END + +#endif + +#endif //CC_USE_3D_PHYSICS + +#endif // __PHYSICS_3D_WORLD_H__ diff --git a/cocos/physics3d/CCPhysicsSprite3D.cpp b/cocos/physics3d/CCPhysicsSprite3D.cpp new file mode 100644 index 0000000000..e9f2a94d0b --- /dev/null +++ b/cocos/physics3d/CCPhysicsSprite3D.cpp @@ -0,0 +1,86 @@ +/**************************************************************************** + Copyright (c) 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 "CCPhysics3D.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +NS_CC_BEGIN + +PhysicsSprite3D* PhysicsSprite3D::create(const std::string &modelPath, Physics3DRigidBodyDes* rigidDes, const cocos2d::Vec3& translateInPhysics, const cocos2d::Quaternion& rotInPhsyics) +{ + auto ret = new PhysicsSprite3D(); + if (ret && ret->initWithFile(modelPath)) + { + auto obj = Physics3DRigidBody::create(rigidDes); + ret->_physicsComponent = Physics3DComponent::create(obj); + ret->addComponent(ret->_physicsComponent); + ret->_contentSize = ret->getBoundingBox().size; + ret->autorelease(); + return ret; + } + CC_SAFE_DELETE(ret); + return ret; +} + +Physics3DObject* PhysicsSprite3D::getPhysicsObj() const +{ + return _physicsComponent->getPhysics3DObject(); +} + +void PhysicsSprite3D::setSyncFlag(Physics3DComponent::PhysicsSyncFlag syncFlag) +{ + if (_physicsComponent) + _physicsComponent->setSyncFlag(syncFlag); +} + +void PhysicsSprite3D::syncToPhysics() +{ + if (_physicsComponent) + _physicsComponent->syncToPhysics(); +} + +void PhysicsSprite3D::syncToNode() +{ + if (_physicsComponent) + _physicsComponent->syncToNode(); +} + +PhysicsSprite3D::PhysicsSprite3D() +: _physicsComponent(nullptr) +{ + +} +PhysicsSprite3D::~PhysicsSprite3D() +{ + +} + +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif // CC_USE_3D_PHYSICS diff --git a/cocos/physics3d/CCPhysicsSprite3D.h b/cocos/physics3d/CCPhysicsSprite3D.h new file mode 100644 index 0000000000..e67ff584ea --- /dev/null +++ b/cocos/physics3d/CCPhysicsSprite3D.h @@ -0,0 +1,81 @@ +/**************************************************************************** + Copyright (c) 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. + ****************************************************************************/ + +#ifndef __PHYSICS_SPRITE_3D_H__ +#define __PHYSICS_SPRITE_3D_H__ + +#include "base/ccConfig.h" +#include "3d/CCSprite3D.h" +#include "CCPhysics3DObject.h" +#include "CCPhysics3DComponent.h" + +#if CC_USE_3D_PHYSICS + +#if (CC_ENABLE_BULLET_INTEGRATION) + +NS_CC_BEGIN +/** + * @addtogroup _3d + * @{ + */ + + /** + * @brief Convenient class to create a rigid body with Sprite3D + */ +class CC_DLL PhysicsSprite3D : public cocos2d::Sprite3D +{ +public: + + /** creates a PhysicsSprite3D*/ + static PhysicsSprite3D* create(const std::string &modelPath, Physics3DRigidBodyDes* rigidDes, const cocos2d::Vec3& translateInPhysics = cocos2d::Vec3::ZERO, const cocos2d::Quaternion& rotInPhsyics = cocos2d::Quaternion::ZERO); + + /** Get the Physics3DObject. */ + Physics3DObject* getPhysicsObj() const; + + /** Set synchronization flag, see Physics3DComponent. */ + void setSyncFlag(Physics3DComponent::PhysicsSyncFlag syncFlag); + + /** Physics synchronize rendering. */ + void syncToPhysics(); + + /** Rendering synchronize physics. */ + void syncToNode(); + +CC_CONSTRUCTOR_ACCESS: + PhysicsSprite3D(); + virtual ~PhysicsSprite3D(); + +protected: + Physics3DComponent* _physicsComponent; +}; + +// end of 3d group +/// @} +NS_CC_END + +#endif // CC_ENABLE_BULLET_INTEGRATION + +#endif // CC_USE_3D_PHYSICS + +#endif // __PHYSICS_SPRITE_3D_H__ diff --git a/cocos/physics3d/CMakeLists.txt b/cocos/physics3d/CMakeLists.txt new file mode 100644 index 0000000000..6e685d725e --- /dev/null +++ b/cocos/physics3d/CMakeLists.txt @@ -0,0 +1,12 @@ + +set(COCOS_PHYSICS3D_SRC + + physics3d/CCPhysics3D.cpp + physics3d/CCPhysics3DComponent.cpp + physics3d/CCPhysics3DConstraint.cpp + physics3d/CCPhysics3DDebugDrawer.cpp + physics3d/CCPhysics3DObject.cpp + physics3d/CCPhysics3DShape.cpp + physics3d/CCPhysics3DWorld.cpp + physics3d/CCPhysicsSprite3D.cpp +) diff --git a/cocos/platform/CCApplication.h b/cocos/platform/CCApplication.h index 56bee474fd..27e3d499c0 100644 --- a/cocos/platform/CCApplication.h +++ b/cocos/platform/CCApplication.h @@ -37,7 +37,7 @@ THE SOFTWARE. #include "platform/android/CCApplication-android.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCApplication-win32.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #include "platform/winrt/CCApplication.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCApplication-linux.h" diff --git a/cocos/platform/CCFileUtils.cpp b/cocos/platform/CCFileUtils.cpp index e3a73199bc..e1599b8082 100644 --- a/cocos/platform/CCFileUtils.cpp +++ b/cocos/platform/CCFileUtils.cpp @@ -41,7 +41,7 @@ THE SOFTWARE. #endif #include -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include #endif @@ -49,7 +49,7 @@ THE SOFTWARE. #include #endif -#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 #include @@ -561,12 +561,13 @@ static Data getData(const std::string& filename, bool forString) mode = "rt"; else mode = "rb"; - + + auto fileutils = FileUtils::getInstance(); do { // Read the file from hardware - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(filename); - FILE *fp = fopen(FileUtils::getInstance()->getSuitableFOpen(fullPath).c_str(), mode); + std::string fullPath = fileutils->fullPathForFilename(filename); + FILE *fp = fopen(fileutils->getSuitableFOpen(fullPath).c_str(), mode); CC_BREAK_IF(!fp); fseek(fp,0,SEEK_END); size = ftell(fp); @@ -593,9 +594,7 @@ static Data getData(const std::string& filename, bool forString) if (nullptr == buffer || 0 == readsize) { - std::string msg = "Get data from file("; - msg.append(filename).append(") failed!"); - CCLOG("%s", msg.c_str()); + CCLOG("Get data from file %s failed", filename.c_str()); } else { @@ -982,7 +981,7 @@ bool FileUtils::isAbsolutePath(const std::string& path) const bool FileUtils::isDirectoryExistInternal(const std::string& dirPath) const { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) WIN32_FILE_ATTRIBUTE_DATA wfad; std::wstring wdirPath(dirPath.begin(), dirPath.end()); if (GetFileAttributesEx(wdirPath.c_str(), GetFileExInfoStandard, &wfad)) @@ -1078,7 +1077,7 @@ bool FileUtils::createDirectory(const std::string& path) } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) WIN32_FILE_ATTRIBUTE_DATA wfad; std::wstring wpath(path.begin(), path.end()); if (!(GetFileAttributesEx(wpath.c_str(), GetFileExInfoStandard, &wfad))) @@ -1172,7 +1171,7 @@ bool FileUtils::removeDirectory(const std::string& path) // Remove downloaded files -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) std::wstring wpath = std::wstring(path.begin(), path.end()); std::wstring files = wpath + L"*.*"; WIN32_FIND_DATA wfd; @@ -1236,7 +1235,7 @@ bool FileUtils::removeFile(const std::string &path) { // Remove downloaded file -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) std::wstring wpath(path.begin(), path.end()); if (DeleteFile(wpath.c_str())) { @@ -1276,7 +1275,7 @@ bool FileUtils::renameFile(const std::string &path, const std::string &oldname, std::string newPath = path + name; // Rename a file -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) std::regex pat("\\/"); std::string _old = std::regex_replace(oldPath, pat, "\\"); std::string _new = std::regex_replace(newPath, pat, "\\"); @@ -1364,7 +1363,7 @@ bool FileUtils::isPopupNotify() const return s_popupNotify; } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) static std::wstring StringUtf8ToWideChar(const std::string& strUtf8) { std::wstring ret; diff --git a/cocos/platform/CCGL.h b/cocos/platform/CCGL.h index e42f7128f4..9c754d2659 100644 --- a/cocos/platform/CCGL.h +++ b/cocos/platform/CCGL.h @@ -37,7 +37,7 @@ THE SOFTWARE. #include "platform/android/CCGL-android.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCGL-win32.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #include "platform/winrt/CCGL.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCGL-linux.h" diff --git a/cocos/platform/CCGLView.h b/cocos/platform/CCGLView.h index 39f725d4ca..38f331f249 100644 --- a/cocos/platform/CCGLView.h +++ b/cocos/platform/CCGLView.h @@ -120,10 +120,6 @@ public: * @param open Open or close IME keyboard. */ virtual void setIMEKeyboardState(bool open) = 0; - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - virtual void setIMEKeyboardState(bool open, std::string str) = 0; -#endif /** When the window is closed, it will return false if the platforms is Ios or Android. * If the platforms is windows or Mac,it will return true. @@ -215,11 +211,6 @@ public: virtual void* getEAGLView() const { return nullptr; } #endif /* (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - virtual Size getRenerTargetSize() const = 0; - virtual const Mat4& getOrientationMatrix() const = 0; - virtual const Mat4& getReverseOrientationMatrix() const = 0; -#endif /** * Get the visible area size of opengl viewport. * diff --git a/cocos/platform/CCImage.cpp b/cocos/platform/CCImage.cpp index d18ae71fd8..ad85ccb88f 100644 --- a/cocos/platform/CCImage.cpp +++ b/cocos/platform/CCImage.cpp @@ -923,9 +923,9 @@ bool Image::encodeWithWIC(const std::string& filePath, bool isToRGB, GUID contai bool Image::initWithJpgData(const unsigned char * data, ssize_t dataLen) { -#if defined(CC_USE_WIC) +#if CC_USE_WIC return decodeWithWIC(data, dataLen); -#elif defined(CC_USE_JPEG) +#elif CC_USE_JPEG /* these are standard libjpeg structures for reading(decompression) */ struct jpeg_decompress_struct cinfo; /* We use our private extension JPEG error handler. @@ -1019,9 +1019,9 @@ bool Image::initWithJpgData(const unsigned char * data, ssize_t dataLen) bool Image::initWithPngData(const unsigned char * data, ssize_t dataLen) { -#if defined(CC_USE_WIC) +#if CC_USE_WIC return decodeWithWIC(data, dataLen); -#elif defined(CC_USE_PNG) +#elif CC_USE_PNG // length of bytes to check if it is a valid png file #define PNGSIGSIZE 8 bool ret = false; @@ -1288,9 +1288,9 @@ namespace bool Image::initWithTiffData(const unsigned char * data, ssize_t dataLen) { -#if defined(CC_USE_WIC) +#if CC_USE_WIC return decodeWithWIC(data, dataLen); -#elif defined(CC_USE_TIFF) +#elif CC_USE_TIFF bool ret = false; do { @@ -2138,7 +2138,7 @@ bool Image::initWithWebpData(const unsigned char * data, ssize_t dataLen) #if CC_USE_WEBP bool ret = false; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) CCLOG("WEBP image format not supported on WinRT or WP8"); #else do @@ -2173,7 +2173,7 @@ bool Image::initWithWebpData(const unsigned char * data, ssize_t dataLen) ret = true; } while (0); -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) return ret; #else CCLOG("webp is not enabled, please enable it in ccConfig.h"); @@ -2253,9 +2253,9 @@ bool Image::saveToFile(const std::string& filename, bool isToRGB) bool Image::saveImageToPNG(const std::string& filePath, bool isToRGB) { -#if defined(CC_USE_WIC) +#if CC_USE_WIC return encodeWithWIC(filePath, isToRGB, GUID_ContainerFormatPng); -#elif defined(CC_USE_PNG) +#elif CC_USE_PNG bool ret = false; do { @@ -2405,9 +2405,9 @@ bool Image::saveImageToPNG(const std::string& filePath, bool isToRGB) bool Image::saveImageToJPG(const std::string& filePath) { -#if defined(CC_USE_WIC) +#if CC_USE_WIC return encodeWithWIC(filePath, false, GUID_ContainerFormatJpeg); -#elif defined(CC_USE_JPEG) +#elif CC_USE_JPEG bool ret = false; do { diff --git a/cocos/platform/CCPlatformConfig.h b/cocos/platform/CCPlatformConfig.h index caceecb548..6531f0e54e 100644 --- a/cocos/platform/CCPlatformConfig.h +++ b/cocos/platform/CCPlatformConfig.h @@ -51,8 +51,7 @@ THE SOFTWARE. #define CC_PLATFORM_EMSCRIPTEN 10 #define CC_PLATFORM_TIZEN 11 #define CC_PLATFORM_QT5 12 -#define CC_PLATFORM_WP8 13 -#define CC_PLATFORM_WINRT 14 +#define CC_PLATFORM_WINRT 13 // Determine target platform by compile environment macro. #define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN @@ -129,19 +128,12 @@ THE SOFTWARE. #define CC_TARGET_PLATFORM CC_PLATFORM_QT5 #endif -// WinRT (Windows Store App) +// WinRT (Windows 8.1 Store/Phone App) #if defined(WINRT) #undef CC_TARGET_PLATFORM #define CC_TARGET_PLATFORM CC_PLATFORM_WINRT #endif -// WP8 (Windows Phone 8 App) -#if defined(WP8) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_WP8 -#endif - - ////////////////////////////////////////////////////////////////////////// // post configure ////////////////////////////////////////////////////////////////////////// diff --git a/cocos/platform/CCPlatformDefine.h b/cocos/platform/CCPlatformDefine.h index a336e99a38..786714eb0c 100644 --- a/cocos/platform/CCPlatformDefine.h +++ b/cocos/platform/CCPlatformDefine.h @@ -37,7 +37,7 @@ THE SOFTWARE. #include "platform/android/CCPlatformDefine-android.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCPlatformDefine-win32.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #include "platform/winrt/CCPlatformDefine-winrt.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCPlatformDefine-linux.h" diff --git a/cocos/platform/CCPlatformMacros.h b/cocos/platform/CCPlatformMacros.h index f150a1a490..48ecbeab1f 100644 --- a/cocos/platform/CCPlatformMacros.h +++ b/cocos/platform/CCPlatformMacros.h @@ -85,7 +85,7 @@ CC_DEPRECATED_ATTRIBUTE static __TYPE__* node() \ * * @since v0.99.5 */ -#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) #define CC_ENABLE_CACHE_TEXTURE_DATA 1 #else #define CC_ENABLE_CACHE_TEXTURE_DATA 0 diff --git a/cocos/platform/CCStdC.h b/cocos/platform/CCStdC.h index e821fa1a3a..f22fddff4b 100644 --- a/cocos/platform/CCStdC.h +++ b/cocos/platform/CCStdC.h @@ -36,7 +36,7 @@ THE SOFTWARE. #include "platform/android/CCStdC-android.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCStdC-win32.h" -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #include "platform/winrt/CCStdC.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCStdC-linux.h" diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxLocalStorage.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxLocalStorage.java index 11eab6f64a..d2dc8e7c04 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxLocalStorage.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxLocalStorage.java @@ -101,6 +101,15 @@ public class Cocos2dxLocalStorage { } } + public static void clear() { + try { + String sql = "delete from "+TABLE_NAME; + mDatabase.execSQL(sql); + } catch (Exception e) { + e.printStackTrace(); + } + } + /** * This creates/opens the database. diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java index f4b1ad83aa..e4518a502c 100755 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java @@ -58,11 +58,16 @@ public class Cocos2dxWebView extends WebView { class Cocos2dxWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String urlString) { - URI uri = URI.create(urlString); - if (uri != null && uri.getScheme().equals(mJSScheme)) { - Cocos2dxWebViewHelper._onJsCallback(mViewTag, urlString); - return true; + try { + URI uri = URI.create(urlString); + if (uri != null && uri.getScheme().equals(mJSScheme)) { + Cocos2dxWebViewHelper._onJsCallback(mViewTag, urlString); + return true; + } + } catch (Exception e) { + Log.d(TAG, "Failed to create URI from url"); } + return Cocos2dxWebViewHelper._shouldStartLoading(mViewTag, urlString); } diff --git a/cocos/platform/android/javaactivity-android.cpp b/cocos/platform/android/javaactivity-android.cpp index 488fe4dd01..5f710fd765 100644 --- a/cocos/platform/android/javaactivity-android.cpp +++ b/cocos/platform/android/javaactivity-android.cpp @@ -49,14 +49,14 @@ using namespace cocos2d; extern "C" { -jint JNI_OnLoad(JavaVM *vm, void *reserved) +JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) { JniHelper::setJavaVM(vm); return JNI_VERSION_1_4; } -void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h) +JNIEXPORT void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h) { auto director = cocos2d::Director::getInstance(); auto glview = director->getOpenGLView(); @@ -83,7 +83,7 @@ void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thi } } -jintArray Java_org_cocos2dx_lib_Cocos2dxActivity_getGLContextAttrs(JNIEnv* env, jobject thiz) +JNIEXPORT jintArray Java_org_cocos2dx_lib_Cocos2dxActivity_getGLContextAttrs(JNIEnv* env, jobject thiz) { cocos_android_app_init(env, thiz); cocos2d::Application::getInstance()->initGLContextAttrs(); @@ -99,7 +99,7 @@ jintArray Java_org_cocos2dx_lib_Cocos2dxActivity_getGLContextAttrs(JNIEnv* env, return glContextAttrsJava; } -void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnSurfaceChanged(JNIEnv* env, jobject thiz, jint w, jint h) +JNIEXPORT void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnSurfaceChanged(JNIEnv* env, jobject thiz, jint w, jint h) { cocos2d::Application::getInstance()->applicationScreenSizeChanged(w, h); } diff --git a/cocos/platform/android/jni/CocosPlayClient.cpp b/cocos/platform/android/jni/CocosPlayClient.cpp index c9d934412f..13ecdf03bd 100644 --- a/cocos/platform/android/jni/CocosPlayClient.cpp +++ b/cocos/platform/android/jni/CocosPlayClient.cpp @@ -22,11 +22,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "CocosPlayClient.h" -#include "cocos2d.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include +#include +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include "jni/JniHelper.h" #include "platform/CCCommon.h" +#include "platform/CCFileUtils.h" using namespace cocos2d; diff --git a/cocos/platform/win32/CCStdC-win32.h b/cocos/platform/win32/CCStdC-win32.h index a900689c53..523c5e39da 100644 --- a/cocos/platform/win32/CCStdC-win32.h +++ b/cocos/platform/win32/CCStdC-win32.h @@ -49,9 +49,11 @@ typedef SSIZE_T ssize_t; #define isnan _isnan #endif +#if _MSC_VER < 1900 #ifndef snprintf #define snprintf _snprintf #endif +#endif #endif // __MINGW32__ diff --git a/cocos/platform/win8.1-universal/Cocos2dRenderer.cpp b/cocos/platform/win8.1-universal/Cocos2dRenderer.cpp index d8ffe6913b..85212dfded 100644 --- a/cocos/platform/win8.1-universal/Cocos2dRenderer.cpp +++ b/cocos/platform/win8.1-universal/Cocos2dRenderer.cpp @@ -149,4 +149,10 @@ void Cocos2dRenderer::QueueBackButtonEvent() GLViewImpl::sharedOpenGLView()->QueueBackKeyPress(); } +void Cocos2dRenderer::QueueKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args) +{ + GLViewImpl::sharedOpenGLView()->QueueWinRTKeyboardEvent(type, args); +} + + diff --git a/cocos/platform/win8.1-universal/Cocos2dRenderer.h b/cocos/platform/win8.1-universal/Cocos2dRenderer.h index cb513eaaae..b348c50043 100644 --- a/cocos/platform/win8.1-universal/Cocos2dRenderer.h +++ b/cocos/platform/win8.1-universal/Cocos2dRenderer.h @@ -34,8 +34,9 @@ namespace cocos2d 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 QueueBackButtonEvent(); + 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(); diff --git a/cocos/platform/win8.1-universal/OpenGLESPage.xaml.cpp b/cocos/platform/win8.1-universal/OpenGLESPage.xaml.cpp index b53511535b..fc4a36bc71 100644 --- a/cocos/platform/win8.1-universal/OpenGLESPage.xaml.cpp +++ b/cocos/platform/win8.1-universal/OpenGLESPage.xaml.cpp @@ -36,7 +36,7 @@ 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) +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 using namespace Windows::Phone::UI::Input; #endif @@ -63,6 +63,12 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : 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); @@ -78,6 +84,17 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : 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); @@ -87,6 +104,7 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : auto pointerVisualizationSettings = Windows::UI::Input::PointerVisualizationSettings::GetForCurrentView(); pointerVisualizationSettings->IsContactFeedbackEnabled = false; pointerVisualizationSettings->IsBarrelButtonFeedbackEnabled = false; +#endif #endif // Register our SwapChainPanel to get independent input pointer events @@ -104,13 +122,12 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : 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. + // 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() @@ -150,6 +167,38 @@ void OpenGLESPage::OnPointerReleased(Object^ sender, PointerEventArgs^ 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); @@ -168,7 +217,7 @@ void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Wi } } -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) +#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. @@ -217,7 +266,7 @@ void OpenGLESPage::GetSwapChainPanelSize(GLsizei* width, GLsizei* height) void OpenGLESPage::CreateRenderSurface() { - if (mOpenGLES) + if (mOpenGLES && mRenderSurface == EGL_NO_SURFACE) { // // A Custom render surface size can be specified by uncommenting the following lines. diff --git a/cocos/platform/win8.1-universal/OpenGLESPage.xaml.h b/cocos/platform/win8.1-universal/OpenGLESPage.xaml.h index 3f6eecc3b2..26e3ff1fe0 100644 --- a/cocos/platform/win8.1-universal/OpenGLESPage.xaml.h +++ b/cocos/platform/win8.1-universal/OpenGLESPage.xaml.h @@ -39,7 +39,7 @@ namespace cocos2d 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) +#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); @@ -71,6 +71,9 @@ namespace cocos2d 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); diff --git a/cocos/platform/winrt/CCApplication.h b/cocos/platform/winrt/CCApplication.h index f97c4896f3..bd08715aa9 100644 --- a/cocos/platform/winrt/CCApplication.h +++ b/cocos/platform/winrt/CCApplication.h @@ -26,7 +26,7 @@ THE SOFTWARE. #define __CC_APPLICATION_WINRT_H__ #include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "platform/CCStdC.h" #include "platform/CCCommon.h" @@ -111,6 +111,6 @@ protected: NS_CC_END -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #endif // __CC_APPLICATION_WINRT_H__ diff --git a/cocos/platform/winrt/CCCommon.cpp b/cocos/platform/winrt/CCCommon.cpp index f38615b3ab..8e6a59267c 100644 --- a/cocos/platform/winrt/CCCommon.cpp +++ b/cocos/platform/winrt/CCCommon.cpp @@ -26,10 +26,6 @@ THE SOFTWARE. #include "platform/CCStdC.h" #include "CCWinRTUtils.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || defined(WP8_SHADER_COMPILER) -#include "platform/wp8/CCGLViewImpl-wp8.h" -#endif - #if defined(VLD_DEBUG_MEMORY) #include #endif diff --git a/cocos/platform/winrt/CCDevice.cpp b/cocos/platform/winrt/CCDevice.cpp index 08360881dc..40b889cbce 100644 --- a/cocos/platform/winrt/CCDevice.cpp +++ b/cocos/platform/winrt/CCDevice.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. ****************************************************************************/ #include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "cocos2d.h" #include "platform/CCDevice.h" @@ -42,14 +42,7 @@ CCFreeTypeFont sFT; int Device::getDPI() { -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - static const float dipsPerInch = 96.0f; - return floor(DisplayProperties::LogicalDpi / dipsPerInch + 0.5f); // Round to nearest integer. -#elif defined WP8_SHADER_COMPILER - return 0; -#else return cocos2d::GLViewImpl::sharedOpenGLView()->GetDPI(); -#endif } static Accelerometer^ sAccelerometer = nullptr; @@ -211,4 +204,4 @@ void Device::setKeepScreenOn(bool value) NS_CC_END -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/platform/winrt/CCFreeTypeFont.cpp b/cocos/platform/winrt/CCFreeTypeFont.cpp index cb6e020ac8..6ce6ffac45 100644 --- a/cocos/platform/winrt/CCFreeTypeFont.cpp +++ b/cocos/platform/winrt/CCFreeTypeFont.cpp @@ -25,9 +25,7 @@ #include "base/CCDirector.h" #include "platform/CCFileUtils.h" -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) #include -#endif #include #include #include @@ -618,9 +616,6 @@ unsigned char* CCFreeTypeFont::loadFont(const char *pFontName, ssize_t *size) unsigned char* CCFreeTypeFont::loadSystemFont(const char *pFontName, ssize_t *size) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - return nullptr; -#else std::string aName(pFontName); unsigned char* pBuffer = nullptr; HRESULT hr = S_OK; @@ -752,7 +747,6 @@ unsigned char* CCFreeTypeFont::loadSystemFont(const char *pFontName, ssize_t *si } return pBuffer; -#endif } NS_CC_END diff --git a/cocos/platform/winrt/CCGLViewImpl-winrt.cpp b/cocos/platform/winrt/CCGLViewImpl-winrt.cpp index bb7ae1e7ff..b51461e658 100644 --- a/cocos/platform/winrt/CCGLViewImpl-winrt.cpp +++ b/cocos/platform/winrt/CCGLViewImpl-winrt.cpp @@ -31,9 +31,11 @@ THE SOFTWARE. #include "CCApplication.h" #include "CCWinRTUtils.h" #include "deprecated/CCNotificationCenter.h" +#include using namespace Platform; using namespace Concurrency; +using namespace Windows::System; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; using namespace Windows::Graphics::Display; @@ -68,7 +70,6 @@ GLViewImpl* GLViewImpl::create(const std::string& viewName) return nullptr; } - GLViewImpl::GLViewImpl() : _frameZoomFactor(1.0f) , _supportTouch(true) @@ -86,6 +87,8 @@ GLViewImpl::GLViewImpl() s_pEglView = this; _viewName = "cocos2dx"; + m_keyboard = ref new KeyBoardWinRT(); + m_backButtonListener = EventListenerKeyboard::create(); m_backButtonListener->onKeyReleased = CC_CALLBACK_2(GLViewImpl::BackButtonListener, this); Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(m_backButtonListener, INT_MAX); @@ -112,7 +115,6 @@ bool GLViewImpl::initWithFullScreen(const std::string& viewName) return initWithRect(viewName, Rect(0, 0, m_width, m_height), 1.0f); } - bool GLViewImpl::Create(float width, float height, float dpi, DisplayOrientations orientation) { m_orientation = orientation; @@ -131,8 +133,6 @@ void GLViewImpl::setPanel(Windows::UI::Xaml::Controls::Panel^ panel) m_panel = panel; } - - void GLViewImpl::setIMEKeyboardState(bool bOpen) { std::string str; @@ -157,34 +157,23 @@ bool GLViewImpl::ShowMessageBox(Platform::String^ title, Platform::String^ messa return false; } -void GLViewImpl::setIMEKeyboardState(bool bOpen, std::string str) +void GLViewImpl::setIMEKeyboardState(bool bOpen, const std::string& str) { if(bOpen) { - if (m_keyboard == nullptr) - { - m_keyboard = ref new KeyBoardWinRT(m_dispatcher.Get(), m_panel.Get()); - } m_keyboard->ShowKeyboard(PlatformStringFromString(str)); } else { - if (m_keyboard != nullptr) - { - m_keyboard->HideKeyboard(PlatformStringFromString(str)); - } - m_keyboard = nullptr; + m_keyboard->HideKeyboard(PlatformStringFromString(str)); } } - - void GLViewImpl::swapBuffers() { } - bool GLViewImpl::isOpenGLReady() { return true; @@ -196,7 +185,6 @@ void GLViewImpl::end() m_appShouldExit = true; } - void GLViewImpl::OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ args) { } @@ -215,36 +203,36 @@ void GLViewImpl::OnBackKeyPress() void GLViewImpl::BackButtonListener(EventKeyboard::KeyCode keyCode, Event* event) { - CCLOG("*********************************************************************"); - CCLOG("GLViewImpl::BackButtonListener: Exiting application!"); - CCLOG(""); - CCLOG("If you want to listen for Windows Phone back button events,"); - CCLOG("add a listener for EventKeyboard::KeyCode::KEY_ESCAPE"); - CCLOG("Make sure you call stopPropagation() on the Event if you don't"); - CCLOG("want your app to exit when the back button is pressed."); - CCLOG(""); - CCLOG("For example, add the following to your scene..."); - CCLOG("auto listener = EventListenerKeyboard::create();"); - CCLOG("listener->onKeyReleased = CC_CALLBACK_2(HelloWorld::onKeyReleased, this);"); - CCLOG("getEventDispatcher()->addEventListenerWithFixedPriority(listener, 1);"); - CCLOG(""); - CCLOG("void HelloWorld::onKeyReleased(EventKeyboard::KeyCode keyCode, Event* event)"); - CCLOG("{"); - CCLOG(" if (keyCode == EventKeyboard::KeyCode::KEY_ESCAPE)"); - CCLOG(" {"); - CCLOG(" if (myAppShouldNotQuit) // or whatever logic you want..."); - CCLOG(" {"); - CCLOG(" event->stopPropagation();"); - CCLOG(" }"); - CCLOG(" }"); - CCLOG("}"); - CCLOG(""); - CCLOG("You MUST call event->stopPropagation() if you don't want your app to quit!"); - CCLOG("*********************************************************************"); + if (keyCode == EventKeyboard::KeyCode::KEY_ESCAPE) + { + CCLOG("*********************************************************************"); + CCLOG("GLViewImpl::BackButtonListener: Exiting application!"); + CCLOG(""); + CCLOG("If you want to listen for Windows Phone back button events,"); + CCLOG("add a listener for EventKeyboard::KeyCode::KEY_ESCAPE"); + CCLOG("Make sure you call stopPropagation() on the Event if you don't"); + CCLOG("want your app to exit when the back button is pressed."); + CCLOG(""); + CCLOG("For example, add the following to your scene..."); + CCLOG("auto listener = EventListenerKeyboard::create();"); + CCLOG("listener->onKeyReleased = CC_CALLBACK_2(HelloWorld::onKeyReleased, this);"); + CCLOG("getEventDispatcher()->addEventListenerWithFixedPriority(listener, 1);"); + CCLOG(""); + CCLOG("void HelloWorld::onKeyReleased(EventKeyboard::KeyCode keyCode, Event* event)"); + CCLOG("{"); + CCLOG(" if (keyCode == EventKeyboard::KeyCode::KEY_ESCAPE)"); + CCLOG(" {"); + CCLOG(" if (myAppShouldNotQuit) // or whatever logic you want..."); + CCLOG(" {"); + CCLOG(" event->stopPropagation();"); + CCLOG(" }"); + CCLOG(" }"); + CCLOG("}"); + CCLOG(""); + CCLOG("You MUST call event->stopPropagation() if you don't want your app to quit!"); + CCLOG("*********************************************************************"); - if (keyCode == EventKeyboard::KeyCode::KEY_ESCAPE) - { - Director::getInstance()->end(); + Director::getInstance()->end(); } } @@ -510,6 +498,17 @@ void GLViewImpl::QueuePointerEvent(PointerEventType type, PointerEventArgs^ args mInputEvents.push(e); } +void GLViewImpl::QueueWinRTKeyboardEvent(WinRTKeyboardEventType type, KeyEventArgs^ args) +{ + std::shared_ptr e(new WinRTKeyboardEvent(type, args)); + mInputEvents.push(e); +} + +void GLViewImpl::OnWinRTKeyboardEvent(WinRTKeyboardEventType type, KeyEventArgs^ args) +{ + m_keyboard->OnWinRTKeyboardEvent(type, args); +} + void GLViewImpl::QueueEvent(std::shared_ptr& event) { mInputEvents.push(event); diff --git a/cocos/platform/winrt/CCGLViewImpl-winrt.h b/cocos/platform/winrt/CCGLViewImpl-winrt.h index 6a82918f46..badc71a1f2 100644 --- a/cocos/platform/winrt/CCGLViewImpl-winrt.h +++ b/cocos/platform/winrt/CCGLViewImpl-winrt.h @@ -59,7 +59,7 @@ public: Size getRenerTargetSize() const { return Size(m_width, m_height); } virtual void setIMEKeyboardState(bool bOpen); - virtual void setIMEKeyboardState(bool bOpen, std::string str); + virtual void setIMEKeyboardState(bool bOpen, const std::string& str); virtual bool Create(float width, float height, float dpi, Windows::Graphics::Display::DisplayOrientations orientation); @@ -72,6 +72,9 @@ public: void OnPointerPressed(Windows::UI::Core::PointerEventArgs^ args); void OnPointerMoved(Windows::UI::Core::PointerEventArgs^ args); void OnPointerReleased(Windows::UI::Core::PointerEventArgs^ args); + void OnWinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); + + void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args); void OnPointerMoved(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args); @@ -85,8 +88,9 @@ public: void BackButtonListener(cocos2d::EventKeyboard::KeyCode keyCode, cocos2d::Event* event); void QueueBackKeyPress(); - void QueuePointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); - void QueueEvent(std::shared_ptr& event); + void QueuePointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); + void QueueWinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); + void QueueEvent(std::shared_ptr& event); bool ShowMessageBox(Platform::String^ title, Platform::String^ message); diff --git a/cocos/platform/winrt/CCPrecompiledShaders.cpp b/cocos/platform/winrt/CCPrecompiledShaders.cpp index 472c8f248a..c835e7ee93 100644 --- a/cocos/platform/winrt/CCPrecompiledShaders.cpp +++ b/cocos/platform/winrt/CCPrecompiledShaders.cpp @@ -27,13 +27,6 @@ THE SOFTWARE. #include "renderer/CCGLProgram.h" #include "sha1.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#include "platform/winrt/shaders/precompiledshaders.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) -#include "platform/wp8/shaders/precompiledshaders.h" -#endif - - using namespace Windows::Graphics::Display; using namespace Windows::Storage; using namespace Platform; diff --git a/cocos/platform/winrt/CCStdC.h b/cocos/platform/winrt/CCStdC.h index ebb6375854..5299b25893 100644 --- a/cocos/platform/winrt/CCStdC.h +++ b/cocos/platform/winrt/CCStdC.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __CC_STD_C_H__ #include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #include "platform/CCPlatformMacros.h" @@ -108,7 +108,7 @@ struct timezone int CC_DLL gettimeofday(struct timeval *, struct timezone *); -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #endif // __CC_STD_C_H__ diff --git a/cocos/platform/winrt/CCWinRTUtils.cpp b/cocos/platform/winrt/CCWinRTUtils.cpp index 853d20f9a2..0e4c113f11 100644 --- a/cocos/platform/winrt/CCWinRTUtils.cpp +++ b/cocos/platform/winrt/CCWinRTUtils.cpp @@ -32,10 +32,8 @@ THE SOFTWARE. #include #include -#if CC_TARGET_PLATFORM != CC_PLATFORM_WP8 using namespace Windows::UI::Xaml; using namespace Windows::UI::Xaml::Controls; -#endif NS_CC_BEGIN @@ -106,7 +104,6 @@ Platform::String^ PlatformStringFromString(const std::string& s) return ref new Platform::String(ws.data(), ws.length()); } -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 // Method to convert a length in device-independent pixels (DIPs) to a length in physical pixels. float ConvertDipsToPixels(float dips) { @@ -118,7 +115,6 @@ float getScaledDPIValue(float v) { auto dipFactor = DisplayProperties::LogicalDpi / 96.0f; return v * dipFactor; } -#endif void CC_DLL CCLogIPAddresses() @@ -158,7 +154,6 @@ std::string CC_DLL getDeviceIPAddresses() return result.str(); } -#if CC_TARGET_PLATFORM != CC_PLATFORM_WP8 Platform::Object^ findXamlElement(Platform::Object^ parent, Platform::String^ name) { if (parent == nullptr || name == nullptr || name->Length() == 0) @@ -253,43 +248,6 @@ bool replaceXamlElement(Platform::Object^ parent, Platform::Object^ add, Platfor return true; } -#endif - - - - - - - - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - -// Function that reads from a binary file asynchronously. -Concurrency::task^> ReadDataAsync(Platform::String^ filename) -{ - using namespace Windows::Storage; - using namespace Concurrency; - - auto folder = Windows::ApplicationModel::Package::Current->InstalledLocation; - - return create_task(folder->GetFileAsync(filename)).then([] (StorageFile^ file) - { - return file->OpenReadAsync(); - }).then([] (Streams::IRandomAccessStreamWithContentType^ stream) - { - unsigned int bufferSize = static_cast(stream->Size); - auto fileBuffer = ref new Streams::Buffer(bufferSize); - return stream->ReadAsync(fileBuffer, bufferSize, Streams::InputStreamOptions::None); - }).then([] (Streams::IBuffer^ fileBuffer) -> Platform::Array^ - { - auto fileData = ref new Platform::Array(fileBuffer->Length); - Streams::DataReader::FromBuffer(fileBuffer)->ReadBytes(fileData); - return fileData; - }); -} -#else - - // Function that reads from a binary file asynchronously. Concurrency::task^> ReadDataAsync(Platform::String^ path) @@ -310,8 +268,4 @@ Concurrency::task^> ReadDataAsync(Platform::String^ path) } - -#endif - - NS_CC_END diff --git a/cocos/platform/winrt/CCWinRTUtils.h b/cocos/platform/winrt/CCWinRTUtils.h index 19a229a233..986fb0dc90 100644 --- a/cocos/platform/winrt/CCWinRTUtils.h +++ b/cocos/platform/winrt/CCWinRTUtils.h @@ -40,21 +40,13 @@ NS_CC_BEGIN std::wstring CC_DLL CCUtf8ToUnicode(const char * pszUtf8Str, unsigned len = -1); std::string CC_DLL CCUnicodeToUtf8(const wchar_t* pwszStr); -#if CC_TARGET_PLATFORM != CC_PLATFORM_WP8 Platform::Object^ findXamlElement(Platform::Object^ parent, Platform::String^ name); bool removeXamlElement(Platform::Object^ parent, Platform::Object^ element); bool replaceXamlElement(Platform::Object^ parent, Platform::Object^ add, Platform::Object^ remove); -#endif std::string PlatformStringToString(Platform::String^ s); Platform::String^ PlatformStringFromString(const std::string& s); -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 -// Method to convert a length in device-independent pixels (DIPs) to a length in physical pixels. -float ConvertDipsToPixels(float dips); -float getScaledDPIValue(float v); -#endif - Concurrency::task^> ReadDataAsync(Platform::String^ path); void CC_DLL CCLogIPAddresses(); diff --git a/cocos/platform/winrt/InputEvent.cpp b/cocos/platform/winrt/InputEvent.cpp index 4a443d3dca..defe52f4c7 100644 --- a/cocos/platform/winrt/InputEvent.cpp +++ b/cocos/platform/winrt/InputEvent.cpp @@ -25,13 +25,7 @@ THE SOFTWARE. #include "InputEvent.h" #include "CCWinRTUtils.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 -#include "CCGLViewImpl-wp8.h" -#else #include "CCGLViewImpl-winrt.h" -#endif - #include "base/CCEventAcceleration.h" NS_CC_BEGIN @@ -117,6 +111,15 @@ void KeyboardEvent::execute() } } +WinRTKeyboardEvent::WinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args) + : m_type(type), m_key(args) +{ +} + +void WinRTKeyboardEvent::execute() +{ + GLViewImpl::sharedOpenGLView()->OnWinRTKeyboardEvent(m_type, m_key.Get()); +} BackButtonEvent::BackButtonEvent() { diff --git a/cocos/platform/winrt/InputEvent.h b/cocos/platform/winrt/InputEvent.h index 017c3b92fa..54d2f3cd53 100644 --- a/cocos/platform/winrt/InputEvent.h +++ b/cocos/platform/winrt/InputEvent.h @@ -88,6 +88,24 @@ private: Platform::Agile m_text; }; +enum WinRTKeyboardEventType +{ + KeyPressed, + KeyReleased, +}; + +class CC_DLL WinRTKeyboardEvent : public InputEvent +{ +public: + WinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); + virtual void execute(); + +private: + WinRTKeyboardEventType m_type; + Platform::Agile m_key; +}; + + class CC_DLL BackButtonEvent : public InputEvent { public: diff --git a/cocos/platform/winrt/Keyboard-winrt.cpp b/cocos/platform/winrt/Keyboard-winrt.cpp index 24c347aed9..f844159b36 100644 --- a/cocos/platform/winrt/Keyboard-winrt.cpp +++ b/cocos/platform/winrt/Keyboard-winrt.cpp @@ -40,9 +40,165 @@ using namespace Windows::UI::Xaml::Input; NS_CC_BEGIN +struct keyCodeItem +{ + int key; + EventKeyboard::KeyCode keyCode; +}; + +static std::map g_keyCodeMap; + +// http://www.kbdedit.com/manual/low_level_vk_list.html +// https://msdn.microsoft.com/library/windows/apps/windows.system.virtualkey.aspx + +static keyCodeItem g_keyCodeStructArray [] = { + /* The unknown key */ + { (int) VirtualKey::None, EventKeyboard::KeyCode::KEY_NONE }, + /* Printable keys */ + { (int) VirtualKey::Space, EventKeyboard::KeyCode::KEY_SPACE }, + { (int) VK_OEM_7, EventKeyboard::KeyCode::KEY_APOSTROPHE }, + { (int) VK_OEM_COMMA, EventKeyboard::KeyCode::KEY_COMMA }, + { (int) VK_OEM_MINUS, EventKeyboard::KeyCode::KEY_MINUS }, + { (int) VK_OEM_PERIOD, EventKeyboard::KeyCode::KEY_PERIOD }, + { (int) VK_OEM_2, EventKeyboard::KeyCode::KEY_SLASH }, + { (int) VK_OEM_3, EventKeyboard::KeyCode::KEY_TILDE }, + + { (int) VirtualKey::Number0, EventKeyboard::KeyCode::KEY_0 }, + { (int) VirtualKey::Number1, EventKeyboard::KeyCode::KEY_1 }, + { (int) VirtualKey::Number2, EventKeyboard::KeyCode::KEY_2 }, + { (int) VirtualKey::Number3, EventKeyboard::KeyCode::KEY_3 }, + { (int) VirtualKey::Number4, EventKeyboard::KeyCode::KEY_4 }, + { (int) VirtualKey::Number5, EventKeyboard::KeyCode::KEY_5 }, + { (int) VirtualKey::Number6, EventKeyboard::KeyCode::KEY_6 }, + { (int) VirtualKey::Number7, EventKeyboard::KeyCode::KEY_7 }, + { (int) VirtualKey::Number8, EventKeyboard::KeyCode::KEY_8 }, + { (int) VirtualKey::Number9, EventKeyboard::KeyCode::KEY_9 }, + { (int) VK_OEM_1, EventKeyboard::KeyCode::KEY_SEMICOLON }, + { (int) VK_OEM_PLUS, EventKeyboard::KeyCode::KEY_EQUAL }, + { (int) VirtualKey::A, EventKeyboard::KeyCode::KEY_A }, + { (int) VirtualKey::B, EventKeyboard::KeyCode::KEY_B }, + { (int) VirtualKey::C, EventKeyboard::KeyCode::KEY_C }, + { (int) VirtualKey::D, EventKeyboard::KeyCode::KEY_D }, + { (int) VirtualKey::E, EventKeyboard::KeyCode::KEY_E }, + { (int) VirtualKey::F, EventKeyboard::KeyCode::KEY_F }, + { (int) VirtualKey::G, EventKeyboard::KeyCode::KEY_G }, + { (int) VirtualKey::H, EventKeyboard::KeyCode::KEY_H }, + { (int) VirtualKey::I, EventKeyboard::KeyCode::KEY_I }, + { (int) VirtualKey::J, EventKeyboard::KeyCode::KEY_J }, + { (int) VirtualKey::K, EventKeyboard::KeyCode::KEY_K }, + { (int) VirtualKey::L, EventKeyboard::KeyCode::KEY_L }, + { (int) VirtualKey::M, EventKeyboard::KeyCode::KEY_M }, + { (int) VirtualKey::N, EventKeyboard::KeyCode::KEY_N }, + { (int) VirtualKey::O, EventKeyboard::KeyCode::KEY_O }, + { (int) VirtualKey::P, EventKeyboard::KeyCode::KEY_P }, + { (int) VirtualKey::Q, EventKeyboard::KeyCode::KEY_Q }, + { (int) VirtualKey::R, EventKeyboard::KeyCode::KEY_R }, + { (int) VirtualKey::S, EventKeyboard::KeyCode::KEY_S }, + { (int) VirtualKey::T, EventKeyboard::KeyCode::KEY_T }, + { (int) VirtualKey::U, EventKeyboard::KeyCode::KEY_U }, + { (int) VirtualKey::V, EventKeyboard::KeyCode::KEY_V }, + { (int) VirtualKey::W, EventKeyboard::KeyCode::KEY_W }, + { (int) VirtualKey::X, EventKeyboard::KeyCode::KEY_X }, + { (int) VirtualKey::Y, EventKeyboard::KeyCode::KEY_Y }, + { (int) VirtualKey::Z, EventKeyboard::KeyCode::KEY_Z }, + { VK_OEM_4, EventKeyboard::KeyCode::KEY_LEFT_BRACKET }, + { VK_OEM_5, EventKeyboard::KeyCode::KEY_BACK_SLASH }, + { VK_OEM_6, EventKeyboard::KeyCode::KEY_RIGHT_BRACKET }, + // { GLFW_KEY_GRAVE_ACCENT , EventKeyboard::KeyCode::KEY_GRAVE }, + + /* Function keys */ + { (int) VirtualKey::Escape, EventKeyboard::KeyCode::KEY_ESCAPE }, + { (int) VirtualKey::Enter, EventKeyboard::KeyCode::KEY_ENTER }, + { (int) VirtualKey::Tab, EventKeyboard::KeyCode::KEY_TAB }, + { (int) VirtualKey::Back, EventKeyboard::KeyCode::KEY_BACKSPACE }, + { (int) VirtualKey::Insert, EventKeyboard::KeyCode::KEY_INSERT }, + { (int) VirtualKey::Delete, EventKeyboard::KeyCode::KEY_DELETE }, + { (int) VirtualKey::Right, EventKeyboard::KeyCode::KEY_RIGHT_ARROW }, + { (int) VirtualKey::Left, EventKeyboard::KeyCode::KEY_LEFT_ARROW }, + { (int) VirtualKey::Down, EventKeyboard::KeyCode::KEY_DOWN_ARROW }, + { (int) VirtualKey::Up, EventKeyboard::KeyCode::KEY_UP_ARROW }, + { VK_PRIOR, EventKeyboard::KeyCode::KEY_KP_PG_UP }, + { VK_NEXT, EventKeyboard::KeyCode::KEY_KP_PG_DOWN }, + { VK_HOME, EventKeyboard::KeyCode::KEY_KP_HOME }, + { VK_END, EventKeyboard::KeyCode::KEY_END }, + { VK_CAPITAL, EventKeyboard::KeyCode::KEY_CAPS_LOCK }, + { VK_SCROLL, EventKeyboard::KeyCode::KEY_SCROLL_LOCK }, + { VK_NUMLOCK, EventKeyboard::KeyCode::KEY_NUM_LOCK }, + { VK_SNAPSHOT, EventKeyboard::KeyCode::KEY_PRINT }, + { VK_PAUSE, EventKeyboard::KeyCode::KEY_PAUSE }, + { (int) VirtualKey::F1, EventKeyboard::KeyCode::KEY_F1 }, + { (int) VirtualKey::F2, EventKeyboard::KeyCode::KEY_F2 }, + { (int) VirtualKey::F3, EventKeyboard::KeyCode::KEY_F3 }, + { (int) VirtualKey::F4, EventKeyboard::KeyCode::KEY_F4 }, + { (int) VirtualKey::F5, EventKeyboard::KeyCode::KEY_F5 }, + { (int) VirtualKey::F6, EventKeyboard::KeyCode::KEY_F6 }, + { (int) VirtualKey::F7, EventKeyboard::KeyCode::KEY_F7 }, + { (int) VirtualKey::F8, EventKeyboard::KeyCode::KEY_F8 }, + { (int) VirtualKey::F9, EventKeyboard::KeyCode::KEY_F9 }, + { (int) VirtualKey::F10, EventKeyboard::KeyCode::KEY_F10 }, + { (int) VirtualKey::F11, EventKeyboard::KeyCode::KEY_F11 }, + { (int) VirtualKey::F12, EventKeyboard::KeyCode::KEY_F12 }, + { (int) VirtualKey::F13, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F14, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F15, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F16, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F17, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F18, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F19, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F20, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F21, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F22, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F23, EventKeyboard::KeyCode::KEY_NONE }, + { (int) VirtualKey::F24, EventKeyboard::KeyCode::KEY_NONE }, + + { (int) VirtualKey::NumberPad0, EventKeyboard::KeyCode::KEY_0 }, + { (int) VirtualKey::NumberPad1, EventKeyboard::KeyCode::KEY_1 }, + { (int) VirtualKey::NumberPad2, EventKeyboard::KeyCode::KEY_2 }, + { (int) VirtualKey::NumberPad3, EventKeyboard::KeyCode::KEY_3 }, + { (int) VirtualKey::NumberPad4, EventKeyboard::KeyCode::KEY_4 }, + { (int) VirtualKey::NumberPad5, EventKeyboard::KeyCode::KEY_5 }, + { (int) VirtualKey::NumberPad6, EventKeyboard::KeyCode::KEY_6 }, + { (int) VirtualKey::NumberPad7, EventKeyboard::KeyCode::KEY_7 }, + { (int) VirtualKey::NumberPad8, EventKeyboard::KeyCode::KEY_8 }, + { (int) VirtualKey::NumberPad9, EventKeyboard::KeyCode::KEY_9 }, +#if 0 + { GLFW_KEY_KP_1, EventKeyboard::KeyCode::KEY_1 }, + { GLFW_KEY_KP_2, EventKeyboard::KeyCode::KEY_2 }, + { GLFW_KEY_KP_3, EventKeyboard::KeyCode::KEY_3 }, + { GLFW_KEY_KP_4, EventKeyboard::KeyCode::KEY_4 }, + { GLFW_KEY_KP_5, EventKeyboard::KeyCode::KEY_5 }, + { GLFW_KEY_KP_6, EventKeyboard::KeyCode::KEY_6 }, + { GLFW_KEY_KP_7, EventKeyboard::KeyCode::KEY_7 }, + { GLFW_KEY_KP_8, EventKeyboard::KeyCode::KEY_8 }, + { GLFW_KEY_KP_9, EventKeyboard::KeyCode::KEY_9 }, +#endif + { (int) VirtualKey::Decimal, EventKeyboard::KeyCode::KEY_PERIOD }, + { (int) VirtualKey::Divide, EventKeyboard::KeyCode::KEY_KP_DIVIDE }, + { (int) VirtualKey::Multiply, EventKeyboard::KeyCode::KEY_KP_MULTIPLY }, + { (int) VirtualKey::Subtract, EventKeyboard::KeyCode::KEY_KP_MINUS }, + { (int) VirtualKey::Add, EventKeyboard::KeyCode::KEY_KP_PLUS }, + //{ GLFW_KEY_KP_ENTER , EventKeyboard::KeyCode::KEY_KP_ENTER }, + //{ GLFW_KEY_KP_EQUAL , EventKeyboard::KeyCode::KEY_EQUAL }, + { (int) VirtualKey::Shift, EventKeyboard::KeyCode::KEY_LEFT_SHIFT }, + { (int) VirtualKey::Control, EventKeyboard::KeyCode::KEY_LEFT_CTRL }, + { VK_LMENU, EventKeyboard::KeyCode::KEY_LEFT_ALT }, + { (int) VirtualKey::LeftWindows, EventKeyboard::KeyCode::KEY_HYPER }, + { (int) VirtualKey::RightShift, EventKeyboard::KeyCode::KEY_RIGHT_SHIFT }, + { (int) VirtualKey::RightControl, EventKeyboard::KeyCode::KEY_RIGHT_CTRL }, + { VK_RMENU, EventKeyboard::KeyCode::KEY_RIGHT_ALT }, + { (int) VirtualKey::RightWindows, EventKeyboard::KeyCode::KEY_HYPER }, + { (int) VirtualKey::Menu, EventKeyboard::KeyCode::KEY_MENU }, + { (int) VirtualKey::LeftMenu, EventKeyboard::KeyCode::KEY_MENU }, + { (int) VirtualKey::RightMenu, EventKeyboard::KeyCode::KEY_MENU } +}; + KeyBoardWinRT::KeyBoardWinRT() { - + g_keyCodeMap.clear(); + for (auto& item : g_keyCodeStructArray) + { + g_keyCodeMap[item.key] = item.keyCode; + } } KeyBoardWinRT::~KeyBoardWinRT() @@ -50,19 +206,16 @@ KeyBoardWinRT::~KeyBoardWinRT() } -KeyBoardWinRT::KeyBoardWinRT(Windows::UI::Core::CoreDispatcher^ dispatcher, Windows::UI::Xaml::Controls::Panel^ panel) - : m_dispatcher(dispatcher) - , m_panel(panel) -{ - -} void KeyBoardWinRT::ShowKeyboard(Platform::String^ text) { - if (m_dispatcher.Get() && m_panel.Get()) + auto panel = cocos2d::GLViewImpl::sharedOpenGLView()->getPanel(); + auto dispatcher = cocos2d::GLViewImpl::sharedOpenGLView()->getDispatcher(); + + if (dispatcher && panel) { // run on main UI thread - m_dispatcher.Get()->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this, text]() + dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this, text, panel]() { if (m_textBox == nullptr) { @@ -70,8 +223,6 @@ void KeyBoardWinRT::ShowKeyboard(Platform::String^ text) m_textBox->Opacity = 0.0; m_textBox->Width = 1; m_textBox->Height = 1; - m_textBox->AddHandler(UIElement::KeyDownEvent, ref new KeyEventHandler(this, &KeyBoardWinRT::OnKeyPressed), true); - m_textBox->AddHandler(UIElement::KeyUpEvent, ref new KeyEventHandler(this, &KeyBoardWinRT::OnKeyReleased), true); m_textBox->TextChanged += ref new TextChangedEventHandler(this, &KeyBoardWinRT::OnTextChanged); #if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) // Need to use InputScopeNameValue::Search to prevent auto-capitalize @@ -79,7 +230,7 @@ void KeyBoardWinRT::ShowKeyboard(Platform::String^ text) auto n = m_textBox->InputScope->Names; n->Append(ref new InputScopeName(InputScopeNameValue::Search)); #endif - m_panel.Get()->Children->Append(m_textBox); + panel->Children->Append(m_textBox); } m_textBox->SelectionLength = 0; m_textBox->SelectionStart = 32768; @@ -90,17 +241,20 @@ void KeyBoardWinRT::ShowKeyboard(Platform::String^ text) void KeyBoardWinRT::HideKeyboard(Platform::String^ text) { - if (m_dispatcher.Get() && m_panel.Get()) + auto panel = cocos2d::GLViewImpl::sharedOpenGLView()->getPanel(); + auto dispatcher = cocos2d::GLViewImpl::sharedOpenGLView()->getDispatcher(); + + if (dispatcher && panel) { // run on main UI thread - m_dispatcher.Get()->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this, text]() + dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this, text, panel]() { if (m_textBox != nullptr) { unsigned int index; - if (m_panel->Children->IndexOf(m_textBox, &index)) + if (panel->Children->IndexOf(m_textBox, &index)) { - m_panel->Children->RemoveAt(index); + panel->Children->RemoveAt(index); } } m_textBox = nullptr; @@ -108,31 +262,42 @@ void KeyBoardWinRT::HideKeyboard(Platform::String^ text) } } -void KeyBoardWinRT::QueueKeyEvent(Cocos2dKeyEvent key) +void KeyBoardWinRT::OnWinRTKeyboardEvent(WinRTKeyboardEventType type, KeyEventArgs^ args) { - std::shared_ptr e(new cocos2d::KeyboardEvent(key)); - cocos2d::GLViewImpl::sharedOpenGLView()->QueueEvent(e); -} + bool pressed = (type == WinRTKeyboardEventType::KeyPressed); -void KeyBoardWinRT::OnKeyPressed(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ args) -{ - switch (args->Key) + // don't allow key repeats + if (pressed && args->KeyStatus.WasKeyDown) { - case VirtualKey::Escape: - QueueKeyEvent(Cocos2dKeyEvent::Escape); - args->Handled = true; - break; - case VirtualKey::Back: - QueueKeyEvent(Cocos2dKeyEvent::Back); - args->Handled = true; - break; - case VirtualKey::Enter: - QueueKeyEvent(Cocos2dKeyEvent::Enter); - args->Handled = true; - break; - default: + return; + } - break; + int key = static_cast(args->VirtualKey); + auto it = g_keyCodeMap.find(key); + if (it != g_keyCodeMap.end()) + { + switch (it->second) + { + case EventKeyboard::KeyCode::KEY_BACKSPACE: + if (pressed) + { + IMEDispatcher::sharedDispatcher()->dispatchDeleteBackward(); + } + break; + default: + EventKeyboard event(it->second, pressed); + auto dispatcher = Director::getInstance()->getEventDispatcher(); + dispatcher->dispatchEvent(&event); + if (it->second == EventKeyboard::KeyCode::KEY_ENTER) + { + IMEDispatcher::sharedDispatcher()->dispatchInsertText("\n", 1); + } + break; + } + } + else + { + log("GLViewImpl::OnWinRTKeyboardEvent Virtual Key Code %d not supported", key); } } @@ -148,10 +313,5 @@ void KeyBoardWinRT::OnTextChanged(Platform::Object^ sender, TextChangedEventArgs } -void KeyBoardWinRT::OnKeyReleased(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ args) -{ - //m_textBox->Text = L""; -} - NS_CC_END diff --git a/cocos/platform/winrt/Keyboard-winrt.h b/cocos/platform/winrt/Keyboard-winrt.h index b12bc3ce33..0427fc58d1 100644 --- a/cocos/platform/winrt/Keyboard-winrt.h +++ b/cocos/platform/winrt/Keyboard-winrt.h @@ -41,17 +41,10 @@ public: void HideKeyboard(Platform::String^ text); internal: - KeyBoardWinRT(Windows::UI::Core::CoreDispatcher^ dispatcher, Windows::UI::Xaml::Controls::Panel^ panel); + void OnWinRTKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); private: - - void QueueKeyEvent(Cocos2dKeyEvent key); - void OnKeyPressed(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ args); - void OnKeyReleased(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ args); void OnTextChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::TextChangedEventArgs^ args); - - Platform::Agile m_dispatcher; - Platform::Agile m_panel; Windows::UI::Xaml::Controls::TextBox^ m_textBox; }; diff --git a/cocos/renderer/CCGLProgram.cpp b/cocos/renderer/CCGLProgram.cpp index d5cc696bdc..c2153e8b4d 100644 --- a/cocos/renderer/CCGLProgram.cpp +++ b/cocos/renderer/CCGLProgram.cpp @@ -39,11 +39,6 @@ THE SOFTWARE. #include "deprecated/CCString.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || defined(WP8_SHADER_COMPILER) -#include "CCPrecompiledShaders.h" -#endif - - // helper functions static void replaceDefines(const std::string& compileTimeDefines, std::string& out) @@ -226,18 +221,6 @@ bool GLProgram::initWithByteArrays(const GLchar* vShaderByteArray, const GLchar* bool GLProgram::initWithByteArrays(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray, const std::string& compileTimeDefines) { - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - GLboolean hasCompiler = false; - glGetBooleanv(GL_SHADER_COMPILER, &hasCompiler); - _hasShaderCompiler = (hasCompiler == GL_TRUE); - - if(!_hasShaderCompiler) - { - return initWithPrecompiledProgramByteArray(vShaderByteArray,fShaderByteArray); - } -#endif - _program = glCreateProgram(); CHECK_GL_ERROR_DEBUG(); @@ -282,48 +265,9 @@ bool GLProgram::initWithByteArrays(const GLchar* vShaderByteArray, const GLchar* CHECK_GL_ERROR_DEBUG(); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || defined(WP8_SHADER_COMPILER) - _shaderId = CCPrecompiledShaders::getInstance()->addShaders(vShaderByteArray, fShaderByteArray); -#endif - return true; } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) -GLProgram* GLProgram::createWithPrecompiledProgramByteArray(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray) -{ - auto ret = new (std::nothrow) GLProgram(); - if(ret && ret->initWithPrecompiledProgramByteArray(vShaderByteArray, fShaderByteArray)) { - ret->link(); - ret->updateUniforms(); - ret->autorelease(); - return ret; - } - - CC_SAFE_DELETE(ret); - return nullptr; -} - -bool GLProgram::initWithPrecompiledProgramByteArray(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray) -{ - bool haveProgram = false; - - _program = glCreateProgram(); - CHECK_GL_ERROR_DEBUG(); - - _vertShader = _fragShader = 0; - - haveProgram = CCPrecompiledShaders::getInstance()->loadProgram(_program, vShaderByteArray, fShaderByteArray); - - CHECK_GL_ERROR_DEBUG(); - _hashForUniforms.clear(); - - CHECK_GL_ERROR_DEBUG(); - - return haveProgram; -} -#endif - bool GLProgram::initWithFilenames(const std::string& vShaderFilename, const std::string& fShaderFilename) { return initWithFilenames(vShaderFilename, fShaderFilename, EMPTY_DEFINE); @@ -599,18 +543,6 @@ bool GLProgram::link() { CCASSERT(_program != 0, "Cannot link invalid program"); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - if(!_hasShaderCompiler) - { - // precompiled shader program is already linked - - //bindPredefinedVertexAttribs(); - parseVertexAttribs(); - parseUniforms(); - return true; - } -#endif - GLint status = GL_TRUE; bindPredefinedVertexAttribs(); @@ -632,7 +564,7 @@ bool GLProgram::link() _vertShader = _fragShader = 0; -#if DEBUG || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if DEBUG || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) glGetProgramiv(_program, GL_LINK_STATUS, &status); if (status == GL_FALSE) @@ -643,13 +575,6 @@ bool GLProgram::link() } #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || defined(WP8_SHADER_COMPILER) - if (status == GL_TRUE) - { - CCPrecompiledShaders::getInstance()->addProgram(_program, _shaderId); - } -#endif - return (status == GL_TRUE); } diff --git a/cocos/renderer/CCGLProgram.h b/cocos/renderer/CCGLProgram.h index fdf62505a3..0f6e5881f3 100644 --- a/cocos/renderer/CCGLProgram.h +++ b/cocos/renderer/CCGLProgram.h @@ -86,6 +86,7 @@ struct Uniform class CC_DLL GLProgram : public Ref { friend class GLProgramState; + friend class VertexAttribBinding; public: /**Enum the preallocated vertex attribute. */ @@ -166,10 +167,6 @@ public: static const char* SHADER_NAME_POSITION_COLOR_TEXASPOINTSIZE; /**Built in shader for 2d. Support Position, Color vertex attribute, without multiply vertex by MVP matrix.*/ static const char* SHADER_NAME_POSITION_COLOR_NO_MVP; -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || defined(WP8_SHADER_COMPILER) - /**Built in shader for 2d. Support Position, Color vertex attribute, without multiply vertex by MVP matrix and have a grey scale fragment shader.*/ - static const char* SHADER_NAME_POSITION_COLOR_NO_MVP_GRAYåSCALE; -#endif /**Built in shader for 2d. Support Position, Texture vertex attribute.*/ static const char* SHADER_NAME_POSITION_TEXTURE; /**Built in shader for 2d. Support Position, Texture vertex attribute. with a specified uniform as color*/ @@ -306,13 +303,6 @@ public: /**Destructor.*/ virtual ~GLProgram(); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - /** @{Initializes the CCGLProgram with precompiled shader program. */ - static GLProgram* createWithPrecompiledProgramByteArray(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray); - bool initWithPrecompiledProgramByteArray(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray); - /**@}*/ -#endif - /** @{ Create or Initializes the GLProgram with a vertex and fragment with bytes array. * @js initWithString. @@ -508,11 +498,6 @@ protected: /**Indicate whether it has a offline shader compiler or not.*/ bool _hasShaderCompiler; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || defined(WP8_SHADER_COMPILER) - /**Shader ID in precompiled shaders on Windows phone.*/ - std::string _shaderId; -#endif - struct flag_struct { unsigned int usesTime:1; unsigned int usesNormal:1; diff --git a/cocos/renderer/CCGLProgramCache.cpp b/cocos/renderer/CCGLProgramCache.cpp index 53bfe055d6..1b447d6251 100644 --- a/cocos/renderer/CCGLProgramCache.cpp +++ b/cocos/renderer/CCGLProgramCache.cpp @@ -32,10 +32,6 @@ THE SOFTWARE. #include "base/ccMacros.h" #include "base/CCConfiguration.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || defined(WP8_SHADER_COMPILER) -#include "ui/shaders/UIShaders.h" -#endif - NS_CC_BEGIN enum { @@ -66,9 +62,6 @@ enum { kShaderType_3DParticleColor, kShaderType_3DSkyBox, kShaderType_3DTerrain, -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || defined(WP8_SHADER_COMPILER) - kShaderType_PositionColor_noMVP_GrayScale, -#endif kShaderType_MAX, }; @@ -199,7 +192,6 @@ void GLProgramCache::loadDefaultGLPrograms() loadDefaultGLProgram(p, kShaderType_PositionLengthTexureColor); _programs.insert( std::make_pair(GLProgram::SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR, p) ); -#if CC_TARGET_PLATFORM != CC_PLATFORM_WP8 p = new (std::nothrow) GLProgram(); loadDefaultGLProgram(p, kShaderType_LabelDistanceFieldNormal); _programs.insert( std::make_pair(GLProgram::SHADER_NAME_LABEL_DISTANCEFIELD_NORMAL, p) ); @@ -207,7 +199,6 @@ void GLProgramCache::loadDefaultGLPrograms() p = new (std::nothrow) GLProgram(); loadDefaultGLProgram(p, kShaderType_LabelDistanceFieldGlow); _programs.insert( std::make_pair(GLProgram::SHADER_NAME_LABEL_DISTANCEFIELD_GLOW, p) ); -#endif p = new (std::nothrow) GLProgram(); loadDefaultGLProgram(p, kShaderType_UIGrayScale); @@ -338,7 +329,6 @@ void GLProgramCache::reloadDefaultGLPrograms() p->reset(); loadDefaultGLProgram(p, kShaderType_PositionLengthTexureColor); -#if CC_TARGET_PLATFORM != CC_PLATFORM_WP8 p = getGLProgram(GLProgram::SHADER_NAME_LABEL_DISTANCEFIELD_NORMAL); p->reset(); loadDefaultGLProgram(p, kShaderType_LabelDistanceFieldNormal); @@ -346,7 +336,6 @@ void GLProgramCache::reloadDefaultGLPrograms() p = getGLProgram(GLProgram::SHADER_NAME_LABEL_DISTANCEFIELD_GLOW); p->reset(); loadDefaultGLProgram(p, kShaderType_LabelDistanceFieldGlow); -#endif p = getGLProgram(GLProgram::SHADER_NAME_LABEL_NORMAL); p->reset(); @@ -437,14 +426,12 @@ void GLProgramCache::loadDefaultGLProgram(GLProgram *p, int type) case kShaderType_PositionLengthTexureColor: p->initWithByteArrays(ccPositionColorLengthTexture_vert, ccPositionColorLengthTexture_frag); break; -#if CC_TARGET_PLATFORM != CC_PLATFORM_WP8 case kShaderType_LabelDistanceFieldNormal: p->initWithByteArrays(ccLabel_vert, ccLabelDistanceFieldNormal_frag); break; case kShaderType_LabelDistanceFieldGlow: p->initWithByteArrays(ccLabel_vert, ccLabelDistanceFieldGlow_frag); break; -#endif case kShaderType_UIGrayScale: p->initWithByteArrays(ccPositionTextureColor_noMVP_vert, ccPositionTexture_GrayScale_frag); @@ -496,11 +483,6 @@ void GLProgramCache::loadDefaultGLProgram(GLProgram *p, int type) case kShaderType_3DTerrain: p->initWithByteArrays(cc3D_Terrain_vert, cc3D_Terrain_frag); break; -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || defined(WP8_SHADER_COMPILER) - case kShaderType_PositionColor_noMVP_GrayScale: - p->initWithByteArrays(ccPositionTextureColor_noMVP_vert, ccUIGrayScale_frag); - break; -#endif default: CCLOG("cocos2d: %s:%d, error shader type", __FUNCTION__, __LINE__); return; diff --git a/cocos/renderer/CCGLProgramState.cpp b/cocos/renderer/CCGLProgramState.cpp index 0d0f03853d..1d7f023b0f 100644 --- a/cocos/renderer/CCGLProgramState.cpp +++ b/cocos/renderer/CCGLProgramState.cpp @@ -177,7 +177,7 @@ void UniformValue::setFloat(float value) _type = Type::VALUE; } -void UniformValue::setFloatv(const float* pointer, ssize_t size) +void UniformValue::setFloatv(ssize_t size, const float* pointer) { CCASSERT(_uniform->type == GL_FLOAT, "Wrong type: expecting GL_FLOAT"); _value.floatv.pointer = (const float*)pointer; @@ -192,7 +192,7 @@ void UniformValue::setVec2(const Vec2& value) _type = Type::VALUE; } -void UniformValue::setVec2v(const Vec2* pointer, ssize_t size) +void UniformValue::setVec2v(ssize_t size, const Vec2* pointer) { CCASSERT(_uniform->type == GL_FLOAT_VEC2, "Wrong type: expecting GL_FLOAT_VEC2"); _value.v2f.pointer = (const float*)pointer; @@ -208,7 +208,7 @@ void UniformValue::setVec3(const Vec3& value) } -void UniformValue::setVec3v(const Vec3* pointer, ssize_t size) +void UniformValue::setVec3v(ssize_t size, const Vec3* pointer) { CCASSERT(_uniform->type == GL_FLOAT_VEC3, "Wrong type: expecting GL_FLOAT_VEC3"); _value.v3f.pointer = (const float*)pointer; @@ -224,7 +224,7 @@ void UniformValue::setVec4(const Vec4& value) _type = Type::VALUE; } -void UniformValue::setVec4v(const Vec4* pointer, ssize_t size) +void UniformValue::setVec4v(ssize_t size, const Vec4* pointer) { CCASSERT (_uniform->type == GL_FLOAT_VEC4, "Wrong type: expecting GL_FLOAT_VEC4"); _value.v4f.pointer = (const float*)pointer; @@ -358,7 +358,7 @@ GLProgramState::GLProgramState() , _vertexAttribsFlags(0) , _glprogram(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) /** listen the event that renderer was recreated on Android/WP8 */ CCLOG("create rendererRecreatedListener for GLProgramState"); _backToForegroundlistener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, @@ -373,7 +373,7 @@ GLProgramState::GLProgramState() GLProgramState::~GLProgramState() { -#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 @@ -632,20 +632,20 @@ void GLProgramState::setUniformInt(GLint uniformLocation, int value) } -void GLProgramState::setUniformFloatv(const std::string &uniformName, const float* pointer, ssize_t size) +void GLProgramState::setUniformFloatv(const std::string &uniformName, ssize_t size, const float* pointer) { auto v = getUniformValue(uniformName); if (v) - v->setFloatv(pointer, size); + v->setFloatv(size, pointer); else CCLOG("cocos2d: warning: Uniform not found: %s", uniformName.c_str()); } -void GLProgramState::setUniformFloatv(GLint uniformLocation, const float* pointer, ssize_t size) +void GLProgramState::setUniformFloatv(GLint uniformLocation, ssize_t size, const float* pointer) { auto v = getUniformValue(uniformLocation); if (v) - v->setFloatv(pointer, size); + v->setFloatv(size, pointer); else CCLOG("cocos2d: warning: Uniform at location not found: %i", uniformLocation); } @@ -668,20 +668,20 @@ void GLProgramState::setUniformVec2(GLint uniformLocation, const Vec2& value) CCLOG("cocos2d: warning: Uniform at location not found: %i", uniformLocation); } -void GLProgramState::setUniformVec2v(const std::string &uniformName, const Vec2* pointer, ssize_t size) +void GLProgramState::setUniformVec2v(const std::string &uniformName, ssize_t size, const Vec2* pointer) { auto v = getUniformValue(uniformName); if (v) - v->setVec2v(pointer, size); + v->setVec2v(size, pointer); else CCLOG("cocos2d: warning: Uniform not found: %s", uniformName.c_str()); } -void GLProgramState::setUniformVec2v(GLint uniformLocation, const Vec2* pointer, ssize_t size) +void GLProgramState::setUniformVec2v(GLint uniformLocation, ssize_t size, const Vec2* pointer) { auto v = getUniformValue(uniformLocation); if (v) - v->setVec2v(pointer, size); + v->setVec2v(size, pointer); else CCLOG("cocos2d: warning: Uniform at location not found: %i", uniformLocation); } @@ -704,20 +704,20 @@ void GLProgramState::setUniformVec3(GLint uniformLocation, const Vec3& value) CCLOG("cocos2d: warning: Uniform at location not found: %i", uniformLocation); } -void GLProgramState::setUniformVec3v(const std::string &uniformName, const Vec3* pointer, ssize_t size) +void GLProgramState::setUniformVec3v(const std::string &uniformName, ssize_t size, const Vec3* pointer) { auto v = getUniformValue(uniformName); if (v) - v->setVec3v(pointer, size); + v->setVec3v(size, pointer); else CCLOG("cocos2d: warning: Uniform not found: %s", uniformName.c_str()); } -void GLProgramState::setUniformVec3v(GLint uniformLocation, const Vec3* pointer, ssize_t size) +void GLProgramState::setUniformVec3v(GLint uniformLocation, ssize_t size, const Vec3* pointer) { auto v = getUniformValue(uniformLocation); if (v) - v->setVec3v(pointer, size); + v->setVec3v(size, pointer); else CCLOG("cocos2d: warning: Uniform at location not found: %i", uniformLocation); } @@ -740,20 +740,20 @@ void GLProgramState::setUniformVec4(GLint uniformLocation, const Vec4& value) CCLOG("cocos2d: warning: Uniform at location not found: %i", uniformLocation); } -void GLProgramState::setUniformVec4v(const std::string &uniformName, const Vec4* value, ssize_t size) +void GLProgramState::setUniformVec4v(const std::string &uniformName, ssize_t size, const Vec4* value) { auto v = getUniformValue(uniformName); if (v) - v->setVec4v(value, size); + v->setVec4v(size, value); else CCLOG("cocos2d: warning: Uniform not found: %s", uniformName.c_str()); } -void GLProgramState::setUniformVec4v(GLint uniformLocation, const Vec4* value, ssize_t size) +void GLProgramState::setUniformVec4v(GLint uniformLocation, ssize_t size, const Vec4* pointer) { auto v = getUniformValue(uniformLocation); if (v) - v->setVec4v(value, size); + v->setVec4v(size, pointer); else CCLOG("cocos2d: warning: Uniform at location not found: %i", uniformLocation); } diff --git a/cocos/renderer/CCGLProgramState.h b/cocos/renderer/CCGLProgramState.h index a24b897009..c718f77cac 100644 --- a/cocos/renderer/CCGLProgramState.h +++ b/cocos/renderer/CCGLProgramState.h @@ -77,13 +77,13 @@ public: */ void setFloat(float value); void setInt(int value); - void setFloatv(const float* pointer, ssize_t size); + void setFloatv(ssize_t size, const float* pointer); void setVec2(const Vec2& value); - void setVec2v(const Vec2* pointer, ssize_t size); + void setVec2v(ssize_t size, const Vec2* pointer); void setVec3(const Vec3& value); - void setVec3v(const Vec3* pointer, ssize_t size); + void setVec3v(ssize_t size, const Vec3* pointer); void setVec4(const Vec4& value); - void setVec4v(const Vec4* pointer, ssize_t size); + void setVec4v(ssize_t size, const Vec4* pointer); void setMat4(const Mat4& value); /** @} @@ -173,6 +173,7 @@ class CC_DLL VertexAttribValue { friend class GLProgram; friend class GLProgramState; + friend class VertexAttribBinding; public: /** @@ -233,7 +234,7 @@ protected: A GLProgram can be used by thousands of Nodes, but if different uniform values are going to be used, then each node will need its own GLProgramState */ -class CC_DLL GLProgramState : public Ref, public Clonable +class CC_DLL GLProgramState : public Ref { friend class GLProgramStateCache; public: @@ -300,13 +301,13 @@ public: */ void setUniformInt(const std::string &uniformName, int value); void setUniformFloat(const std::string &uniformName, float value); - void setUniformFloatv(const std::string &uniformName, const float* pointer, ssize_t size); + void setUniformFloatv(const std::string &uniformName, ssize_t size, const float* pointer); void setUniformVec2(const std::string &uniformName, const Vec2& value); - void setUniformVec2v(const std::string &uniformName, const Vec2* pointer, ssize_t size); + void setUniformVec2v(const std::string &uniformName, ssize_t size, const Vec2* pointer); void setUniformVec3(const std::string &uniformName, const Vec3& value); - void setUniformVec3v(const std::string &uniformName, const Vec3* pointer, ssize_t size); + void setUniformVec3v(const std::string &uniformName, ssize_t size, const Vec3* pointer); void setUniformVec4(const std::string &uniformName, const Vec4& value); - void setUniformVec4v(const std::string &uniformName, const Vec4* pointer, ssize_t size); + void setUniformVec4v(const std::string &uniformName, ssize_t size, const Vec4* pointer); void setUniformMat4(const std::string &uniformName, const Mat4& value); void setUniformCallback(const std::string &uniformName, const std::function &callback); void setUniformTexture(const std::string &uniformName, Texture2D *texture); @@ -318,13 +319,13 @@ public: */ void setUniformInt(GLint uniformLocation, int value); void setUniformFloat(GLint uniformLocation, float value); - void setUniformFloatv(GLint uniformLocation, const float* pointer, ssize_t size); + void setUniformFloatv(GLint uniformLocation, ssize_t size, const float* pointer); void setUniformVec2(GLint uniformLocation, const Vec2& value); - void setUniformVec2v(GLint uniformLocation, const Vec2* pointer, ssize_t size); + void setUniformVec2v(GLint uniformLocation, ssize_t size, const Vec2* pointer); void setUniformVec3(GLint uniformLocation, const Vec3& value); - void setUniformVec3v(GLint uniformLocation, const Vec3* pointer, ssize_t size); + void setUniformVec3v(GLint uniformLocation, ssize_t size, const Vec3* pointer); void setUniformVec4(GLint uniformLocation, const Vec4& value); - void setUniformVec4v(GLint uniformLocation, const Vec4* pointer, ssize_t size); + void setUniformVec4v(GLint uniformLocation, ssize_t size, const Vec4* pointer); void setUniformMat4(GLint uniformLocation, const Mat4& value); void setUniformCallback(GLint uniformLocation, const std::function &callback); void setUniformTexture(GLint uniformLocation, Texture2D *texture); @@ -351,7 +352,7 @@ protected: uint32_t _vertexAttribsFlags; GLProgram *_glprogram; -#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 }; diff --git a/cocos/renderer/CCMaterial.cpp b/cocos/renderer/CCMaterial.cpp index 0474e74f2b..d81d915dab 100644 --- a/cocos/renderer/CCMaterial.cpp +++ b/cocos/renderer/CCMaterial.cpp @@ -34,25 +34,21 @@ #include "renderer/CCTexture2D.h" #include "renderer/CCGLProgram.h" #include "renderer/CCGLProgramState.h" - +#include "base/CCProperties.h" #include "base/CCDirector.h" #include "platform/CCFileUtils.h" -#include "json/document.h" -#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) #define strcasecmp _stricmp #endif -static const float MATERIAL_FORMAT_VERSION = 1.0; -static const char* MATERIAL_TYPE = "material"; +NS_CC_BEGIN // Helpers declaration -static const char* getOptionalString(const rapidjson::GenericValue >& json, const char* key, const char* defaultValue); +static const char* getOptionalString(Properties* properties, const char* key, const char* defaultValue); static bool isValidUniform(const char* name); -NS_CC_BEGIN - Material* Material::createWithFilename(const std::string& filepath) { auto validfilename = FileUtils::getInstance()->fullPathForFilename(filepath); @@ -68,6 +64,17 @@ Material* Material::createWithFilename(const std::string& filepath) return nullptr; } +Material* Material::createWithProperties(Properties* materialProperties) +{ + auto mat = new (std::nothrow) Material(); + if (mat && mat->initWithProperties(materialProperties)) + { + mat->autorelease(); + return mat; + } + return nullptr; +} + Material* Material::createWithGLStateProgram(GLProgramState* programState) { CCASSERT(programState, "Invalid GL Program State"); @@ -102,68 +109,50 @@ bool Material::initWithFile(const std::string& validfilename) char* bytes = (char*)data.getBytes(); bytes[data.getSize()-1]='\0'; - rapidjson::Document document; - document.ParseInsitu<0>(bytes); + // Warning: properties is not a "Ref" object, must be manually deleted + Properties* properties = Properties::createWithoutAutorelease(validfilename); - if (document.HasParseError()) - { - CCLOG("GetParseError %s\n", document.GetParseError()); - return false; - } + // get the first material + parseProperties((strlen(properties->getNamespace()) > 0) ? properties : properties->getNextNamespace()); - CCASSERT(document.IsObject(), "Invalid JSON file"); - - if (! parseMetadata(document)) { - CCLOG("Error parsing Material metadata"); - return false; - } - - parseProperties(document); + CC_SAFE_DELETE(properties); return true; } +bool Material::initWithProperties(Properties* materialProperties) +{ + return parseProperties(materialProperties); +} + void Material::setTarget(cocos2d::Node *target) { _target = target; } -bool Material::parseMetadata(const rapidjson::Document& jsonDocument) +bool Material::parseProperties(Properties* materialProperties) { - bool broken = false; - - const auto& metadata = jsonDocument["metadata"]; - if (metadata.IsObject()) + setName(materialProperties->getId()); + auto space = materialProperties->getNextNamespace(); + while (space) { - auto version = metadata["version"].GetDouble(); - broken |= std::floor(version) != std::floor(MATERIAL_FORMAT_VERSION); + const char* name = space->getNamespace(); + if (strcmp(name, "technique") == 0) + { + parseTechnique(space); + } + else if (strcmp(name, "renderState") == 0) + { + parseRenderState(this, space); + } + + space = materialProperties->getNextNamespace(); - auto type = metadata["type"].GetString(); - broken |= strcmp(type, MATERIAL_TYPE) != 0; } - - return !broken; -} - -bool Material::parseProperties(const rapidjson::Document& jsonDocument) -{ - auto name = jsonDocument["name"].GetString(); - setName(name); - - auto& techniquesJSON = jsonDocument["techniques"]; - CCASSERT(techniquesJSON.IsArray(), "Invalid Techniques"); - - for (rapidjson::SizeType i = 0; i < techniquesJSON.Size(); i++) { - auto& techniqueJSON = techniquesJSON[i]; - parseTechnique(techniqueJSON); - } - return true; } -bool Material::parseTechnique(const rapidjson::GenericValue >& techniqueJSON) +bool Material::parseTechnique(Properties* techniqueProperties) { - CCASSERT(techniqueJSON.IsObject(), "Invalid type for Technique. It must be an object"); - auto technique = Technique::create(this); _techniques.pushBack(technique); @@ -172,56 +161,65 @@ bool Material::parseTechnique(const rapidjson::GenericValue >& _currentTechnique = technique; // name - if (techniqueJSON.HasMember("name")) - technique->setName(techniqueJSON["name"].GetString()); + technique->setName(techniqueProperties->getId()); + // passes - auto& passesJSON = techniqueJSON["passes"]; - CCASSERT(passesJSON.IsArray(), "Invalid type for 'passes'"); + auto space = techniqueProperties->getNextNamespace(); + while (space) + { + const char* name = space->getNamespace(); + if (strcmp(name, "pass") == 0) + { + parsePass(technique, space); + } + else if (strcmp(name, "renderState") == 0) + { + parseRenderState(this, space); + } - for (rapidjson::SizeType i = 0; i < passesJSON.Size(); i++) { - auto& passJSON = passesJSON[i]; - parsePass(technique, passJSON); + space = techniqueProperties->getNextNamespace(); } return true; } -bool Material::parsePass(Technique* technique, const rapidjson::GenericValue >& passJSON) +bool Material::parsePass(Technique* technique, Properties* passProperties) { auto pass = Pass::create(technique); technique->addPass(pass); - // Textures - if (passJSON.HasMember("textures")) { - auto& texturesJSON = passJSON["textures"]; - CCASSERT(texturesJSON.IsArray(), "Invalid type for 'textures'"); + // Pass can have 3 different namespaces: + // - one or more "sampler" + // - one "renderState" + // - one "shader" - for (rapidjson::SizeType i = 0; i < texturesJSON.Size(); i++) { - auto& textureJSON = texturesJSON[i]; - parseTexture(pass, textureJSON); + auto space = passProperties->getNextNamespace(); + while (space) + { + const char* name = space->getNamespace(); + if (strcmp(name, "sampler") == 0) + parseSampler(pass, space); + else if (strcmp(name, "shader") == 0) + parseShader(pass, space); + else if (strcmp(name, "renderState") == 0) + parseRenderState(pass, space); + else { + CCASSERT(false, "Invalid namespace"); + return false; } - } - // Render State - if (passJSON.HasMember("renderState")) { - parseRenderState(pass, passJSON["renderState"]); - } - - // Shaders - if (passJSON.HasMember("shader")) { - parseShader(pass, passJSON["shader"]); + space = passProperties->getNextNamespace(); } return true; } -bool Material::parseTexture(Pass* pass, const rapidjson::GenericValue >& textureJSON) +// cocos2d-x doesn't support Samplers yet. But will be added soon +bool Material::parseSampler(Pass* pass, Properties* textureProperties) { - CCASSERT(textureJSON.IsObject(), "Invalid type for Texture. It must be an object"); - // required - auto filename = textureJSON["path"].GetString(); + auto filename = textureProperties->getString("path"); auto texture = Director::getInstance()->getTextureCache()->addImage(filename); if (!texture) { @@ -236,14 +234,14 @@ bool Material::parseTexture(Pass* pass, const rapidjson::GenericValuegenerateMipmap(); usemipmap = true; } // valid options: REPEAT, CLAMP - const char* wrapS = getOptionalString(textureJSON, "wrapS", "CLAMP_TO_EDGE"); + const char* wrapS = getOptionalString(textureProperties, "wrapS", "CLAMP_TO_EDGE"); if (strcasecmp(wrapS, "REPEAT")==0) texParams.wrapS = GL_REPEAT; else if(strcasecmp(wrapS, "CLAMP_TO_EDGE")==0) @@ -253,7 +251,7 @@ bool Material::parseTexture(Pass* pass, const rapidjson::GenericValue >& shaderJSON) +bool Material::parseShader(Pass* pass, Properties* shaderProperties) { - - CCASSERT(shaderJSON.IsObject(), "Invalid type for 'shader'. It must be an object"); - // vertexShader - const char* vertShader = getOptionalString(shaderJSON, "vertexShader", nullptr); + const char* vertShader = getOptionalString(shaderProperties, "vertexShader", nullptr); // fragmentShader - const char* fragShader = getOptionalString(shaderJSON, "fragmentShader", nullptr); + const char* fragShader = getOptionalString(shaderProperties, "fragmentShader", nullptr); // compileTimeDefines - const char* compileTimeDefines = getOptionalString(shaderJSON, "defines", ""); + const char* compileTimeDefines = getOptionalString(shaderProperties, "defines", ""); if (vertShader && fragShader) { @@ -315,11 +310,15 @@ bool Material::parseShader(Pass* pass, const rapidjson::GenericValuesetGLProgramState(glProgramState); // Parse uniforms only if the GLProgramState was created - for( auto it = shaderJSON.MemberonBegin(); it != shaderJSON.MemberonEnd(); it++) + auto property = shaderProperties->getNextProperty(); + while (property) { - // skip "defines", "vertexShader", "fragmentShader" - if (isValidUniform(it->name.GetString())) - parseUniform(glProgramState, it); + if (isValidUniform(property)) + { + parseUniform(glProgramState, shaderProperties, property); + } + + property = shaderProperties->getNextProperty(); } // glProgramState->updateUniformsAndAttributes(); @@ -328,107 +327,75 @@ bool Material::parseShader(Pass* pass, const rapidjson::GenericValuename.GetString(); - auto& value = iterator->value; + auto type = properties->getType(uniformName); - if (value.IsNumber()) { - float v = value.GetDouble(); - programState->setUniformFloat(key, v); - } - else if (value.IsArray()) { - - int size = value.Size(); - switch (size) { - case 1: - { - rapidjson::SizeType idx = 0; - float v = value[idx].GetDouble(); - programState->setUniformFloat(key, v); - break; - } - case 2: - { - Vec2 vect = parseUniformVec2(value); - programState->setUniformVec2(key, vect); - break; - } - case 3: - { - Vec3 vect = parseUniformVec3(value); - programState->setUniformVec3(key, vect); - break; - } - case 4: - { - Vec4 vect = parseUniformVec4(value); - programState->setUniformVec4(key, vect); - break; - } - case 16: - { - Mat4 mat = parseUniformMat4(value); - programState->setUniformMat4(key, mat); - break; - } - default: - break; + switch (type) { + case Properties::Type::NUMBER: + { + auto f = properties->getFloat(uniformName); + programState->setUniformFloat(uniformName, f); + break; } + case Properties::Type::STRING: + CCASSERT(false, "invalid type for a uniform"); + return false; + break; + + case Properties::Type::VECTOR2: + { + Vec2 v2; + properties->getVec2(uniformName, &v2); + programState->setUniformVec2(uniformName, v2); + break; + } + + case Properties::Type::VECTOR3: + { + Vec3 v3; + properties->getVec3(uniformName, &v3); + programState->setUniformVec3(uniformName, v3); + break; + } + + case Properties::Type::VECTOR4: + { + Vec4 v4; + properties->getVec4(uniformName, &v4); + programState->setUniformVec4(uniformName, v4); + break; + } + + case Properties::Type::MATRIX: + { + Mat4 m4; + properties->getMat4(uniformName, &m4); + programState->setUniformMat4(uniformName, m4); + break; + } + + default: + return false; + break; } return true; } -Vec2 Material::parseUniformVec2(const rapidjson::GenericValue >& value) + +bool Material::parseRenderState(RenderState* renderState, Properties* properties) { - Vec2 ret; - rapidjson::SizeType idx = 0; - ret.x = value[idx++].GetDouble(); - ret.y = value[idx++].GetDouble(); - return ret; -} + auto state = renderState->getStateBlock(); -Vec3 Material::parseUniformVec3(const rapidjson::GenericValue >& value) -{ - Vec3 ret; - rapidjson::SizeType idx = 0; - ret.x = value[idx++].GetDouble(); - ret.y = value[idx++].GetDouble(); - ret.z = value[idx++].GetDouble(); - return ret; -} - -Vec4 Material::parseUniformVec4(const rapidjson::GenericValue >& value) -{ - Vec4 ret; - rapidjson::SizeType idx = 0; - ret.x = value[idx++].GetDouble(); - ret.y = value[idx++].GetDouble(); - ret.z = value[idx++].GetDouble(); - ret.w = value[idx++].GetDouble(); - return ret; -} - -Mat4 Material::parseUniformMat4(const rapidjson::GenericValue >& value) -{ - Mat4 ret; - - for(rapidjson::SizeType i= 0; i<16; i++) - ret.m[i] = value[i].GetDouble(); - - return ret; -} - -bool Material::parseRenderState(Pass* pass, const rapidjson::GenericValue >& renderState) -{ - auto state = pass->getStateBlock(); - - // Parse uniforms only if the GLProgramState was created - for( auto it = renderState.MemberonBegin(); it != renderState.MemberonEnd(); it++) + auto property = properties->getNextProperty(); + while (property) { - // Render state only can have "strings" or numbers as values. No objects or lists - state->setState(it->name.GetString(), it->value.GetString()); + // Parse uniforms only if the GLProgramState was created + // Render state only can have "strings" or numbers as values. No new namespaces + state->setState(property, properties->getString(property)); + + property = properties->getNextProperty(); } return true; @@ -455,14 +422,41 @@ Material::~Material() { } +Material* Material::clone() const +{ + auto material = new (std::nothrow) Material(); + if (material) + { + RenderState::cloneInto(material); + + for (const auto& technique: _techniques) + { + auto t = technique->clone(); + material->_techniques.pushBack(t); + } + + // current technique + auto name = _currentTechnique->getName(); + material->_currentTechnique = material->getTechniqueByName(name); + + material->autorelease(); + } + return material; +} + Technique* Material::getTechnique() const { return _currentTechnique; } + +const Vector& Material::getTechniques() const +{ + return _techniques; +} + Technique* Material::getTechniqueByName(const std::string& name) { for(const auto& technique : _techniques) { - CCLOG("technique name: %s", technique->getName().c_str()); if (technique->getName().compare(name)==0) return technique; } @@ -493,7 +487,6 @@ ssize_t Material::getTechniqueCount() const return _techniques.size(); } -NS_CC_END // Helpers implementation static bool isValidUniform(const char* name) @@ -503,11 +496,14 @@ static bool isValidUniform(const char* name) strcmp(name, "fragmentShader")==0); } -static const char* getOptionalString(const rapidjson::GenericValue >& json, const char* key, const char* defaultValue) +static const char* getOptionalString(Properties* properties, const char* key, const char* defaultValue) { - if (json.HasMember(key)) { - return json[key].GetString(); - } - return defaultValue; + + const char* ret = properties->getString(key); + if (!ret) + ret = defaultValue; + + return ret; } +NS_CC_END diff --git a/cocos/renderer/CCMaterial.h b/cocos/renderer/CCMaterial.h index c029878908..ddae8425dc 100644 --- a/cocos/renderer/CCMaterial.h +++ b/cocos/renderer/CCMaterial.h @@ -31,7 +31,6 @@ #define __cocos2d_libs__CCMaterial__ #include -#include "json/document.h" #include "renderer/CCRenderState.h" #include "renderer/CCTechnique.h" @@ -50,6 +49,7 @@ class Technique; class Pass; class GLProgramState; class Node; +class Properties; /// Material class CC_DLL Material : public RenderState @@ -62,7 +62,14 @@ class CC_DLL Material : public RenderState friend class Mesh; public: - /** Creates a Material with a JSON file containing the definition of the material. + /** + * 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. */ static Material* createWithFilename(const std::string& path); @@ -72,6 +79,15 @@ public: */ static Material* createWithGLStateProgram(GLProgramState* programState); + /** + * 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. + */ + static Material* createWithProperties(Properties* materialProperties); + /// returns the material name std::string getName() const; /// sets the material name @@ -87,38 +103,40 @@ public: */ Technique* getTechniqueByIndex(ssize_t index); + /** Returns the Technique used by the Material */ + Technique* getTechnique() const; + + /** Returns the list of Techniques */ + const Vector& getTechniques() const; + + /** Returns the number of Techniques in the Material. */ + ssize_t getTechniqueCount() const; + /** Adds a Technique into the Material */ void addTechnique(Technique* technique); /** Sets the current technique */ void setTechnique(const std::string& techniqueName); - /** Returns the number of Techniques in the Material. */ - ssize_t getTechniqueCount() const; - - /** Returns the Technique used by the Material */ - Technique* getTechnique() const; + /** returns a clone (deep-copy) of the material */ + Material* clone() const; protected: Material(); ~Material(); bool initWithGLProgramState(GLProgramState* state); bool initWithFile(const std::string& file); + bool initWithProperties(Properties* materialProperties); void setTarget(Node* target); - bool parseMetadata(const rapidjson::Document& json); - bool parseProperties(const rapidjson::Document& json); - bool parseTechnique(const rapidjson::GenericValue >& techniqueJSON); - bool parsePass(Technique* technique, const rapidjson::GenericValue >& passJSON); - bool parseTexture(Pass* pass, const rapidjson::GenericValue >& textureJSON); - bool parseShader(Pass* pass, const rapidjson::GenericValue >& shaderJSON); - bool parseUniform(GLProgramState* programState, const rapidjson::Value::ConstMemberIterator& iterator); - Vec2 parseUniformVec2(const rapidjson::GenericValue >& uniformJSON); - Vec3 parseUniformVec3(const rapidjson::GenericValue >& uniformJSON); - Vec4 parseUniformVec4(const rapidjson::GenericValue >& uniformJSON); - Mat4 parseUniformMat4(const rapidjson::GenericValue >& uniformJSON); - bool parseRenderState(Pass* pass, const rapidjson::GenericValue >& renderState); + bool parseProperties(Properties* properties); + bool parseTechnique(Properties* properties); + bool parsePass(Technique* technique, Properties* properties); + bool parseSampler(Pass* pass, Properties* properties); + bool parseShader(Pass* pass, Properties* properties); + bool parseUniform(GLProgramState* programState, Properties* properties, const char* uniformName); + bool parseRenderState(RenderState* renderState, Properties* properties); // material name diff --git a/cocos/renderer/CCMeshCommand.cpp b/cocos/renderer/CCMeshCommand.cpp index e312e8de10..d4698d1b48 100644 --- a/cocos/renderer/CCMeshCommand.cpp +++ b/cocos/renderer/CCMeshCommand.cpp @@ -66,7 +66,7 @@ MeshCommand::MeshCommand() , _material(nullptr) { _type = RenderCommand::Type::MESH_COMMAND; -#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) // listen the event that renderer was recreated on Android/WP8 _rendererRecreatedListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, CC_CALLBACK_1(MeshCommand::listenRendererRecreated, this)); Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_rendererRecreatedListener, -1); @@ -216,7 +216,7 @@ void MeshCommand::setTransparent(bool value) MeshCommand::~MeshCommand() { releaseVAO(); -#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(_rendererRecreatedListener); #endif } @@ -306,22 +306,26 @@ uint32_t MeshCommand::getMaterialID() const void MeshCommand::preBatchDraw() { - if (Configuration::getInstance()->supportsShareableVAO() && _vao == 0) - buildVAO(); - if (_vao) + // Do nothing if using material since each pass needs to bind its own VAO + if (!_material) { - GL::bindVAO(_vao); - } - else - { - glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer); + if (Configuration::getInstance()->supportsShareableVAO() && _vao == 0) + buildVAO(); + if (_vao) + { + GL::bindVAO(_vao); + } + else + { + glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer); - // FIXME: Assumes that all the passes in the Material share the same Vertex Attribs - GLProgramState* programState = _material - ? _material->_currentTechnique->_passes.at(0)->getGLProgramState() - : _glProgramState; - programState->applyAttributes(); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBuffer); + // FIXME: Assumes that all the passes in the Material share the same Vertex Attribs + GLProgramState* programState = _material + ? _material->_currentTechnique->_passes.at(0)->getGLProgramState() + : _glProgramState; + programState->applyAttributes(); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBuffer); + } } } @@ -331,9 +335,7 @@ void MeshCommand::batchDraw() { for(const auto& pass: _material->_currentTechnique->_passes) { - // don't bind attributes, since they were - // already bound in preBatchDraw - pass->bind(_mv, false); + pass->bind(_mv); glDrawElements(_primitive, (GLsizei)_indexCount, _indexFormat, 0); CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, _indexCount); @@ -358,14 +360,18 @@ void MeshCommand::batchDraw() } void MeshCommand::postBatchDraw() { - if (_vao) + // when using material, unbind is after draw + if (!_material) { - GL::bindVAO(0); - } - else - { - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - glBindBuffer(GL_ARRAY_BUFFER, 0); + if (_vao) + { + GL::bindVAO(0); + } + else + { + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + glBindBuffer(GL_ARRAY_BUFFER, 0); + } } } @@ -379,8 +385,6 @@ void MeshCommand::execute() { for(const auto& pass: _material->_currentTechnique->_passes) { - // don't bind attributes, since they were - // already bound in preBatchDraw pass->bind(_mv, true); glDrawElements(_primitive, (GLsizei)_indexCount, _indexFormat, 0); @@ -445,7 +449,7 @@ void MeshCommand::releaseVAO() } } -#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) void MeshCommand::listenRendererRecreated(EventCustom* event) { _vao = 0; diff --git a/cocos/renderer/CCMeshCommand.h b/cocos/renderer/CCMeshCommand.h index e6e8cb9890..729adc2abb 100644 --- a/cocos/renderer/CCMeshCommand.h +++ b/cocos/renderer/CCMeshCommand.h @@ -82,7 +82,7 @@ public: uint32_t getMaterialID() const; -#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) void listenRendererRecreated(EventCustom* event); #endif @@ -133,7 +133,7 @@ protected: // weak ref Material* _material; -#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* _rendererRecreatedListener; #endif }; diff --git a/cocos/renderer/CCPass.cpp b/cocos/renderer/CCPass.cpp index 7e8aa626d4..29dd7eff4c 100644 --- a/cocos/renderer/CCPass.cpp +++ b/cocos/renderer/CCPass.cpp @@ -34,6 +34,7 @@ #include "renderer/ccGLStateCache.h" #include "renderer/CCTechnique.h" #include "renderer/CCMaterial.h" +#include "renderer/CCVertexAttribBinding.h" #include "base/ccTypes.h" #include "2d/CCNode.h" @@ -81,12 +82,31 @@ bool Pass::initWithGLProgramState(Technique* technique, GLProgramState *glProgra Pass::Pass() : _glProgramState(nullptr) +, _vertexAttribBinding(nullptr) { } Pass::~Pass() { CC_SAFE_RELEASE(_glProgramState); + CC_SAFE_RELEASE(_vertexAttribBinding); +} + +Pass* Pass::clone() const +{ + auto pass = new (std::nothrow) Pass(); + if (pass) + { + RenderState::cloneInto(pass); + pass->_glProgramState = _glProgramState->clone(); + CC_SAFE_RETAIN(pass->_glProgramState); + + pass->_vertexAttribBinding = _vertexAttribBinding; + CC_SAFE_RETAIN(pass->_vertexAttribBinding); + + pass->autorelease(); + } + return pass; } GLProgramState* Pass::getGLProgramState() const @@ -128,15 +148,19 @@ void Pass::bind(const Mat4& modelView) void Pass::bind(const Mat4& modelView, bool bindAttributes) { + + // vertex attribs + if (bindAttributes && _vertexAttribBinding) + _vertexAttribBinding->bind(); + auto glprogramstate = _glProgramState ? _glProgramState : getTarget()->getGLProgramState(); glprogramstate->applyGLProgram(modelView); - if (bindAttributes) - glprogramstate->applyAttributes(); glprogramstate->applyUniforms(); //set render state RenderState::bind(this); + } Node* Pass::getTarget() const @@ -150,6 +174,24 @@ Node* Pass::getTarget() const void Pass::unbind() { RenderState::StateBlock::restore(0); + + _vertexAttribBinding->unbind(); } +void Pass::setVertexAttribBinding(VertexAttribBinding* binding) +{ + if (_vertexAttribBinding != binding) + { + CC_SAFE_RELEASE(_vertexAttribBinding); + _vertexAttribBinding = binding; + CC_SAFE_RETAIN(_vertexAttribBinding); + } +} + +VertexAttribBinding* Pass::getVertexAttributeBinding() const +{ + return _vertexAttribBinding; +} + + NS_CC_END diff --git a/cocos/renderer/CCPass.h b/cocos/renderer/CCPass.h index f41116c852..673dfd51de 100644 --- a/cocos/renderer/CCPass.h +++ b/cocos/renderer/CCPass.h @@ -40,6 +40,7 @@ NS_CC_BEGIN class GLProgramState; class Technique; class Node; +class VertexAttribBinding; class CC_DLL Pass : public RenderState { @@ -66,8 +67,29 @@ public: */ void unbind(); + /** + * 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). + */ + void setVertexAttribBinding(VertexAttribBinding* binding); + + /** + * Returns the vertex attribute binding for this pass. + * + * @return The vertex attribute binding for this pass. + */ + VertexAttribBinding* getVertexAttributeBinding() const; + uint32_t getHash() const; + /** + * Returns a clone (deep-copy) of this instance */ + Pass* clone() const; + protected: Pass(); ~Pass(); @@ -78,6 +100,7 @@ protected: Node* getTarget() const; GLProgramState* _glProgramState; + VertexAttribBinding* _vertexAttribBinding; }; NS_CC_END diff --git a/cocos/renderer/CCRenderState.cpp b/cocos/renderer/CCRenderState.cpp index 530b3fd8e5..5b447f39ee 100644 --- a/cocos/renderer/CCRenderState.cpp +++ b/cocos/renderer/CCRenderState.cpp @@ -182,6 +182,22 @@ RenderState::StateBlock* RenderState::getStateBlock() const return _state; } +void RenderState::cloneInto(RenderState* renderState) const +{ + CCASSERT(renderState, "must be non nill"); + + // Clone our state block + if (_state) + { + _state->cloneInto(renderState->getStateBlock()); + } + + renderState->_name = _name; + renderState->_textures = _textures; + // weak ref. don't retain + renderState->_parent = _parent; +} + // // StateBlock // @@ -409,6 +425,45 @@ void RenderState::StateBlock::restore(long stateOverrideBits) } } +void RenderState::StateBlock::enableDepthWrite() +{ + CC_ASSERT(_defaultState); + + // Internal method used to restore depth writing before a + // clear operation. This is necessary if the last code to draw before the + // next frame leaves depth writing disabled. + if (!_defaultState->_depthWriteEnabled) + { + glDepthMask(GL_TRUE); + _defaultState->_bits &= ~RS_DEPTH_WRITE; + _defaultState->_depthWriteEnabled = true; + } +} + +void RenderState::StateBlock::cloneInto(StateBlock* state) const +{ + CC_ASSERT(state); + + state->_cullFaceEnabled = _cullFaceEnabled; + state->_depthTestEnabled = _depthTestEnabled; + state->_depthWriteEnabled = _depthWriteEnabled; + state->_depthFunction = _depthFunction; + state->_blendEnabled = _blendEnabled; + state->_blendSrc = _blendSrc; + state->_blendDst = _blendDst; + state->_cullFaceSide = _cullFaceSide; + state->_frontFace = _frontFace; + state->_stencilTestEnabled = _stencilTestEnabled; + state->_stencilWrite = _stencilWrite; + state->_stencilFunction = _stencilFunction; + state->_stencilFunctionRef = _stencilFunctionRef; + state->_stencilFunctionMask = _stencilFunctionMask; + state->_stencilOpSfail = _stencilOpSfail; + state->_stencilOpDpfail = _stencilOpDpfail; + state->_stencilOpDppass = _stencilOpDppass; + state->_bits = _bits; +} + static bool parseBoolean(const std::string& value) { return (value.compare("true")==0); diff --git a/cocos/renderer/CCRenderState.h b/cocos/renderer/CCRenderState.h index 48f7680591..0a7649f079 100644 --- a/cocos/renderer/CCRenderState.h +++ b/cocos/renderer/CCRenderState.h @@ -360,6 +360,8 @@ public: static void restore(long stateOverrideBits); static void enableDepthWrite(); + void cloneInto(StateBlock* renderState) const; + bool _cullFaceEnabled; bool _depthTestEnabled; bool _depthWriteEnabled; @@ -393,6 +395,7 @@ protected: RenderState(); ~RenderState(); bool init(RenderState* parent); + void cloneInto(RenderState* state) const; mutable uint32_t _hash; mutable bool _hashDirty; diff --git a/cocos/renderer/CCTechnique.cpp b/cocos/renderer/CCTechnique.cpp index e006780058..59c244a8f5 100644 --- a/cocos/renderer/CCTechnique.cpp +++ b/cocos/renderer/CCTechnique.cpp @@ -74,6 +74,26 @@ bool Technique::init(Material* parent) return true; } +Technique* Technique::clone() const +{ + auto technique = new (std::nothrow) Technique(); + + if (technique) + { + technique->_name = _name; + RenderState::cloneInto(technique); + + for (const auto pass: _passes) + { + auto p = pass->clone(); + technique->_passes.pushBack(p); + } + + technique->autorelease(); + } + return technique; +} + void Technique::addPass(Pass *pass) { _passes.pushBack(pass); @@ -100,4 +120,9 @@ ssize_t Technique::getPassCount() const return _passes.size(); } +const Vector& Technique::getPasses() const +{ + return _passes; +} + NS_CC_END \ No newline at end of file diff --git a/cocos/renderer/CCTechnique.h b/cocos/renderer/CCTechnique.h index 5c7f0b8aee..8e85b44401 100644 --- a/cocos/renderer/CCTechnique.h +++ b/cocos/renderer/CCTechnique.h @@ -73,6 +73,12 @@ public: /** Returns the number of Passes in the Technique */ ssize_t getPassCount() const; + /** Returns the list of passes */ + const Vector& getPasses() const; + + /** Returns a new clone of the Technique */ + Technique* clone() const; + protected: Technique(); ~Technique(); diff --git a/cocos/renderer/CCVertexAttribBinding.cpp b/cocos/renderer/CCVertexAttribBinding.cpp new file mode 100644 index 0000000000..a34d1b5e83 --- /dev/null +++ b/cocos/renderer/CCVertexAttribBinding.cpp @@ -0,0 +1,255 @@ +/** + Copyright 2013 BlackBerry Inc. + Copyright (c) 2015 Chukong Technologies + + 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. + + Original file from GamePlay3D: http://gameplay3d.org + + This file was modified to fit the cocos2d-x project + */ + +#include "CCVertexAttribBinding.h" +#include "renderer/CCGLProgramState.h" +#include "renderer/ccGLStateCache.h" +#include "platform/CCGL.h" +#include "base/CCConfiguration.h" +#include "3d/CCMeshVertexIndexData.h" + +NS_CC_BEGIN + +std::string s_attributeNames[] = { + GLProgram::ATTRIBUTE_NAME_POSITION, + GLProgram::ATTRIBUTE_NAME_COLOR, + GLProgram::ATTRIBUTE_NAME_TEX_COORD, + GLProgram::ATTRIBUTE_NAME_TEX_COORD1, + GLProgram::ATTRIBUTE_NAME_TEX_COORD2, + GLProgram::ATTRIBUTE_NAME_TEX_COORD3, + GLProgram::ATTRIBUTE_NAME_NORMAL, + GLProgram::ATTRIBUTE_NAME_BLEND_WEIGHT, + GLProgram::ATTRIBUTE_NAME_BLEND_INDEX +}; + +static GLuint __maxVertexAttribs = 0; +static std::vector __vertexAttribBindingCache; + +VertexAttribBinding::VertexAttribBinding() : + _handle(0), _attributes(), _meshIndexData(nullptr), _glProgramState(nullptr) +{ +} + +VertexAttribBinding::~VertexAttribBinding() +{ + // Delete from the vertex attribute binding cache. + std::vector::iterator itr = std::find(__vertexAttribBindingCache.begin(), __vertexAttribBindingCache.end(), this); + if (itr != __vertexAttribBindingCache.end()) + { + __vertexAttribBindingCache.erase(itr); + } + + CC_SAFE_RELEASE(_meshIndexData); + CC_SAFE_RELEASE(_glProgramState); + _attributes.clear(); + + if (_handle) + { + glDeleteVertexArrays(1, &_handle); + _handle = 0; + } +} + +VertexAttribBinding* VertexAttribBinding::create(MeshIndexData* meshIndexData, GLProgramState* glProgramState) +{ + CCASSERT(meshIndexData && glProgramState, "Invalid MeshIndexData and/or GLProgramState"); + + // Search for an existing vertex attribute binding that can be used. + VertexAttribBinding* b; + for (size_t i = 0, count = __vertexAttribBindingCache.size(); i < count; ++i) + { + b = __vertexAttribBindingCache[i]; + CC_ASSERT(b); + if (b->_meshIndexData == meshIndexData && b->_glProgramState == glProgramState) + { + // Found a match! + return b; + } + } + + b = new (std::nothrow) VertexAttribBinding(); + if (b && b->init(meshIndexData, glProgramState)) + { + b->autorelease(); + __vertexAttribBindingCache.push_back(b); + } + + return b; +} + +bool VertexAttribBinding::init(MeshIndexData* meshIndexData, GLProgramState* glProgramState) +{ + CCASSERT(meshIndexData && glProgramState, "Invalid arguments"); + + // One-time initialization. + if (__maxVertexAttribs == 0) + { + GLint temp; + glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &temp); + + __maxVertexAttribs = temp; + if (__maxVertexAttribs <= 0) + { + CCLOGERROR("The maximum number of vertex attributes supported by OpenGL on the current device is 0 or less."); + return NULL; + } + } + + _meshIndexData = meshIndexData; + _meshIndexData->retain(); + _glProgramState = glProgramState; + _glProgramState->retain(); + + auto meshVertexData = meshIndexData->getMeshVertexData(); + auto attributeCount = meshVertexData->getMeshVertexAttribCount(); + + + // Parse and set attributes + parseAttributes(); + long offset = 0; + for (auto k = 0; k < attributeCount; k++) + { + auto meshattribute = meshVertexData->getMeshVertexAttrib(k); + setVertexAttribPointer( + s_attributeNames[meshattribute.vertexAttrib], + meshattribute.size, + meshattribute.type, + GL_FALSE, + meshVertexData->getVertexBuffer()->getSizePerVertex(), + (GLvoid*)offset); + offset += meshattribute.attribSizeBytes; + } + + // VAO hardware + if (Configuration::getInstance()->supportsShareableVAO()) + { + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + + glGenVertexArrays(1, &_handle); + GL::bindVAO(_handle); + glBindBuffer(GL_ARRAY_BUFFER, meshVertexData->getVertexBuffer()->getVBO()); + + auto flags = _vertexAttribsFlags; + for (int i = 0; flags > 0; i++) { + int flag = 1 << i; + if (flag & flags) + glEnableVertexAttribArray(i); + flags &= ~flag; + } + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, meshIndexData->getIndexBuffer()->getVBO()); + + for(auto &attribute : _attributes) + { + attribute.second.apply(); + } + + GL::bindVAO(0); + } + + return true; +} + +void VertexAttribBinding::bind() +{ + + if (_handle) + { + // hardware + GL::bindVAO(_handle); + } + else + { + // software + auto meshVertexData = _meshIndexData->getMeshVertexData(); + glBindBuffer(GL_ARRAY_BUFFER, meshVertexData->getVertexBuffer()->getVBO()); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _meshIndexData->getIndexBuffer()->getVBO()); + + // Software mode + GL::enableVertexAttribs(_vertexAttribsFlags); + // set attributes + for(auto &attribute : _attributes) + { + attribute.second.apply(); + } + + } +} + +void VertexAttribBinding::unbind() +{ + if (_handle) + { + // Hardware + GL::bindVAO(0); + } + else + { + // Software + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + } +} + +uint32_t VertexAttribBinding::getVertexAttribsFlags() const +{ + return _vertexAttribsFlags; +} + +void VertexAttribBinding::parseAttributes() +{ + CCASSERT(_glProgramState, "invalid glprogram"); + + _attributes.clear(); + _vertexAttribsFlags = 0; + + auto glprogram = _glProgramState->getGLProgram(); + + for(auto &attrib: glprogram->_vertexAttribs) + { + VertexAttribValue value(&attrib.second); + _attributes[attrib.first] = value; + } +} + +VertexAttribValue* VertexAttribBinding::getVertexAttribValue(const std::string& name) +{ + const auto itr = _attributes.find(name); + if( itr != _attributes.end()) + return &itr->second; + return nullptr; +} + +void VertexAttribBinding::setVertexAttribPointer(const std::string &name, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid* pointer) +{ + auto v = getVertexAttribValue(name); + if(v) { + v->setPointer(size, type, normalized, stride, pointer); + _vertexAttribsFlags |= 1 << v->_vertexAttrib->index; + } + else + { + CCLOG("cocos2d: warning: Attribute not found: %s", name.c_str()); + } +} + +NS_CC_END diff --git a/cocos/renderer/CCVertexAttribBinding.h b/cocos/renderer/CCVertexAttribBinding.h new file mode 100644 index 0000000000..8ab892eeab --- /dev/null +++ b/cocos/renderer/CCVertexAttribBinding.h @@ -0,0 +1,129 @@ +/** + Copyright 2013 BlackBerry Inc. + Copyright (c) 2015 Chukong Technologies + + 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. + + Original file from GamePlay3D: http://gameplay3d.org + + This file was modified to fit the cocos2d-x project + */ + +#ifndef CC_VERTEXATTRIBUTEBINDING_H_ +#define CC_VERTEXATTRIBUTEBINDING_H_ + +#include + +#include "base/CCRef.h" +#include "renderer/CCGLProgramState.h" + +NS_CC_BEGIN + +class MeshIndexData; +class VertexAttribValue; + +/** + * Defines a binding between the vertex layout of a Mesh and the vertex + * input attributes of a vertex shader (Effect). + * + * In a perfect world, this class would always be a binding directly between + * a unique VertexFormat and an Effect, where the VertexFormat is simply the + * definition of the layout of any anonymous vertex buffer. However, the OpenGL + * mechanism for setting up these bindings is Vertex Array Objects (VAOs). + * OpenGL requires a separate VAO per vertex buffer object (VBO), rather than per + * vertex layout definition. Therefore, although we would like to define this + * binding between a VertexFormat and Effect, we are specifying the binding + * between a Mesh and Effect to satisfy the OpenGL requirement of one VAO per VBO. + * + * Note that this class still does provide a binding between a VertexFormat + * and an Effect, however this binding is actually a client-side binding and + * should only be used when writing custom code that use client-side vertex + * arrays, since it is slower than the server-side VAOs used by OpenGL + * (when creating a VertexAttribBinding between a Mesh and Effect). + */ +class VertexAttribBinding : public Ref +{ +public: + + /** + * Creates a new VertexAttribBinding between the given MeshVertexData and GLProgramState. + * + * If a VertexAttribBinding matching the specified MeshVertexData and GLProgramState already + * exists, it will be returned. Otherwise, a new VertexAttribBinding will + * be returned. If OpenGL VAOs are enabled, the a new VAO will be created and + * stored in the returned VertexAttribBinding, otherwise a client-side + * array of vertex attribute bindings will be stored. + * + * @param mesh The mesh. + * @param effect The effect. + * + * @return A VertexAttribBinding for the requested parameters. + */ + static VertexAttribBinding* create(MeshIndexData* meshIndexData, GLProgramState* glProgramState); + + /** + * Binds this vertex array object. + */ + void bind(); + + /** + * Unbinds this vertex array object. + */ + void unbind(); + + /** + * Returns the vertex attrib flags + */ + uint32_t getVertexAttribsFlags() const; + + +private: + + bool init(MeshIndexData* meshIndexData, GLProgramState* glProgramState); + + /** + * Constructor. + */ + VertexAttribBinding(); + + /** + * Destructor. + */ + ~VertexAttribBinding(); + + /** + * Hidden copy assignment operator. + */ + VertexAttribBinding& operator=(const VertexAttribBinding&); + + void setVertexAttribPointer(const std::string& name, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid* pointer); + VertexAttribValue* getVertexAttribValue(const std::string &name); + void parseAttributes(); + + + GLuint _handle; + + MeshIndexData* _meshIndexData; + GLProgramState* _glProgramState; + + std::unordered_map _attributes; + uint32_t _vertexAttribsFlags; +}; + +/// @cond +extern std::string CC_DLL s_attributeNames[];//attribute names array +/// @endcond + +NS_CC_END + +#endif // CC_VERTEXATTRIBUTEBINDING_H_ diff --git a/cocos/renderer/CCVertexIndexBuffer.cpp b/cocos/renderer/CCVertexIndexBuffer.cpp index c24efdd5e2..2fa659b72e 100644 --- a/cocos/renderer/CCVertexIndexBuffer.cpp +++ b/cocos/renderer/CCVertexIndexBuffer.cpp @@ -30,13 +30,13 @@ NS_CC_BEGIN -#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) bool VertexBuffer::_enableShadowCopy = true; #else bool VertexBuffer::_enableShadowCopy = false; #endif -#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) bool IndexBuffer::_enableShadowCopy = true; #else bool IndexBuffer::_enableShadowCopy = false; @@ -62,7 +62,7 @@ VertexBuffer::VertexBuffer() , _vertexNumber(0) { -#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) auto callBack = [this](EventCustom* event) { this->recreateVBO(); @@ -80,7 +80,7 @@ VertexBuffer::~VertexBuffer() glDeleteBuffers(1, &_vbo); _vbo = 0; } -#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(_recreateVBOEventListener); #endif } @@ -190,7 +190,7 @@ IndexBuffer::IndexBuffer() , _indexNumber(0) , _recreateVBOEventListener(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) auto callBack = [this](EventCustom* event) { this->recreateVBO(); @@ -207,7 +207,7 @@ IndexBuffer::~IndexBuffer() glDeleteBuffers(1, &_vbo); _vbo = 0; } -#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(_recreateVBOEventListener); #endif } diff --git a/cocos/renderer/CMakeLists.txt b/cocos/renderer/CMakeLists.txt index 2aec0ae3ee..6075e52489 100644 --- a/cocos/renderer/CMakeLists.txt +++ b/cocos/renderer/CMakeLists.txt @@ -21,6 +21,7 @@ set(COCOS_RENDERER_SRC renderer/CCTextureAtlas.cpp renderer/CCTextureCache.cpp renderer/CCTrianglesCommand.cpp + renderer/CCVertexAttribBinding.cpp renderer/CCVertexIndexBuffer.cpp renderer/CCVertexIndexData.cpp renderer/ccGLStateCache.cpp diff --git a/cocos/renderer/ccShader_3D_Terrain.frag b/cocos/renderer/ccShader_3D_Terrain.frag index b853800f9f..b7b226a45c 100644 --- a/cocos/renderer/ccShader_3D_Terrain.frag +++ b/cocos/renderer/ccShader_3D_Terrain.frag @@ -28,7 +28,7 @@ if(u_has_alpha<=0) texture2D(u_texture1, v_texCoord*u_detailSize[1])*blendFactor.g + texture2D(u_texture2, v_texCoord*u_detailSize[2])*blendFactor.b;\n float grayFactor =dot(blendFactor.rgb, vec3(1, 1, 1)); color +=texture2D(u_texture3, v_texCoord*u_detailSize[3])*(1.0-grayFactor); - gl_FragColor = color*lightFactor; + gl_FragColor = vec4(color.rgb*lightFactor, 1.0); } } ); diff --git a/cocos/scripting/js-bindings/CMakeLists.txt b/cocos/scripting/js-bindings/CMakeLists.txt index bb4ecca32f..3f1a5d8f36 100644 --- a/cocos/scripting/js-bindings/CMakeLists.txt +++ b/cocos/scripting/js-bindings/CMakeLists.txt @@ -42,6 +42,7 @@ set(JSBINDING_SRC auto/jsb_cocos2dx_ui_auto.cpp auto/jsb_cocos2dx_3d_auto.cpp auto/jsb_cocos2dx_3d_extension_auto.cpp + auto/jsb_cocos2dx_experimental.cpp manual/ScriptingCore.cpp manual/cocos2d_specifics.cpp manual/js_manual_conversions.cpp @@ -67,6 +68,7 @@ set(JSBINDING_SRC manual/spine/jsb_cocos2dx_spine_manual.cpp manual/ui/jsb_cocos2dx_ui_manual.cpp manual/3d/jsb_cocos2dx_3d_manual.cpp + manual/experimental/jsb_cocos2dx_experimental_manual.cpp ${cocos_root}/cocos/storage/local-storage/LocalStorage.cpp ) 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 e794cdf552..b48e88a837 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 @@ -273,6 +273,366 @@ Animate3D : function ( }; +/** + * @class AttachNode + */ +jsb.AttachNode = { + +/** + * @method create + * @param {cc.Bone3D} arg0 + * @return {cc.AttachNode} + */ +create : function ( +bone3d +) +{ + return cc.AttachNode; +}, + +/** + * @method AttachNode + * @constructor + */ +AttachNode : function ( +) +{ +}, + +}; + +/** + * @class BillBoard + */ +jsb.BillBoard = { + +/** + * @method getMode + * @return {cc.BillBoard::Mode} + */ +getMode : function ( +) +{ + return 0; +}, + +/** + * @method setMode + * @param {cc.BillBoard::Mode} arg0 + */ +setMode : function ( +mode +) +{ +}, + +/** + * @method create +* @param {String|cc.BillBoard::Mode|String} str +* @param {cc.BillBoard::Mode|rect_object} mode +* @param {cc.BillBoard::Mode} mode +* @return {cc.BillBoard|cc.BillBoard|cc.BillBoard} +*/ +create : function( +str, +rect, +mode +) +{ + return cc.BillBoard; +}, + +/** + * @method createWithTexture + * @param {cc.Texture2D} arg0 + * @param {cc.BillBoard::Mode} arg1 + * @return {cc.BillBoard} + */ +createWithTexture : function ( +texture2d, +mode +) +{ + return cc.BillBoard; +}, + +/** + * @method BillBoard + * @constructor + */ +BillBoard : function ( +) +{ +}, + +}; + +/** + * @class Mesh + */ +jsb.Mesh = { + +/** + * @method setTexture +* @param {cc.Texture2D|String} texture2d +*/ +setTexture : function( +str +) +{ +}, + +/** + * @method getTexture + * @return {cc.Texture2D} + */ +getTexture : function ( +) +{ + return cc.Texture2D; +}, + +/** + * @method getSkin + * @return {cc.MeshSkin} + */ +getSkin : function ( +) +{ + return cc.MeshSkin; +}, + +/** + * @method getMaterial + * @return {cc.Material} + */ +getMaterial : function ( +) +{ + return cc.Material; +}, + +/** + * @method getVertexSizeInBytes + * @return {int} + */ +getVertexSizeInBytes : function ( +) +{ + return 0; +}, + +/** + * @method setMaterial + * @param {cc.Material} arg0 + */ +setMaterial : function ( +material +) +{ +}, + +/** + * @method getName + * @return {String} + */ +getName : function ( +) +{ + return ; +}, + +/** + * @method getIndexFormat + * @return {unsigned int} + */ +getIndexFormat : function ( +) +{ + return 0; +}, + +/** + * @method getGLProgramState + * @return {cc.GLProgramState} + */ +getGLProgramState : function ( +) +{ + return cc.GLProgramState; +}, + +/** + * @method getVertexBuffer + * @return {unsigned int} + */ +getVertexBuffer : function ( +) +{ + return 0; +}, + +/** + * @method calculateAABB + */ +calculateAABB : function ( +) +{ +}, + +/** + * @method hasVertexAttrib + * @param {int} arg0 + * @return {bool} + */ +hasVertexAttrib : function ( +int +) +{ + return false; +}, + +/** + * @method getBlendFunc + * @return {cc.BlendFunc} + */ +getBlendFunc : function ( +) +{ + return cc.BlendFunc; +}, + +/** + * @method getMeshIndexData + * @return {cc.MeshIndexData} + */ +getMeshIndexData : function ( +) +{ + return cc.MeshIndexData; +}, + +/** + * @method setName + * @param {String} arg0 + */ +setName : function ( +str +) +{ +}, + +/** + * @method getIndexCount + * @return {long} + */ +getIndexCount : function ( +) +{ + return 0; +}, + +/** + * @method setMeshIndexData + * @param {cc.MeshIndexData} arg0 + */ +setMeshIndexData : function ( +meshindexdata +) +{ +}, + +/** + * @method getMeshVertexAttribCount + * @return {long} + */ +getMeshVertexAttribCount : function ( +) +{ + return 0; +}, + +/** + * @method setBlendFunc + * @param {cc.BlendFunc} arg0 + */ +setBlendFunc : function ( +blendfunc +) +{ +}, + +/** + * @method getPrimitiveType + * @return {unsigned int} + */ +getPrimitiveType : function ( +) +{ + return 0; +}, + +/** + * @method setSkin + * @param {cc.MeshSkin} arg0 + */ +setSkin : function ( +meshskin +) +{ +}, + +/** + * @method isVisible + * @return {bool} + */ +isVisible : function ( +) +{ + return false; +}, + +/** + * @method getIndexBuffer + * @return {unsigned int} + */ +getIndexBuffer : function ( +) +{ + return 0; +}, + +/** + * @method setGLProgramState + * @param {cc.GLProgramState} arg0 + */ +setGLProgramState : function ( +glprogramstate +) +{ +}, + +/** + * @method setVisible + * @param {bool} arg0 + */ +setVisible : function ( +bool +) +{ +}, + +/** + * @method Mesh + * @constructor + */ +Mesh : function ( +) +{ +}, + +}; + /** * @class Skeleton3D */ @@ -383,6 +743,84 @@ Skeleton3D : function ( }; +/** + * @class Skybox + */ +jsb.Skybox = { + +/** + * @method reload + */ +reload : function ( +) +{ +}, + +/** + * @method init +* @param {String} str +* @param {String} str +* @param {String} str +* @param {String} str +* @param {String} str +* @param {String} str +* @return {bool|bool} +*/ +init : function( +str, +str, +str, +str, +str, +str +) +{ + return false; +}, + +/** + * @method setTexture + * @param {cc.TextureCube} arg0 + */ +setTexture : function ( +texturecube +) +{ +}, + +/** + * @method create +* @param {String} str +* @param {String} str +* @param {String} str +* @param {String} str +* @param {String} str +* @param {String} str +* @return {cc.Skybox|cc.Skybox} +*/ +create : function( +str, +str, +str, +str, +str, +str +) +{ + return cc.Skybox; +}, + +/** + * @method Skybox + * @constructor + */ +Skybox : function ( +) +{ +}, + +}; + /** * @class Sprite3D */ @@ -448,6 +886,18 @@ materialdatas return false; }, +/** + * @method getMaterial + * @param {int} arg0 + * @return {cc.Material} + */ +getMaterial : function ( +int +) +{ + return cc.Material; +}, + /** * @method setCullFace * @param {unsigned int} arg0 @@ -600,16 +1050,6 @@ str return cc.MeshIndexData; }, -/** - * @method removeAttachNode - * @param {String} arg0 - */ -removeAttachNode : function ( -str -) -{ -}, - /** * @method setLightMask * @param {unsigned int} arg0 @@ -692,6 +1132,16 @@ blendfunc { }, +/** + * @method removeAttachNode + * @param {String} arg0 + */ +removeAttachNode : function ( +str +) +{ +}, + /** * @method getSkeleton * @return {cc.Skeleton3D} @@ -793,383 +1243,232 @@ getInstance : function ( }; /** - * @class Mesh + * @class Terrain */ -jsb.Mesh = { +jsb.Terrain = { /** - * @method setTexture -* @param {cc.Texture2D|String} texture2d -*/ -setTexture : function( -str -) -{ -}, - -/** - * @method getTexture - * @return {cc.Texture2D} - */ -getTexture : function ( -) -{ - return cc.Texture2D; -}, - -/** - * @method getSkin - * @return {cc.MeshSkin} - */ -getSkin : function ( -) -{ - return cc.MeshSkin; -}, - -/** - * @method getMaterial - * @return {cc.Material} - */ -getMaterial : function ( -) -{ - return cc.Material; -}, - -/** - * @method getVertexSizeInBytes - * @return {int} - */ -getVertexSizeInBytes : function ( -) -{ - return 0; -}, - -/** - * @method setMaterial - * @param {cc.Material} arg0 - */ -setMaterial : function ( -material -) -{ -}, - -/** - * @method getName - * @return {String} - */ -getName : function ( -) -{ - return ; -}, - -/** - * @method getIndexFormat - * @return {unsigned int} - */ -getIndexFormat : function ( -) -{ - return 0; -}, - -/** - * @method getGLProgramState - * @return {cc.GLProgramState} - */ -getGLProgramState : function ( -) -{ - return cc.GLProgramState; -}, - -/** - * @method getVertexBuffer - * @return {unsigned int} - */ -getVertexBuffer : function ( -) -{ - return 0; -}, - -/** - * @method calculateAABB - */ -calculateAABB : function ( -) -{ -}, - -/** - * @method hasVertexAttrib - * @param {int} arg0 + * @method initHeightMap + * @param {char} arg0 * @return {bool} */ -hasVertexAttrib : function ( +initHeightMap : function ( +char +) +{ + return false; +}, + +/** + * @method setMaxDetailMapAmount + * @param {int} arg0 + */ +setMaxDetailMapAmount : function ( int ) { - return false; }, /** - * @method draw - * @param {cc.Renderer} arg0 - * @param {float} arg1 - * @param {mat4_object} arg2 - * @param {unsigned int} arg3 - * @param {unsigned int} arg4 - * @param {vec4_object} arg5 - * @param {bool} arg6 - */ -draw : function ( -renderer, -float, -mat4, -int, -int, -vec4, -bool -) -{ -}, - -/** - * @method getBlendFunc - * @return {cc.BlendFunc} - */ -getBlendFunc : function ( -) -{ - return cc.BlendFunc; -}, - -/** - * @method getMeshIndexData - * @return {cc.MeshIndexData} - */ -getMeshIndexData : function ( -) -{ - return cc.MeshIndexData; -}, - -/** - * @method setName - * @param {String} arg0 - */ -setName : function ( -str -) -{ -}, - -/** - * @method getIndexCount - * @return {long} - */ -getIndexCount : function ( -) -{ - return 0; -}, - -/** - * @method setMeshIndexData - * @param {cc.MeshIndexData} arg0 - */ -setMeshIndexData : function ( -meshindexdata -) -{ -}, - -/** - * @method getMeshVertexAttribCount - * @return {long} - */ -getMeshVertexAttribCount : function ( -) -{ - return 0; -}, - -/** - * @method setBlendFunc - * @param {cc.BlendFunc} arg0 - */ -setBlendFunc : function ( -blendfunc -) -{ -}, - -/** - * @method getPrimitiveType - * @return {unsigned int} - */ -getPrimitiveType : function ( -) -{ - return 0; -}, - -/** - * @method setSkin - * @param {cc.MeshSkin} arg0 - */ -setSkin : function ( -meshskin -) -{ -}, - -/** - * @method isVisible - * @return {bool} - */ -isVisible : function ( -) -{ - return false; -}, - -/** - * @method getIndexBuffer - * @return {unsigned int} - */ -getIndexBuffer : function ( -) -{ - return 0; -}, - -/** - * @method setGLProgramState - * @param {cc.GLProgramState} arg0 - */ -setGLProgramState : function ( -glprogramstate -) -{ -}, - -/** - * @method setVisible + * @method setDrawWire * @param {bool} arg0 */ -setVisible : function ( +setDrawWire : function ( bool ) { }, /** - * @method Mesh - * @constructor + * @method setIsEnableFrustumCull + * @param {bool} arg0 */ -Mesh : function ( +setIsEnableFrustumCull : function ( +bool ) { }, -}; - /** - * @class AttachNode + * @method setDetailMap + * @param {unsigned int} arg0 + * @param {cc.Terrain::DetailMap} arg1 */ -jsb.AttachNode = { - -/** - * @method create - * @param {cc.Bone3D} arg0 - * @return {cc.AttachNode} - */ -create : function ( -bone3d -) -{ - return cc.AttachNode; -}, - -/** - * @method AttachNode - * @constructor - */ -AttachNode : function ( +setDetailMap : function ( +int, +map ) { }, -}; +/** + * @method resetHeightMap + * @param {char} arg0 + */ +resetHeightMap : function ( +char +) +{ +}, /** - * @class BillBoard + * @method setAlphaMap + * @param {cc.Texture2D} arg0 */ -jsb.BillBoard = { +setAlphaMap : function ( +texture2d +) +{ +}, /** - * @method getMode - * @return {cc.BillBoard::Mode} + * @method setSkirtHeightRatio + * @param {float} arg0 */ -getMode : function ( +setSkirtHeightRatio : function ( +float +) +{ +}, + +/** + * @method convertToTerrainSpace + * @param {vec2_object} arg0 + * @return {vec2_object} + */ +convertToTerrainSpace : function ( +vec2 +) +{ + return cc.Vec2; +}, + +/** + * @method initTextures + * @return {bool} + */ +initTextures : function ( +) +{ + return false; +}, + +/** + * @method initProperties + * @return {bool} + */ +initProperties : function ( +) +{ + return false; +}, + +/** + * @method getHeight +* @param {vec2_object|float} vec2 +* @param {vec3_object|float} vec3 +* @param {vec3_object} vec3 +* @return {float|float} +*/ +getHeight : function( +float, +float, +vec3 ) { return 0; }, /** - * @method setMode - * @param {cc.BillBoard::Mode} arg0 + * @method setLODDistance + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 */ -setMode : function ( -mode +setLODDistance : function ( +float, +float, +float ) { }, /** - * @method create -* @param {String|cc.BillBoard::Mode|String} str -* @param {cc.BillBoard::Mode|rect_object} mode -* @param {cc.BillBoard::Mode} mode -* @return {cc.BillBoard|cc.BillBoard|cc.BillBoard} -*/ -create : function( -str, -rect, -mode + * @method getTerrainSize + * @return {size_object} + */ +getTerrainSize : function ( ) { - return cc.BillBoard; + return cc.Size; }, /** - * @method createWithTexture - * @param {cc.Texture2D} arg0 - * @param {cc.BillBoard::Mode} arg1 - * @return {cc.BillBoard} + * @method getIntersectionPoint + * @param {cc.Ray} arg0 + * @return {vec3_object} */ -createWithTexture : function ( -texture2d, -mode +getIntersectionPoint : function ( +ray ) { - return cc.BillBoard; + return cc.Vec3; }, /** - * @method BillBoard - * @constructor + * @method getNormal + * @param {int} arg0 + * @param {int} arg1 + * @return {vec3_object} */ -BillBoard : function ( +getNormal : function ( +int, +int ) { + return cc.Vec3; +}, + +/** + * @method reload + */ +reload : function ( +) +{ +}, + +/** + * @method getImageHeight + * @param {int} arg0 + * @param {int} arg1 + * @return {float} + */ +getImageHeight : function ( +int, +int +) +{ + return 0; +}, + +/** + * @method getMaxHeight + * @return {float} + */ +getMaxHeight : function ( +) +{ + return 0; +}, + +/** + * @method getMinHeight + * @return {float} + */ +getMinHeight : function ( +) +{ + return 0; }, }; @@ -1221,302 +1520,3 @@ TextureCube : function ( }, }; - -/** - * @class Skybox - */ -jsb.Skybox = { - -/** - * @method reload - */ -reload : function ( -) -{ -}, - -/** - * @method init -* @param {String} str -* @param {String} str -* @param {String} str -* @param {String} str -* @param {String} str -* @param {String} str -* @return {bool|bool} -*/ -init : function( -str, -str, -str, -str, -str, -str -) -{ - return false; -}, - -/** - * @method setTexture - * @param {cc.TextureCube} arg0 - */ -setTexture : function ( -texturecube -) -{ -}, - -/** - * @method create -* @param {String} str -* @param {String} str -* @param {String} str -* @param {String} str -* @param {String} str -* @param {String} str -* @return {cc.Skybox|cc.Skybox} -*/ -create : function( -str, -str, -str, -str, -str, -str -) -{ - return cc.Skybox; -}, - -/** - * @method Skybox - * @constructor - */ -Skybox : function ( -) -{ -}, - -}; - -/** - * @class Terrain - */ -jsb.Terrain = { - -/** - * @method initHeightMap - * @param {char} arg0 - * @return {bool} - */ -initHeightMap : function ( -char -) -{ - return false; -}, - -/** - * @method getIntersectionPoint - * @param {cc.Ray} arg0 - * @return {vec3_object} - */ -getIntersectionPoint : function ( -ray -) -{ - return cc.Vec3; -}, - -/** - * @method setAlphaMap - * @param {cc.Texture2D} arg0 - */ -setAlphaMap : function ( -texture2d -) -{ -}, - -/** - * @method setSkirtHeightRatio - * @param {float} arg0 - */ -setSkirtHeightRatio : function ( -float -) -{ -}, - -/** - * @method convertToTerrainSpace - * @param {vec2_object} arg0 - * @return {vec2_object} - */ -convertToTerrainSpace : function ( -vec2 -) -{ - return cc.Vec2; -}, - -/** - * @method getHeight -* @param {vec2_object|float} vec2 -* @param {vec3_object|float} vec3 -* @param {vec3_object} vec3 -* @return {float|float} -*/ -getHeight : function( -float, -float, -vec3 -) -{ - return 0; -}, - -/** - * @method initTextures - * @return {bool} - */ -initTextures : function ( -) -{ - return false; -}, - -/** - * @method initProperties - * @return {bool} - */ -initProperties : function ( -) -{ - return false; -}, - -/** - * @method getNormal - * @param {int} arg0 - * @param {int} arg1 - * @return {vec3_object} - */ -getNormal : function ( -int, -int -) -{ - return cc.Vec3; -}, - -/** - * @method setDrawWire - * @param {bool} arg0 - */ -setDrawWire : function ( -bool -) -{ -}, - -/** - * @method reload - */ -reload : function ( -) -{ -}, - -/** - * @method setDetailMap - * @param {unsigned int} arg0 - * @param {cc.Terrain::DetailMap} arg1 - */ -setDetailMap : function ( -int, -map -) -{ -}, - -/** - * @method getImageHeight - * @param {int} arg0 - * @param {int} arg1 - * @return {float} - */ -getImageHeight : function ( -int, -int -) -{ - return 0; -}, - -/** - * @method getMinHeight - * @return {float} - */ -getMinHeight : function ( -) -{ - return 0; -}, - -/** - * @method setLODDistance - * @param {float} arg0 - * @param {float} arg1 - * @param {float} arg2 - */ -setLODDistance : function ( -float, -float, -float -) -{ -}, - -/** - * @method resetHeightMap - * @param {char} arg0 - */ -resetHeightMap : function ( -char -) -{ -}, - -/** - * @method getMaxHeight - * @return {float} - */ -getMaxHeight : function ( -) -{ - return 0; -}, - -/** - * @method setMaxDetailMapAmount - * @param {int} arg0 - */ -setMaxDetailMapAmount : function ( -int -) -{ -}, - -/** - * @method setIsEnableFrustumCull - * @param {bool} arg0 - */ -setIsEnableFrustumCull : function ( -bool -) -{ -}, - -}; 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 290ae92ac6..9d77773463 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 @@ -3,316 +3,6 @@ */ var cc = cc || {}; -/** - * @class Action - */ -cc.Action = { - -/** - * @method startWithTarget - * @param {cc.Node} arg0 - */ -startWithTarget : function ( -node -) -{ -}, - -/** - * @method setOriginalTarget - * @param {cc.Node} arg0 - */ -setOriginalTarget : function ( -node -) -{ -}, - -/** - * @method clone - * @return {cc.Action} - */ -clone : function ( -) -{ - return cc.Action; -}, - -/** - * @method getOriginalTarget - * @return {cc.Node} - */ -getOriginalTarget : function ( -) -{ - return cc.Node; -}, - -/** - * @method stop - */ -stop : function ( -) -{ -}, - -/** - * @method update - * @param {float} arg0 - */ -update : function ( -float -) -{ -}, - -/** - * @method getTarget - * @return {cc.Node} - */ -getTarget : function ( -) -{ - return cc.Node; -}, - -/** - * @method step - * @param {float} arg0 - */ -step : function ( -float -) -{ -}, - -/** - * @method setTag - * @param {int} arg0 - */ -setTag : function ( -int -) -{ -}, - -/** - * @method getTag - * @return {int} - */ -getTag : function ( -) -{ - return 0; -}, - -/** - * @method setTarget - * @param {cc.Node} arg0 - */ -setTarget : function ( -node -) -{ -}, - -/** - * @method isDone - * @return {bool} - */ -isDone : function ( -) -{ - return false; -}, - -/** - * @method reverse - * @return {cc.Action} - */ -reverse : function ( -) -{ - return cc.Action; -}, - -}; - -/** - * @class FiniteTimeAction - */ -cc.FiniteTimeAction = { - -/** - * @method setDuration - * @param {float} arg0 - */ -setDuration : function ( -float -) -{ -}, - -/** - * @method getDuration - * @return {float} - */ -getDuration : function ( -) -{ - return 0; -}, - -}; - -/** - * @class Speed - */ -cc.Speed = { - -/** - * @method setInnerAction - * @param {cc.ActionInterval} arg0 - */ -setInnerAction : function ( -actioninterval -) -{ -}, - -/** - * @method getSpeed - * @return {float} - */ -getSpeed : function ( -) -{ - return 0; -}, - -/** - * @method setSpeed - * @param {float} arg0 - */ -setSpeed : function ( -float -) -{ -}, - -/** - * @method initWithAction - * @param {cc.ActionInterval} arg0 - * @param {float} arg1 - * @return {bool} - */ -initWithAction : function ( -actioninterval, -float -) -{ - return false; -}, - -/** - * @method getInnerAction - * @return {cc.ActionInterval} - */ -getInnerAction : function ( -) -{ - return cc.ActionInterval; -}, - -/** - * @method create - * @param {cc.ActionInterval} arg0 - * @param {float} arg1 - * @return {cc.Speed} - */ -create : function ( -actioninterval, -float -) -{ - return cc.Speed; -}, - -/** - * @method Speed - * @constructor - */ -Speed : function ( -) -{ -}, - -}; - -/** - * @class Follow - */ -cc.Follow = { - -/** - * @method setBoundarySet - * @param {bool} arg0 - */ -setBoundarySet : function ( -bool -) -{ -}, - -/** - * @method initWithTarget - * @param {cc.Node} arg0 - * @param {rect_object} arg1 - * @return {bool} - */ -initWithTarget : function ( -node, -rect -) -{ - return false; -}, - -/** - * @method isBoundarySet - * @return {bool} - */ -isBoundarySet : function ( -) -{ - return false; -}, - -/** - * @method create - * @param {cc.Node} arg0 - * @param {rect_object} arg1 - * @return {cc.Follow} - */ -create : function ( -node, -rect -) -{ - return cc.Follow; -}, - -/** - * @method Follow - * @constructor - */ -Follow : function ( -) -{ -}, - -}; - /** * @class Texture2D */ @@ -1238,16 +928,6 @@ touch return cc.Vec2; }, -/** - * @method getMaterial - * @return {cc.Material} - */ -getMaterial : function ( -) -{ - return cc.Material; -}, - /** * @method removeAllChildrenWithCleanup * @param {bool} bool @@ -1298,16 +978,6 @@ isCascadeOpacityEnabled : function ( return false; }, -/** - * @method setMaterial - * @param {cc.Material} arg0 - */ -setMaterial : function ( -material -) -{ -}, - /** * @method setParent * @param {cc.Node} arg0 @@ -2332,6 +2002,1475 @@ __NodeRGBA : function ( }; +/** + * @class Scene + */ +cc.Scene = { + +/** + * @method setCameraOrderDirty + */ +setCameraOrderDirty : function ( +) +{ +}, + +/** + * @method render + * @param {cc.Renderer} arg0 + */ +render : function ( +renderer +) +{ +}, + +/** + * @method onProjectionChanged + * @param {cc.EventCustom} arg0 + */ +onProjectionChanged : function ( +eventcustom +) +{ +}, + +/** + * @method initWithSize + * @param {size_object} arg0 + * @return {bool} + */ +initWithSize : function ( +size +) +{ + return false; +}, + +/** + * @method getDefaultCamera + * @return {cc.Camera} + */ +getDefaultCamera : function ( +) +{ + return cc.Camera; +}, + +/** + * @method createWithSize + * @param {size_object} arg0 + * @return {cc.Scene} + */ +createWithSize : function ( +size +) +{ + return cc.Scene; +}, + +/** + * @method create + * @return {cc.Scene} + */ +create : function ( +) +{ + return cc.Scene; +}, + +/** + * @method Scene + * @constructor + */ +Scene : function ( +) +{ +}, + +}; + +/** + * @class GLView + */ +cc.GLView = { + +/** + * @method setFrameSize + * @param {float} arg0 + * @param {float} arg1 + */ +setFrameSize : function ( +float, +float +) +{ +}, + +/** + * @method getViewPortRect + * @return {rect_object} + */ +getViewPortRect : function ( +) +{ + return cc.Rect; +}, + +/** + * @method setContentScaleFactor + * @param {float} arg0 + * @return {bool} + */ +setContentScaleFactor : function ( +float +) +{ + return false; +}, + +/** + * @method getContentScaleFactor + * @return {float} + */ +getContentScaleFactor : function ( +) +{ + return 0; +}, + +/** + * @method setIMEKeyboardState + * @param {bool} arg0 + */ +setIMEKeyboardState : function ( +bool +) +{ +}, + +/** + * @method setScissorInPoints + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {float} arg3 + */ +setScissorInPoints : function ( +float, +float, +float, +float +) +{ +}, + +/** + * @method getViewName + * @return {String} + */ +getViewName : function ( +) +{ + return ; +}, + +/** + * @method isOpenGLReady + * @return {bool} + */ +isOpenGLReady : function ( +) +{ + return false; +}, + +/** + * @method setCursorVisible + * @param {bool} arg0 + */ +setCursorVisible : function ( +bool +) +{ +}, + +/** + * @method getScaleY + * @return {float} + */ +getScaleY : function ( +) +{ + return 0; +}, + +/** + * @method getScaleX + * @return {float} + */ +getScaleX : function ( +) +{ + return 0; +}, + +/** + * @method getVisibleOrigin + * @return {vec2_object} + */ +getVisibleOrigin : function ( +) +{ + return cc.Vec2; +}, + +/** + * @method getFrameSize + * @return {size_object} + */ +getFrameSize : function ( +) +{ + return cc.Size; +}, + +/** + * @method setFrameZoomFactor + * @param {float} arg0 + */ +setFrameZoomFactor : function ( +float +) +{ +}, + +/** + * @method getFrameZoomFactor + * @return {float} + */ +getFrameZoomFactor : function ( +) +{ + return 0; +}, + +/** + * @method getDesignResolutionSize + * @return {size_object} + */ +getDesignResolutionSize : function ( +) +{ + return cc.Size; +}, + +/** + * @method windowShouldClose + * @return {bool} + */ +windowShouldClose : function ( +) +{ + return false; +}, + +/** + * @method setDesignResolutionSize + * @param {float} arg0 + * @param {float} arg1 + * @param {ResolutionPolicy} arg2 + */ +setDesignResolutionSize : function ( +float, +float, +resolutionpolicy +) +{ +}, + +/** + * @method getResolutionPolicy + * @return {ResolutionPolicy} + */ +getResolutionPolicy : function ( +) +{ + return ResolutionPolicy; +}, + +/** + * @method isRetinaDisplay + * @return {bool} + */ +isRetinaDisplay : function ( +) +{ + return false; +}, + +/** + * @method setViewPortInPoints + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {float} arg3 + */ +setViewPortInPoints : function ( +float, +float, +float, +float +) +{ +}, + +/** + * @method getScissorRect + * @return {rect_object} + */ +getScissorRect : function ( +) +{ + return cc.Rect; +}, + +/** + * @method getRetinaFactor + * @return {int} + */ +getRetinaFactor : function ( +) +{ + return 0; +}, + +/** + * @method setViewName + * @param {String} arg0 + */ +setViewName : function ( +str +) +{ +}, + +/** + * @method getVisibleRect + * @return {rect_object} + */ +getVisibleRect : function ( +) +{ + return cc.Rect; +}, + +/** + * @method getVisibleSize + * @return {size_object} + */ +getVisibleSize : function ( +) +{ + return cc.Size; +}, + +/** + * @method isScissorEnabled + * @return {bool} + */ +isScissorEnabled : function ( +) +{ + return false; +}, + +/** + * @method pollEvents + */ +pollEvents : function ( +) +{ +}, + +/** + * @method setGLContextAttrs + * @param {GLContextAttrs} arg0 + */ +setGLContextAttrs : function ( +glcontextattrs +) +{ +}, + +/** + * @method getGLContextAttrs + * @return {GLContextAttrs} + */ +getGLContextAttrs : function ( +) +{ + return GLContextAttrs; +}, + +}; + +/** + * @class Director + */ +cc.Director = { + +/** + * @method pause + */ +pause : function ( +) +{ +}, + +/** + * @method setEventDispatcher + * @param {cc.EventDispatcher} arg0 + */ +setEventDispatcher : function ( +eventdispatcher +) +{ +}, + +/** + * @method setContentScaleFactor + * @param {float} arg0 + */ +setContentScaleFactor : function ( +float +) +{ +}, + +/** + * @method getContentScaleFactor + * @return {float} + */ +getContentScaleFactor : function ( +) +{ + return 0; +}, + +/** + * @method getWinSizeInPixels + * @return {size_object} + */ +getWinSizeInPixels : function ( +) +{ + return cc.Size; +}, + +/** + * @method getDeltaTime + * @return {float} + */ +getDeltaTime : function ( +) +{ + return 0; +}, + +/** + * @method setGLDefaultValues + */ +setGLDefaultValues : function ( +) +{ +}, + +/** + * @method setActionManager + * @param {cc.ActionManager} arg0 + */ +setActionManager : function ( +actionmanager +) +{ +}, + +/** + * @method setAlphaBlending + * @param {bool} arg0 + */ +setAlphaBlending : function ( +bool +) +{ +}, + +/** + * @method popToRootScene + */ +popToRootScene : function ( +) +{ +}, + +/** + * @method loadMatrix + * @param {cc.MATRIX_STACK_TYPE} arg0 + * @param {mat4_object} arg1 + */ +loadMatrix : function ( +matrix_stack_type, +mat4 +) +{ +}, + +/** + * @method getNotificationNode + * @return {cc.Node} + */ +getNotificationNode : function ( +) +{ + return cc.Node; +}, + +/** + * @method getWinSize + * @return {size_object} + */ +getWinSize : function ( +) +{ + return cc.Size; +}, + +/** + * @method end + */ +end : function ( +) +{ +}, + +/** + * @method getTextureCache + * @return {cc.TextureCache} + */ +getTextureCache : function ( +) +{ + return cc.TextureCache; +}, + +/** + * @method isSendCleanupToScene + * @return {bool} + */ +isSendCleanupToScene : function ( +) +{ + return false; +}, + +/** + * @method getVisibleOrigin + * @return {vec2_object} + */ +getVisibleOrigin : function ( +) +{ + return cc.Vec2; +}, + +/** + * @method mainLoop + */ +mainLoop : function ( +) +{ +}, + +/** + * @method setDepthTest + * @param {bool} arg0 + */ +setDepthTest : function ( +bool +) +{ +}, + +/** + * @method getFrameRate + * @return {float} + */ +getFrameRate : function ( +) +{ + return 0; +}, + +/** + * @method getSecondsPerFrame + * @return {float} + */ +getSecondsPerFrame : function ( +) +{ + return 0; +}, + +/** + * @method resetMatrixStack + */ +resetMatrixStack : function ( +) +{ +}, + +/** + * @method convertToUI + * @param {vec2_object} arg0 + * @return {vec2_object} + */ +convertToUI : function ( +vec2 +) +{ + return cc.Vec2; +}, + +/** + * @method pushMatrix + * @param {cc.MATRIX_STACK_TYPE} arg0 + */ +pushMatrix : function ( +matrix_stack_type +) +{ +}, + +/** + * @method setDefaultValues + */ +setDefaultValues : function ( +) +{ +}, + +/** + * @method init + * @return {bool} + */ +init : function ( +) +{ + return false; +}, + +/** + * @method setScheduler + * @param {cc.Scheduler} arg0 + */ +setScheduler : function ( +scheduler +) +{ +}, + +/** + * @method getMatrix + * @param {cc.MATRIX_STACK_TYPE} arg0 + * @return {mat4_object} + */ +getMatrix : function ( +matrix_stack_type +) +{ + return cc.Mat4; +}, + +/** + * @method startAnimation + */ +startAnimation : function ( +) +{ +}, + +/** + * @method getOpenGLView + * @return {cc.GLView} + */ +getOpenGLView : function ( +) +{ + return cc.GLView; +}, + +/** + * @method getRunningScene + * @return {cc.Scene} + */ +getRunningScene : function ( +) +{ + return cc.Scene; +}, + +/** + * @method setViewport + */ +setViewport : function ( +) +{ +}, + +/** + * @method stopAnimation + */ +stopAnimation : function ( +) +{ +}, + +/** + * @method popToSceneStackLevel + * @param {int} arg0 + */ +popToSceneStackLevel : function ( +int +) +{ +}, + +/** + * @method resume + */ +resume : function ( +) +{ +}, + +/** + * @method isNextDeltaTimeZero + * @return {bool} + */ +isNextDeltaTimeZero : function ( +) +{ + return false; +}, + +/** + * @method setClearColor + * @param {color4f_object} arg0 + */ +setClearColor : function ( +color4f +) +{ +}, + +/** + * @method setOpenGLView + * @param {cc.GLView} arg0 + */ +setOpenGLView : function ( +glview +) +{ +}, + +/** + * @method convertToGL + * @param {vec2_object} arg0 + * @return {vec2_object} + */ +convertToGL : function ( +vec2 +) +{ + return cc.Vec2; +}, + +/** + * @method purgeCachedData + */ +purgeCachedData : function ( +) +{ +}, + +/** + * @method getTotalFrames + * @return {unsigned int} + */ +getTotalFrames : function ( +) +{ + return 0; +}, + +/** + * @method runWithScene + * @param {cc.Scene} arg0 + */ +runWithScene : function ( +scene +) +{ +}, + +/** + * @method setNotificationNode + * @param {cc.Node} arg0 + */ +setNotificationNode : function ( +node +) +{ +}, + +/** + * @method drawScene + */ +drawScene : function ( +) +{ +}, + +/** + * @method restart + */ +restart : function ( +) +{ +}, + +/** + * @method popScene + */ +popScene : function ( +) +{ +}, + +/** + * @method loadIdentityMatrix + * @param {cc.MATRIX_STACK_TYPE} arg0 + */ +loadIdentityMatrix : function ( +matrix_stack_type +) +{ +}, + +/** + * @method isDisplayStats + * @return {bool} + */ +isDisplayStats : function ( +) +{ + return false; +}, + +/** + * @method setProjection + * @param {cc.Director::Projection} arg0 + */ +setProjection : function ( +projection +) +{ +}, + +/** + * @method multiplyMatrix + * @param {cc.MATRIX_STACK_TYPE} arg0 + * @param {mat4_object} arg1 + */ +multiplyMatrix : function ( +matrix_stack_type, +mat4 +) +{ +}, + +/** + * @method getZEye + * @return {float} + */ +getZEye : function ( +) +{ + return 0; +}, + +/** + * @method setNextDeltaTimeZero + * @param {bool} arg0 + */ +setNextDeltaTimeZero : function ( +bool +) +{ +}, + +/** + * @method popMatrix + * @param {cc.MATRIX_STACK_TYPE} arg0 + */ +popMatrix : function ( +matrix_stack_type +) +{ +}, + +/** + * @method getVisibleSize + * @return {size_object} + */ +getVisibleSize : function ( +) +{ + return cc.Size; +}, + +/** + * @method getScheduler + * @return {cc.Scheduler} + */ +getScheduler : function ( +) +{ + return cc.Scheduler; +}, + +/** + * @method pushScene + * @param {cc.Scene} arg0 + */ +pushScene : function ( +scene +) +{ +}, + +/** + * @method getAnimationInterval + * @return {double} + */ +getAnimationInterval : function ( +) +{ + return 0; +}, + +/** + * @method isPaused + * @return {bool} + */ +isPaused : function ( +) +{ + return false; +}, + +/** + * @method setDisplayStats + * @param {bool} arg0 + */ +setDisplayStats : function ( +bool +) +{ +}, + +/** + * @method getEventDispatcher + * @return {cc.EventDispatcher} + */ +getEventDispatcher : function ( +) +{ + return cc.EventDispatcher; +}, + +/** + * @method replaceScene + * @param {cc.Scene} arg0 + */ +replaceScene : function ( +scene +) +{ +}, + +/** + * @method setAnimationInterval + * @param {double} arg0 + */ +setAnimationInterval : function ( +double +) +{ +}, + +/** + * @method getActionManager + * @return {cc.ActionManager} + */ +getActionManager : function ( +) +{ + return cc.ActionManager; +}, + +/** + * @method getInstance + * @return {cc.Director} + */ +getInstance : function ( +) +{ + return cc.Director; +}, + +}; + +/** + * @class Scheduler + */ +cc.Scheduler = { + +/** + * @method setTimeScale + * @param {float} arg0 + */ +setTimeScale : function ( +float +) +{ +}, + +/** + * @method unscheduleAllWithMinPriority + * @param {int} arg0 + */ +unscheduleAllWithMinPriority : function ( +int +) +{ +}, + +/** + * @method update + * @param {float} arg0 + */ +update : function ( +float +) +{ +}, + +/** + * @method unscheduleScriptEntry + * @param {unsigned int} arg0 + */ +unscheduleScriptEntry : function ( +int +) +{ +}, + +/** + * @method performFunctionInCocosThread + * @param {function} arg0 + */ +performFunctionInCocosThread : function ( +func +) +{ +}, + +/** + * @method unscheduleAll + */ +unscheduleAll : function ( +) +{ +}, + +/** + * @method getTimeScale + * @return {float} + */ +getTimeScale : function ( +) +{ + return 0; +}, + +/** + * @method Scheduler + * @constructor + */ +Scheduler : function ( +) +{ +}, + +}; + +/** + * @class AsyncTaskPool + */ +cc.AsyncTaskPool = { + +/** + * @method stopTasks + * @param {cc.AsyncTaskPool::TaskType} arg0 + */ +stopTasks : function ( +tasktype +) +{ +}, + +/** + * @method destoryInstance + */ +destoryInstance : function ( +) +{ +}, + +/** + * @method getInstance + * @return {cc.AsyncTaskPool} + */ +getInstance : function ( +) +{ + return cc.AsyncTaskPool; +}, + +}; + +/** + * @class Action + */ +cc.Action = { + +/** + * @method startWithTarget + * @param {cc.Node} arg0 + */ +startWithTarget : function ( +node +) +{ +}, + +/** + * @method setOriginalTarget + * @param {cc.Node} arg0 + */ +setOriginalTarget : function ( +node +) +{ +}, + +/** + * @method clone + * @return {cc.Action} + */ +clone : function ( +) +{ + return cc.Action; +}, + +/** + * @method getOriginalTarget + * @return {cc.Node} + */ +getOriginalTarget : function ( +) +{ + return cc.Node; +}, + +/** + * @method stop + */ +stop : function ( +) +{ +}, + +/** + * @method update + * @param {float} arg0 + */ +update : function ( +float +) +{ +}, + +/** + * @method getTarget + * @return {cc.Node} + */ +getTarget : function ( +) +{ + return cc.Node; +}, + +/** + * @method step + * @param {float} arg0 + */ +step : function ( +float +) +{ +}, + +/** + * @method setTag + * @param {int} arg0 + */ +setTag : function ( +int +) +{ +}, + +/** + * @method getTag + * @return {int} + */ +getTag : function ( +) +{ + return 0; +}, + +/** + * @method setTarget + * @param {cc.Node} arg0 + */ +setTarget : function ( +node +) +{ +}, + +/** + * @method isDone + * @return {bool} + */ +isDone : function ( +) +{ + return false; +}, + +/** + * @method reverse + * @return {cc.Action} + */ +reverse : function ( +) +{ + return cc.Action; +}, + +}; + +/** + * @class FiniteTimeAction + */ +cc.FiniteTimeAction = { + +/** + * @method setDuration + * @param {float} arg0 + */ +setDuration : function ( +float +) +{ +}, + +/** + * @method getDuration + * @return {float} + */ +getDuration : function ( +) +{ + return 0; +}, + +}; + +/** + * @class Speed + */ +cc.Speed = { + +/** + * @method setInnerAction + * @param {cc.ActionInterval} arg0 + */ +setInnerAction : function ( +actioninterval +) +{ +}, + +/** + * @method getSpeed + * @return {float} + */ +getSpeed : function ( +) +{ + return 0; +}, + +/** + * @method setSpeed + * @param {float} arg0 + */ +setSpeed : function ( +float +) +{ +}, + +/** + * @method initWithAction + * @param {cc.ActionInterval} arg0 + * @param {float} arg1 + * @return {bool} + */ +initWithAction : function ( +actioninterval, +float +) +{ + return false; +}, + +/** + * @method getInnerAction + * @return {cc.ActionInterval} + */ +getInnerAction : function ( +) +{ + return cc.ActionInterval; +}, + +/** + * @method create + * @param {cc.ActionInterval} arg0 + * @param {float} arg1 + * @return {cc.Speed} + */ +create : function ( +actioninterval, +float +) +{ + return cc.Speed; +}, + +/** + * @method Speed + * @constructor + */ +Speed : function ( +) +{ +}, + +}; + +/** + * @class Follow + */ +cc.Follow = { + +/** + * @method setBoundarySet + * @param {bool} arg0 + */ +setBoundarySet : function ( +bool +) +{ +}, + +/** + * @method initWithTarget + * @param {cc.Node} arg0 + * @param {rect_object} arg1 + * @return {bool} + */ +initWithTarget : function ( +node, +rect +) +{ + return false; +}, + +/** + * @method isBoundarySet + * @return {bool} + */ +isBoundarySet : function ( +) +{ + return false; +}, + +/** + * @method create + * @param {cc.Node} arg0 + * @param {rect_object} arg1 + * @return {cc.Follow} + */ +create : function ( +node, +rect +) +{ + return cc.Follow; +}, + +/** + * @method Follow + * @constructor + */ +Follow : function ( +) +{ +}, + +}; + /** * @class SpriteFrame */ @@ -4143,6 +5282,58 @@ TargetedAction : function ( }; +/** + * @class ActionFloat + */ +cc.ActionFloat = { + +/** + * @method initWithDuration + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {function} arg3 + * @return {bool} + */ +initWithDuration : function ( +float, +float, +float, +func +) +{ + return false; +}, + +/** + * @method create + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {function} arg3 + * @return {cc.ActionFloat} + */ +create : function ( +float, +float, +float, +func +) +{ + return cc.ActionFloat; +}, + +/** + * @method ActionFloat + * @constructor + */ +ActionFloat : function ( +) +{ +}, + +}; + /** * @class Configuration */ @@ -4394,1130 +5585,6 @@ getInstance : function ( }; -/** - * @class Scene - */ -cc.Scene = { - -/** - * @method setCameraOrderDirty - */ -setCameraOrderDirty : function ( -) -{ -}, - -/** - * @method render - * @param {cc.Renderer} arg0 - */ -render : function ( -renderer -) -{ -}, - -/** - * @method onProjectionChanged - * @param {cc.EventCustom} arg0 - */ -onProjectionChanged : function ( -eventcustom -) -{ -}, - -/** - * @method initWithSize - * @param {size_object} arg0 - * @return {bool} - */ -initWithSize : function ( -size -) -{ - return false; -}, - -/** - * @method getDefaultCamera - * @return {cc.Camera} - */ -getDefaultCamera : function ( -) -{ - return cc.Camera; -}, - -/** - * @method createWithSize - * @param {size_object} arg0 - * @return {cc.Scene} - */ -createWithSize : function ( -size -) -{ - return cc.Scene; -}, - -/** - * @method create - * @return {cc.Scene} - */ -create : function ( -) -{ - return cc.Scene; -}, - -/** - * @method Scene - * @constructor - */ -Scene : function ( -) -{ -}, - -}; - -/** - * @class GLView - */ -cc.GLView = { - -/** - * @method setFrameSize - * @param {float} arg0 - * @param {float} arg1 - */ -setFrameSize : function ( -float, -float -) -{ -}, - -/** - * @method getViewPortRect - * @return {rect_object} - */ -getViewPortRect : function ( -) -{ - return cc.Rect; -}, - -/** - * @method setContentScaleFactor - * @param {float} arg0 - * @return {bool} - */ -setContentScaleFactor : function ( -float -) -{ - return false; -}, - -/** - * @method getContentScaleFactor - * @return {float} - */ -getContentScaleFactor : function ( -) -{ - return 0; -}, - -/** - * @method setIMEKeyboardState - * @param {bool} arg0 - */ -setIMEKeyboardState : function ( -bool -) -{ -}, - -/** - * @method setScissorInPoints - * @param {float} arg0 - * @param {float} arg1 - * @param {float} arg2 - * @param {float} arg3 - */ -setScissorInPoints : function ( -float, -float, -float, -float -) -{ -}, - -/** - * @method getViewName - * @return {String} - */ -getViewName : function ( -) -{ - return ; -}, - -/** - * @method isOpenGLReady - * @return {bool} - */ -isOpenGLReady : function ( -) -{ - return false; -}, - -/** - * @method setCursorVisible - * @param {bool} arg0 - */ -setCursorVisible : function ( -bool -) -{ -}, - -/** - * @method getScaleY - * @return {float} - */ -getScaleY : function ( -) -{ - return 0; -}, - -/** - * @method getScaleX - * @return {float} - */ -getScaleX : function ( -) -{ - return 0; -}, - -/** - * @method getVisibleOrigin - * @return {vec2_object} - */ -getVisibleOrigin : function ( -) -{ - return cc.Vec2; -}, - -/** - * @method getFrameSize - * @return {size_object} - */ -getFrameSize : function ( -) -{ - return cc.Size; -}, - -/** - * @method setFrameZoomFactor - * @param {float} arg0 - */ -setFrameZoomFactor : function ( -float -) -{ -}, - -/** - * @method getFrameZoomFactor - * @return {float} - */ -getFrameZoomFactor : function ( -) -{ - return 0; -}, - -/** - * @method getDesignResolutionSize - * @return {size_object} - */ -getDesignResolutionSize : function ( -) -{ - return cc.Size; -}, - -/** - * @method windowShouldClose - * @return {bool} - */ -windowShouldClose : function ( -) -{ - return false; -}, - -/** - * @method setDesignResolutionSize - * @param {float} arg0 - * @param {float} arg1 - * @param {ResolutionPolicy} arg2 - */ -setDesignResolutionSize : function ( -float, -float, -resolutionpolicy -) -{ -}, - -/** - * @method getResolutionPolicy - * @return {ResolutionPolicy} - */ -getResolutionPolicy : function ( -) -{ - return ResolutionPolicy; -}, - -/** - * @method isRetinaDisplay - * @return {bool} - */ -isRetinaDisplay : function ( -) -{ - return false; -}, - -/** - * @method setViewPortInPoints - * @param {float} arg0 - * @param {float} arg1 - * @param {float} arg2 - * @param {float} arg3 - */ -setViewPortInPoints : function ( -float, -float, -float, -float -) -{ -}, - -/** - * @method getScissorRect - * @return {rect_object} - */ -getScissorRect : function ( -) -{ - return cc.Rect; -}, - -/** - * @method getRetinaFactor - * @return {int} - */ -getRetinaFactor : function ( -) -{ - return 0; -}, - -/** - * @method setViewName - * @param {String} arg0 - */ -setViewName : function ( -str -) -{ -}, - -/** - * @method getVisibleRect - * @return {rect_object} - */ -getVisibleRect : function ( -) -{ - return cc.Rect; -}, - -/** - * @method getVisibleSize - * @return {size_object} - */ -getVisibleSize : function ( -) -{ - return cc.Size; -}, - -/** - * @method isScissorEnabled - * @return {bool} - */ -isScissorEnabled : function ( -) -{ - return false; -}, - -/** - * @method pollEvents - */ -pollEvents : function ( -) -{ -}, - -/** - * @method setGLContextAttrs - * @param {GLContextAttrs} arg0 - */ -setGLContextAttrs : function ( -glcontextattrs -) -{ -}, - -/** - * @method getGLContextAttrs - * @return {GLContextAttrs} - */ -getGLContextAttrs : function ( -) -{ - return GLContextAttrs; -}, - -}; - -/** - * @class Director - */ -cc.Director = { - -/** - * @method pause - */ -pause : function ( -) -{ -}, - -/** - * @method setEventDispatcher - * @param {cc.EventDispatcher} arg0 - */ -setEventDispatcher : function ( -eventdispatcher -) -{ -}, - -/** - * @method setContentScaleFactor - * @param {float} arg0 - */ -setContentScaleFactor : function ( -float -) -{ -}, - -/** - * @method getContentScaleFactor - * @return {float} - */ -getContentScaleFactor : function ( -) -{ - return 0; -}, - -/** - * @method getWinSizeInPixels - * @return {size_object} - */ -getWinSizeInPixels : function ( -) -{ - return cc.Size; -}, - -/** - * @method getDeltaTime - * @return {float} - */ -getDeltaTime : function ( -) -{ - return 0; -}, - -/** - * @method setGLDefaultValues - */ -setGLDefaultValues : function ( -) -{ -}, - -/** - * @method setActionManager - * @param {cc.ActionManager} arg0 - */ -setActionManager : function ( -actionmanager -) -{ -}, - -/** - * @method setAlphaBlending - * @param {bool} arg0 - */ -setAlphaBlending : function ( -bool -) -{ -}, - -/** - * @method popToRootScene - */ -popToRootScene : function ( -) -{ -}, - -/** - * @method loadMatrix - * @param {cc.MATRIX_STACK_TYPE} arg0 - * @param {mat4_object} arg1 - */ -loadMatrix : function ( -matrix_stack_type, -mat4 -) -{ -}, - -/** - * @method getNotificationNode - * @return {cc.Node} - */ -getNotificationNode : function ( -) -{ - return cc.Node; -}, - -/** - * @method getWinSize - * @return {size_object} - */ -getWinSize : function ( -) -{ - return cc.Size; -}, - -/** - * @method end - */ -end : function ( -) -{ -}, - -/** - * @method getTextureCache - * @return {cc.TextureCache} - */ -getTextureCache : function ( -) -{ - return cc.TextureCache; -}, - -/** - * @method isSendCleanupToScene - * @return {bool} - */ -isSendCleanupToScene : function ( -) -{ - return false; -}, - -/** - * @method getVisibleOrigin - * @return {vec2_object} - */ -getVisibleOrigin : function ( -) -{ - return cc.Vec2; -}, - -/** - * @method mainLoop - */ -mainLoop : function ( -) -{ -}, - -/** - * @method setDepthTest - * @param {bool} arg0 - */ -setDepthTest : function ( -bool -) -{ -}, - -/** - * @method getFrameRate - * @return {float} - */ -getFrameRate : function ( -) -{ - return 0; -}, - -/** - * @method getSecondsPerFrame - * @return {float} - */ -getSecondsPerFrame : function ( -) -{ - return 0; -}, - -/** - * @method resetMatrixStack - */ -resetMatrixStack : function ( -) -{ -}, - -/** - * @method convertToUI - * @param {vec2_object} arg0 - * @return {vec2_object} - */ -convertToUI : function ( -vec2 -) -{ - return cc.Vec2; -}, - -/** - * @method pushMatrix - * @param {cc.MATRIX_STACK_TYPE} arg0 - */ -pushMatrix : function ( -matrix_stack_type -) -{ -}, - -/** - * @method setDefaultValues - */ -setDefaultValues : function ( -) -{ -}, - -/** - * @method init - * @return {bool} - */ -init : function ( -) -{ - return false; -}, - -/** - * @method setScheduler - * @param {cc.Scheduler} arg0 - */ -setScheduler : function ( -scheduler -) -{ -}, - -/** - * @method getMatrix - * @param {cc.MATRIX_STACK_TYPE} arg0 - * @return {mat4_object} - */ -getMatrix : function ( -matrix_stack_type -) -{ - return cc.Mat4; -}, - -/** - * @method startAnimation - */ -startAnimation : function ( -) -{ -}, - -/** - * @method getOpenGLView - * @return {cc.GLView} - */ -getOpenGLView : function ( -) -{ - return cc.GLView; -}, - -/** - * @method getRunningScene - * @return {cc.Scene} - */ -getRunningScene : function ( -) -{ - return cc.Scene; -}, - -/** - * @method setViewport - */ -setViewport : function ( -) -{ -}, - -/** - * @method stopAnimation - */ -stopAnimation : function ( -) -{ -}, - -/** - * @method popToSceneStackLevel - * @param {int} arg0 - */ -popToSceneStackLevel : function ( -int -) -{ -}, - -/** - * @method resume - */ -resume : function ( -) -{ -}, - -/** - * @method isNextDeltaTimeZero - * @return {bool} - */ -isNextDeltaTimeZero : function ( -) -{ - return false; -}, - -/** - * @method setClearColor - * @param {color4f_object} arg0 - */ -setClearColor : function ( -color4f -) -{ -}, - -/** - * @method setOpenGLView - * @param {cc.GLView} arg0 - */ -setOpenGLView : function ( -glview -) -{ -}, - -/** - * @method convertToGL - * @param {vec2_object} arg0 - * @return {vec2_object} - */ -convertToGL : function ( -vec2 -) -{ - return cc.Vec2; -}, - -/** - * @method purgeCachedData - */ -purgeCachedData : function ( -) -{ -}, - -/** - * @method getTotalFrames - * @return {unsigned int} - */ -getTotalFrames : function ( -) -{ - return 0; -}, - -/** - * @method runWithScene - * @param {cc.Scene} arg0 - */ -runWithScene : function ( -scene -) -{ -}, - -/** - * @method setNotificationNode - * @param {cc.Node} arg0 - */ -setNotificationNode : function ( -node -) -{ -}, - -/** - * @method drawScene - */ -drawScene : function ( -) -{ -}, - -/** - * @method restart - */ -restart : function ( -) -{ -}, - -/** - * @method popScene - */ -popScene : function ( -) -{ -}, - -/** - * @method loadIdentityMatrix - * @param {cc.MATRIX_STACK_TYPE} arg0 - */ -loadIdentityMatrix : function ( -matrix_stack_type -) -{ -}, - -/** - * @method isDisplayStats - * @return {bool} - */ -isDisplayStats : function ( -) -{ - return false; -}, - -/** - * @method setProjection - * @param {cc.Director::Projection} arg0 - */ -setProjection : function ( -projection -) -{ -}, - -/** - * @method multiplyMatrix - * @param {cc.MATRIX_STACK_TYPE} arg0 - * @param {mat4_object} arg1 - */ -multiplyMatrix : function ( -matrix_stack_type, -mat4 -) -{ -}, - -/** - * @method getZEye - * @return {float} - */ -getZEye : function ( -) -{ - return 0; -}, - -/** - * @method setNextDeltaTimeZero - * @param {bool} arg0 - */ -setNextDeltaTimeZero : function ( -bool -) -{ -}, - -/** - * @method popMatrix - * @param {cc.MATRIX_STACK_TYPE} arg0 - */ -popMatrix : function ( -matrix_stack_type -) -{ -}, - -/** - * @method getVisibleSize - * @return {size_object} - */ -getVisibleSize : function ( -) -{ - return cc.Size; -}, - -/** - * @method getScheduler - * @return {cc.Scheduler} - */ -getScheduler : function ( -) -{ - return cc.Scheduler; -}, - -/** - * @method pushScene - * @param {cc.Scene} arg0 - */ -pushScene : function ( -scene -) -{ -}, - -/** - * @method getAnimationInterval - * @return {double} - */ -getAnimationInterval : function ( -) -{ - return 0; -}, - -/** - * @method isPaused - * @return {bool} - */ -isPaused : function ( -) -{ - return false; -}, - -/** - * @method setDisplayStats - * @param {bool} arg0 - */ -setDisplayStats : function ( -bool -) -{ -}, - -/** - * @method getEventDispatcher - * @return {cc.EventDispatcher} - */ -getEventDispatcher : function ( -) -{ - return cc.EventDispatcher; -}, - -/** - * @method replaceScene - * @param {cc.Scene} arg0 - */ -replaceScene : function ( -scene -) -{ -}, - -/** - * @method setAnimationInterval - * @param {double} arg0 - */ -setAnimationInterval : function ( -double -) -{ -}, - -/** - * @method getActionManager - * @return {cc.ActionManager} - */ -getActionManager : function ( -) -{ - return cc.ActionManager; -}, - -/** - * @method getInstance - * @return {cc.Director} - */ -getInstance : function ( -) -{ - return cc.Director; -}, - -}; - -/** - * @class Scheduler - */ -cc.Scheduler = { - -/** - * @method setTimeScale - * @param {float} arg0 - */ -setTimeScale : function ( -float -) -{ -}, - -/** - * @method unscheduleAllWithMinPriority - * @param {int} arg0 - */ -unscheduleAllWithMinPriority : function ( -int -) -{ -}, - -/** - * @method update - * @param {float} arg0 - */ -update : function ( -float -) -{ -}, - -/** - * @method unscheduleScriptEntry - * @param {unsigned int} arg0 - */ -unscheduleScriptEntry : function ( -int -) -{ -}, - -/** - * @method performFunctionInCocosThread - * @param {function} arg0 - */ -performFunctionInCocosThread : function ( -func -) -{ -}, - -/** - * @method unscheduleAll - */ -unscheduleAll : function ( -) -{ -}, - -/** - * @method getTimeScale - * @return {float} - */ -getTimeScale : function ( -) -{ - return 0; -}, - -/** - * @method Scheduler - * @constructor - */ -Scheduler : function ( -) -{ -}, - -}; - /** * @class FileUtils */ @@ -5879,6 +5946,52 @@ getInstance : function ( }; +/** + * @class EventAcceleration + */ +cc.EventAcceleration = { + +/** + * @method EventAcceleration + * @constructor + * @param {cc.Acceleration} arg0 + */ +EventAcceleration : function ( +acceleration +) +{ +}, + +}; + +/** + * @class EventCustom + */ +cc.EventCustom = { + +/** + * @method getEventName + * @return {String} + */ +getEventName : function ( +) +{ + return ; +}, + +/** + * @method EventCustom + * @constructor + * @param {String} arg0 + */ +EventCustom : function ( +str +) +{ +}, + +}; + /** * @class EventListener */ @@ -6087,45 +6200,19 @@ EventDispatcher : function ( }; /** - * @class EventListenerTouchOneByOne + * @class EventFocus */ -cc.EventListenerTouchOneByOne = { +cc.EventFocus = { /** - * @method isSwallowTouches - * @return {bool} - */ -isSwallowTouches : function ( -) -{ - return false; -}, - -/** - * @method setSwallowTouches - * @param {bool} arg0 - */ -setSwallowTouches : function ( -bool -) -{ -}, - -/** - * @method init - * @return {bool} - */ -init : function ( -) -{ - return false; -}, - -/** - * @method EventListenerTouchOneByOne + * @method EventFocus * @constructor + * @param {ccui.Widget} arg0 + * @param {ccui.Widget} arg1 */ -EventListenerTouchOneByOne : function ( +EventFocus : function ( +widget, +widget ) { }, @@ -6133,9 +6220,79 @@ EventListenerTouchOneByOne : function ( }; /** - * @class EventListenerTouchAllAtOnce + * @class EventListenerAcceleration */ -cc.EventListenerTouchAllAtOnce = { +cc.EventListenerAcceleration = { + +/** + * @method init + * @param {function} arg0 + * @return {bool} + */ +init : function ( +func +) +{ + return false; +}, + +/** + * @method create + * @param {function} arg0 + * @return {cc.EventListenerAcceleration} + */ +create : function ( +func +) +{ + return cc.EventListenerAcceleration; +}, + +/** + * @method EventListenerAcceleration + * @constructor + */ +EventListenerAcceleration : function ( +) +{ +}, + +}; + +/** + * @class EventListenerCustom + */ +cc.EventListenerCustom = { + +/** + * @method create + * @param {String} arg0 + * @param {function} arg1 + * @return {cc.EventListenerCustom} + */ +create : function ( +str, +func +) +{ + return cc.EventListenerCustom; +}, + +/** + * @method EventListenerCustom + * @constructor + */ +EventListenerCustom : function ( +) +{ +}, + +}; + +/** + * @class EventListenerFocus + */ +cc.EventListenerFocus = { /** * @method init @@ -6148,10 +6305,10 @@ init : function ( }, /** - * @method EventListenerTouchAllAtOnce + * @method EventListenerFocus * @constructor */ -EventListenerTouchAllAtOnce : function ( +EventListenerFocus : function ( ) { }, @@ -6383,146 +6540,30 @@ EventListenerMouse : function ( }; /** - * @class EventAcceleration + * @class EventListenerTouchOneByOne */ -cc.EventAcceleration = { +cc.EventListenerTouchOneByOne = { /** - * @method EventAcceleration - * @constructor - * @param {cc.Acceleration} arg0 - */ -EventAcceleration : function ( -acceleration -) -{ -}, - -}; - -/** - * @class EventListenerAcceleration - */ -cc.EventListenerAcceleration = { - -/** - * @method init - * @param {function} arg0 + * @method isSwallowTouches * @return {bool} */ -init : function ( -func +isSwallowTouches : function ( ) { return false; }, /** - * @method create - * @param {function} arg0 - * @return {cc.EventListenerAcceleration} + * @method setSwallowTouches + * @param {bool} arg0 */ -create : function ( -func -) -{ - return cc.EventListenerAcceleration; -}, - -/** - * @method EventListenerAcceleration - * @constructor - */ -EventListenerAcceleration : function ( +setSwallowTouches : function ( +bool ) { }, -}; - -/** - * @class EventCustom - */ -cc.EventCustom = { - -/** - * @method getEventName - * @return {String} - */ -getEventName : function ( -) -{ - return ; -}, - -/** - * @method EventCustom - * @constructor - * @param {String} arg0 - */ -EventCustom : function ( -str -) -{ -}, - -}; - -/** - * @class EventListenerCustom - */ -cc.EventListenerCustom = { - -/** - * @method create - * @param {String} arg0 - * @param {function} arg1 - * @return {cc.EventListenerCustom} - */ -create : function ( -str, -func -) -{ - return cc.EventListenerCustom; -}, - -/** - * @method EventListenerCustom - * @constructor - */ -EventListenerCustom : function ( -) -{ -}, - -}; - -/** - * @class EventFocus - */ -cc.EventFocus = { - -/** - * @method EventFocus - * @constructor - * @param {ccui.Widget} arg0 - * @param {ccui.Widget} arg1 - */ -EventFocus : function ( -widget, -widget -) -{ -}, - -}; - -/** - * @class EventListenerFocus - */ -cc.EventListenerFocus = { - /** * @method init * @return {bool} @@ -6534,10 +6575,36 @@ init : function ( }, /** - * @method EventListenerFocus + * @method EventListenerTouchOneByOne * @constructor */ -EventListenerFocus : function ( +EventListenerTouchOneByOne : function ( +) +{ +}, + +}; + +/** + * @class EventListenerTouchAllAtOnce + */ +cc.EventListenerTouchAllAtOnce = { + +/** + * @method init + * @return {bool} + */ +init : function ( +) +{ + return false; +}, + +/** + * @method EventListenerTouchAllAtOnce + * @constructor + */ +EventListenerTouchAllAtOnce : function ( ) { }, @@ -6703,163 +6770,71 @@ OrbitCamera : function ( }; /** - * @class ActionManager + * @class CardinalSplineTo */ -cc.ActionManager = { +cc.CardinalSplineTo = { /** - * @method getActionByTag - * @param {int} arg0 - * @param {cc.Node} arg1 - * @return {cc.Action} + * @method getPoints + * @return {point_object} */ -getActionByTag : function ( -int, -node +getPoints : function ( ) { - return cc.Action; + return cc.PointArray; }, /** - * @method removeActionByTag - * @param {int} arg0 - * @param {cc.Node} arg1 + * @method updatePosition + * @param {vec2_object} arg0 */ -removeActionByTag : function ( -int, -node +updatePosition : function ( +vec2 ) { }, /** - * @method removeAllActions - */ -removeAllActions : function ( -) -{ -}, - -/** - * @method addAction - * @param {cc.Action} arg0 - * @param {cc.Node} arg1 - * @param {bool} arg2 - */ -addAction : function ( -action, -node, -bool -) -{ -}, - -/** - * @method resumeTarget - * @param {cc.Node} arg0 - */ -resumeTarget : function ( -node -) -{ -}, - -/** - * @method update - * @param {float} arg0 - */ -update : function ( -float -) -{ -}, - -/** - * @method pauseTarget - * @param {cc.Node} arg0 - */ -pauseTarget : function ( -node -) -{ -}, - -/** - * @method getNumberOfRunningActionsInTarget - * @param {cc.Node} arg0 - * @return {long} - */ -getNumberOfRunningActionsInTarget : function ( -node -) -{ - return 0; -}, - -/** - * @method removeAllActionsFromTarget - * @param {cc.Node} arg0 - */ -removeAllActionsFromTarget : function ( -node -) -{ -}, - -/** - * @method resumeTargets - * @param {Array} arg0 - */ -resumeTargets : function ( -array -) -{ -}, - -/** - * @method removeAction - * @param {cc.Action} arg0 - */ -removeAction : function ( -action -) -{ -}, - -/** - * @method removeAllActionsByTag - * @param {int} arg0 - * @param {cc.Node} arg1 - */ -removeAllActionsByTag : function ( -int, -node -) -{ -}, - -/** - * @method pauseAllRunningActions - * @return {Array} - */ -pauseAllRunningActions : function ( -) -{ - return new Array(); -}, - -/** - * @method ActionManager + * @method CardinalSplineTo * @constructor */ -ActionManager : function ( +CardinalSplineTo : function ( ) { }, }; +/** + * @class CardinalSplineBy + */ +cc.CardinalSplineBy = { + +/** + * @method CardinalSplineBy + * @constructor + */ +CardinalSplineBy : function ( +) +{ +}, + +}; + +/** + * @class CatmullRomTo + */ +cc.CatmullRomTo = { + +}; + +/** + * @class CatmullRomBy + */ +cc.CatmullRomBy = { + +}; + /** * @class ActionEase */ @@ -9122,6 +9097,164 @@ Twirl : function ( }; +/** + * @class ActionManager + */ +cc.ActionManager = { + +/** + * @method getActionByTag + * @param {int} arg0 + * @param {cc.Node} arg1 + * @return {cc.Action} + */ +getActionByTag : function ( +int, +node +) +{ + return cc.Action; +}, + +/** + * @method removeActionByTag + * @param {int} arg0 + * @param {cc.Node} arg1 + */ +removeActionByTag : function ( +int, +node +) +{ +}, + +/** + * @method removeAllActions + */ +removeAllActions : function ( +) +{ +}, + +/** + * @method addAction + * @param {cc.Action} arg0 + * @param {cc.Node} arg1 + * @param {bool} arg2 + */ +addAction : function ( +action, +node, +bool +) +{ +}, + +/** + * @method resumeTarget + * @param {cc.Node} arg0 + */ +resumeTarget : function ( +node +) +{ +}, + +/** + * @method update + * @param {float} arg0 + */ +update : function ( +float +) +{ +}, + +/** + * @method pauseTarget + * @param {cc.Node} arg0 + */ +pauseTarget : function ( +node +) +{ +}, + +/** + * @method getNumberOfRunningActionsInTarget + * @param {cc.Node} arg0 + * @return {long} + */ +getNumberOfRunningActionsInTarget : function ( +node +) +{ + return 0; +}, + +/** + * @method removeAllActionsFromTarget + * @param {cc.Node} arg0 + */ +removeAllActionsFromTarget : function ( +node +) +{ +}, + +/** + * @method resumeTargets + * @param {Array} arg0 + */ +resumeTargets : function ( +array +) +{ +}, + +/** + * @method removeAction + * @param {cc.Action} arg0 + */ +removeAction : function ( +action +) +{ +}, + +/** + * @method removeAllActionsByTag + * @param {int} arg0 + * @param {cc.Node} arg1 + */ +removeAllActionsByTag : function ( +int, +node +) +{ +}, + +/** + * @method pauseAllRunningActions + * @return {Array} + */ +pauseAllRunningActions : function ( +) +{ + return new Array(); +}, + +/** + * @method ActionManager + * @constructor + */ +ActionManager : function ( +) +{ +}, + +}; + /** * @class PageTurn3D */ @@ -9984,202 +10117,6 @@ float }; -/** - * @class CardinalSplineTo - */ -cc.CardinalSplineTo = { - -/** - * @method getPoints - * @return {point_object} - */ -getPoints : function ( -) -{ - return cc.PointArray; -}, - -/** - * @method updatePosition - * @param {vec2_object} arg0 - */ -updatePosition : function ( -vec2 -) -{ -}, - -/** - * @method CardinalSplineTo - * @constructor - */ -CardinalSplineTo : function ( -) -{ -}, - -}; - -/** - * @class CardinalSplineBy - */ -cc.CardinalSplineBy = { - -/** - * @method CardinalSplineBy - * @constructor - */ -CardinalSplineBy : function ( -) -{ -}, - -}; - -/** - * @class CatmullRomTo - */ -cc.CatmullRomTo = { - -}; - -/** - * @class CatmullRomBy - */ -cc.CatmullRomBy = { - -}; - -/** - * @class ProtectedNode - */ -cc.ProtectedNode = { - -/** - * @method addProtectedChild -* @param {cc.Node|cc.Node|cc.Node} node -* @param {int|int} int -* @param {int} int -*/ -addProtectedChild : function( -node, -int, -int -) -{ -}, - -/** - * @method disableCascadeColor - */ -disableCascadeColor : function ( -) -{ -}, - -/** - * @method removeProtectedChildByTag - * @param {int} arg0 - * @param {bool} arg1 - */ -removeProtectedChildByTag : function ( -int, -bool -) -{ -}, - -/** - * @method reorderProtectedChild - * @param {cc.Node} arg0 - * @param {int} arg1 - */ -reorderProtectedChild : function ( -node, -int -) -{ -}, - -/** - * @method removeAllProtectedChildrenWithCleanup - * @param {bool} arg0 - */ -removeAllProtectedChildrenWithCleanup : function ( -bool -) -{ -}, - -/** - * @method disableCascadeOpacity - */ -disableCascadeOpacity : function ( -) -{ -}, - -/** - * @method sortAllProtectedChildren - */ -sortAllProtectedChildren : function ( -) -{ -}, - -/** - * @method getProtectedChildByTag - * @param {int} arg0 - * @return {cc.Node} - */ -getProtectedChildByTag : function ( -int -) -{ - return cc.Node; -}, - -/** - * @method removeProtectedChild - * @param {cc.Node} arg0 - * @param {bool} arg1 - */ -removeProtectedChild : function ( -node, -bool -) -{ -}, - -/** - * @method removeAllProtectedChildren - */ -removeAllProtectedChildren : function ( -) -{ -}, - -/** - * @method create - * @return {cc.ProtectedNode} - */ -create : function ( -) -{ - return cc.ProtectedNode; -}, - -/** - * @method ProtectedNode - * @constructor - */ -ProtectedNode : function ( -) -{ -}, - -}; - /** * @class GLProgramState */ @@ -10278,13 +10215,13 @@ int /** * @method setUniformVec2v * @param {int|String} int -* @param {vec2_object|vec2_object} vec2 * @param {long|long} long +* @param {vec2_object|vec2_object} vec2 */ setUniformVec2v : function( str, -vec2, -long +long, +vec2 ) { }, @@ -10330,13 +10267,13 @@ glprogram /** * @method setUniformFloatv * @param {int|String} int -* @param {float|float} float * @param {long|long} long +* @param {float|float} float */ setUniformFloatv : function( str, -float, -long +long, +float ) { }, @@ -10398,13 +10335,13 @@ mat4 /** * @method setUniformVec3v * @param {int|String} int -* @param {vec3_object|vec3_object} vec3 * @param {long|long} long +* @param {vec3_object|vec3_object} vec3 */ setUniformVec3v : function( str, -vec3, -long +long, +vec3 ) { }, @@ -10631,6 +10568,104 @@ AtlasNode : function ( }; +/** + * @class ClippingNode + */ +cc.ClippingNode = { + +/** + * @method hasContent + * @return {bool} + */ +hasContent : function ( +) +{ + return false; +}, + +/** + * @method setInverted + * @param {bool} arg0 + */ +setInverted : function ( +bool +) +{ +}, + +/** + * @method setStencil + * @param {cc.Node} arg0 + */ +setStencil : function ( +node +) +{ +}, + +/** + * @method getAlphaThreshold + * @return {float} + */ +getAlphaThreshold : function ( +) +{ + return 0; +}, + +/** + * @method getStencil + * @return {cc.Node} + */ +getStencil : function ( +) +{ + return cc.Node; +}, + +/** + * @method setAlphaThreshold + * @param {float} arg0 + */ +setAlphaThreshold : function ( +float +) +{ +}, + +/** + * @method isInverted + * @return {bool} + */ +isInverted : function ( +) +{ + return false; +}, + +/** + * @method create +* @param {cc.Node} node +* @return {cc.ClippingNode|cc.ClippingNode} +*/ +create : function( +node +) +{ + return cc.ClippingNode; +}, + +/** + * @method ClippingNode + * @constructor + */ +ClippingNode : function ( +) +{ +}, + +}; + /** * @class DrawNode */ @@ -10987,408 +11022,6 @@ DrawNode : function ( }; -/** - * @class LabelAtlas - */ -cc.LabelAtlas = { - -/** - * @method setString - * @param {String} arg0 - */ -setString : function ( -str -) -{ -}, - -/** - * @method initWithString -* @param {String|String|String} str -* @param {String|String|cc.Texture2D} str -* @param {int|int} int -* @param {int|int} int -* @param {int|int} int -* @return {bool|bool|bool} -*/ -initWithString : function( -str, -texture2d, -int, -int, -int -) -{ - return false; -}, - -/** - * @method getString - * @return {String} - */ -getString : function ( -) -{ - return ; -}, - -/** - * @method create -* @param {String|String} str -* @param {String|String} str -* @param {int} int -* @param {int} int -* @param {int} int -* @return {cc.LabelAtlas|cc.LabelAtlas|cc.LabelAtlas} -*/ -create : function( -str, -str, -int, -int, -int -) -{ - return cc.LabelAtlas; -}, - -/** - * @method LabelAtlas - * @constructor - */ -LabelAtlas : function ( -) -{ -}, - -}; - -/** - * @class LabelTTF - */ -cc.LabelTTF = { - -/** - * @method enableShadow - * @param {size_object} arg0 - * @param {float} arg1 - * @param {float} arg2 - * @param {bool} arg3 - */ -enableShadow : function ( -size, -float, -float, -bool -) -{ -}, - -/** - * @method setDimensions - * @param {size_object} arg0 - */ -setDimensions : function ( -size -) -{ -}, - -/** - * @method getFontSize - * @return {float} - */ -getFontSize : function ( -) -{ - return 0; -}, - -/** - * @method getString - * @return {String} - */ -getString : function ( -) -{ - return ; -}, - -/** - * @method setFlippedY - * @param {bool} arg0 - */ -setFlippedY : function ( -bool -) -{ -}, - -/** - * @method setFlippedX - * @param {bool} arg0 - */ -setFlippedX : function ( -bool -) -{ -}, - -/** - * @method setTextDefinition - * @param {cc.FontDefinition} arg0 - */ -setTextDefinition : function ( -fontdefinition -) -{ -}, - -/** - * @method setFontName - * @param {String} arg0 - */ -setFontName : function ( -str -) -{ -}, - -/** - * @method getHorizontalAlignment - * @return {cc.TextHAlignment} - */ -getHorizontalAlignment : function ( -) -{ - return 0; -}, - -/** - * @method initWithStringAndTextDefinition - * @param {String} arg0 - * @param {cc.FontDefinition} arg1 - * @return {bool} - */ -initWithStringAndTextDefinition : function ( -str, -fontdefinition -) -{ - return false; -}, - -/** - * @method setString - * @param {String} arg0 - */ -setString : function ( -str -) -{ -}, - -/** - * @method initWithString - * @param {String} arg0 - * @param {String} arg1 - * @param {float} arg2 - * @param {size_object} arg3 - * @param {cc.TextHAlignment} arg4 - * @param {cc.TextVAlignment} arg5 - * @return {bool} - */ -initWithString : function ( -str, -str, -float, -size, -texthalignment, -textvalignment -) -{ - return false; -}, - -/** - * @method setFontFillColor - * @param {color3b_object} arg0 - * @param {bool} arg1 - */ -setFontFillColor : function ( -color3b, -bool -) -{ -}, - -/** - * @method getBlendFunc - * @return {cc.BlendFunc} - */ -getBlendFunc : function ( -) -{ - return cc.BlendFunc; -}, - -/** - * @method enableStroke - * @param {color3b_object} arg0 - * @param {float} arg1 - * @param {bool} arg2 - */ -enableStroke : function ( -color3b, -float, -bool -) -{ -}, - -/** - * @method getDimensions - * @return {size_object} - */ -getDimensions : function ( -) -{ - return cc.Size; -}, - -/** - * @method setVerticalAlignment - * @param {cc.TextVAlignment} arg0 - */ -setVerticalAlignment : function ( -textvalignment -) -{ -}, - -/** - * @method setFontSize - * @param {float} arg0 - */ -setFontSize : function ( -float -) -{ -}, - -/** - * @method getVerticalAlignment - * @return {cc.TextVAlignment} - */ -getVerticalAlignment : function ( -) -{ - return 0; -}, - -/** - * @method getTextDefinition - * @return {cc.FontDefinition} - */ -getTextDefinition : function ( -) -{ - return cc.FontDefinition; -}, - -/** - * @method setBlendFunc - * @param {cc.BlendFunc} arg0 - */ -setBlendFunc : function ( -blendfunc -) -{ -}, - -/** - * @method getFontName - * @return {String} - */ -getFontName : function ( -) -{ - return ; -}, - -/** - * @method setHorizontalAlignment - * @param {cc.TextHAlignment} arg0 - */ -setHorizontalAlignment : function ( -texthalignment -) -{ -}, - -/** - * @method disableShadow - */ -disableShadow : function ( -) -{ -}, - -/** - * @method disableStroke - */ -disableStroke : function ( -) -{ -}, - -/** - * @method create -* @param {String} str -* @param {String} str -* @param {float} float -* @param {size_object} size -* @param {cc.TextHAlignment} texthalignment -* @param {cc.TextVAlignment} textvalignment -* @return {cc.LabelTTF|cc.LabelTTF} -*/ -create : function( -str, -str, -float, -size, -texthalignment, -textvalignment -) -{ - return cc.LabelTTF; -}, - -/** - * @method createWithFontDefinition - * @param {String} arg0 - * @param {cc.FontDefinition} arg1 - * @return {cc.LabelTTF} - */ -createWithFontDefinition : function ( -str, -fontdefinition -) -{ - return cc.LabelTTF; -}, - -/** - * @method LabelTTF - * @constructor - */ -LabelTTF : function ( -) -{ -}, - -}; - /** * @class SpriteBatchNode */ @@ -12171,6 +11804,82 @@ Label : function ( }; +/** + * @class LabelAtlas + */ +cc.LabelAtlas = { + +/** + * @method setString + * @param {String} arg0 + */ +setString : function ( +str +) +{ +}, + +/** + * @method initWithString +* @param {String|String|String} str +* @param {String|String|cc.Texture2D} str +* @param {int|int} int +* @param {int|int} int +* @param {int|int} int +* @return {bool|bool|bool} +*/ +initWithString : function( +str, +texture2d, +int, +int, +int +) +{ + return false; +}, + +/** + * @method getString + * @return {String} + */ +getString : function ( +) +{ + return ; +}, + +/** + * @method create +* @param {String|String} str +* @param {String|String} str +* @param {int} int +* @param {int} int +* @param {int} int +* @return {cc.LabelAtlas|cc.LabelAtlas|cc.LabelAtlas} +*/ +create : function( +str, +str, +int, +int, +int +) +{ + return cc.LabelAtlas; +}, + +/** + * @method LabelAtlas + * @constructor + */ +LabelAtlas : function ( +) +{ +}, + +}; + /** * @class LabelBMFont */ @@ -12331,6 +12040,332 @@ LabelBMFont : function ( }; +/** + * @class LabelTTF + */ +cc.LabelTTF = { + +/** + * @method enableShadow + * @param {size_object} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {bool} arg3 + */ +enableShadow : function ( +size, +float, +float, +bool +) +{ +}, + +/** + * @method setDimensions + * @param {size_object} arg0 + */ +setDimensions : function ( +size +) +{ +}, + +/** + * @method getFontSize + * @return {float} + */ +getFontSize : function ( +) +{ + return 0; +}, + +/** + * @method getString + * @return {String} + */ +getString : function ( +) +{ + return ; +}, + +/** + * @method setFlippedY + * @param {bool} arg0 + */ +setFlippedY : function ( +bool +) +{ +}, + +/** + * @method setFlippedX + * @param {bool} arg0 + */ +setFlippedX : function ( +bool +) +{ +}, + +/** + * @method setTextDefinition + * @param {cc.FontDefinition} arg0 + */ +setTextDefinition : function ( +fontdefinition +) +{ +}, + +/** + * @method setFontName + * @param {String} arg0 + */ +setFontName : function ( +str +) +{ +}, + +/** + * @method getHorizontalAlignment + * @return {cc.TextHAlignment} + */ +getHorizontalAlignment : function ( +) +{ + return 0; +}, + +/** + * @method initWithStringAndTextDefinition + * @param {String} arg0 + * @param {cc.FontDefinition} arg1 + * @return {bool} + */ +initWithStringAndTextDefinition : function ( +str, +fontdefinition +) +{ + return false; +}, + +/** + * @method setString + * @param {String} arg0 + */ +setString : function ( +str +) +{ +}, + +/** + * @method initWithString + * @param {String} arg0 + * @param {String} arg1 + * @param {float} arg2 + * @param {size_object} arg3 + * @param {cc.TextHAlignment} arg4 + * @param {cc.TextVAlignment} arg5 + * @return {bool} + */ +initWithString : function ( +str, +str, +float, +size, +texthalignment, +textvalignment +) +{ + return false; +}, + +/** + * @method setFontFillColor + * @param {color3b_object} arg0 + * @param {bool} arg1 + */ +setFontFillColor : function ( +color3b, +bool +) +{ +}, + +/** + * @method getBlendFunc + * @return {cc.BlendFunc} + */ +getBlendFunc : function ( +) +{ + return cc.BlendFunc; +}, + +/** + * @method enableStroke + * @param {color3b_object} arg0 + * @param {float} arg1 + * @param {bool} arg2 + */ +enableStroke : function ( +color3b, +float, +bool +) +{ +}, + +/** + * @method getDimensions + * @return {size_object} + */ +getDimensions : function ( +) +{ + return cc.Size; +}, + +/** + * @method setVerticalAlignment + * @param {cc.TextVAlignment} arg0 + */ +setVerticalAlignment : function ( +textvalignment +) +{ +}, + +/** + * @method setFontSize + * @param {float} arg0 + */ +setFontSize : function ( +float +) +{ +}, + +/** + * @method getVerticalAlignment + * @return {cc.TextVAlignment} + */ +getVerticalAlignment : function ( +) +{ + return 0; +}, + +/** + * @method getTextDefinition + * @return {cc.FontDefinition} + */ +getTextDefinition : function ( +) +{ + return cc.FontDefinition; +}, + +/** + * @method setBlendFunc + * @param {cc.BlendFunc} arg0 + */ +setBlendFunc : function ( +blendfunc +) +{ +}, + +/** + * @method getFontName + * @return {String} + */ +getFontName : function ( +) +{ + return ; +}, + +/** + * @method setHorizontalAlignment + * @param {cc.TextHAlignment} arg0 + */ +setHorizontalAlignment : function ( +texthalignment +) +{ +}, + +/** + * @method disableShadow + */ +disableShadow : function ( +) +{ +}, + +/** + * @method disableStroke + */ +disableStroke : function ( +) +{ +}, + +/** + * @method create +* @param {String} str +* @param {String} str +* @param {float} float +* @param {size_object} size +* @param {cc.TextHAlignment} texthalignment +* @param {cc.TextVAlignment} textvalignment +* @return {cc.LabelTTF|cc.LabelTTF} +*/ +create : function( +str, +str, +float, +size, +texthalignment, +textvalignment +) +{ + return cc.LabelTTF; +}, + +/** + * @method createWithFontDefinition + * @param {String} arg0 + * @param {cc.FontDefinition} arg1 + * @return {cc.LabelTTF} + */ +createWithFontDefinition : function ( +str, +fontdefinition +) +{ + return cc.LabelTTF; +}, + +/** + * @method LabelTTF + * @constructor + */ +LabelTTF : function ( +) +{ +}, + +}; + /** * @class Layer */ @@ -12709,1347 +12744,6 @@ LayerMultiplex : function ( }; -/** - * @class TransitionEaseScene - */ -cc.TransitionEaseScene = { - -/** - * @method easeActionWithAction - * @param {cc.ActionInterval} arg0 - * @return {cc.ActionInterval} - */ -easeActionWithAction : function ( -actioninterval -) -{ - return cc.ActionInterval; -}, - -}; - -/** - * @class TransitionScene - */ -cc.TransitionScene = { - -/** - * @method getInScene - * @return {cc.Scene} - */ -getInScene : function ( -) -{ - return cc.Scene; -}, - -/** - * @method finish - */ -finish : function ( -) -{ -}, - -/** - * @method initWithDuration - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {bool} - */ -initWithDuration : function ( -float, -scene -) -{ - return false; -}, - -/** - * @method getDuration - * @return {float} - */ -getDuration : function ( -) -{ - return 0; -}, - -/** - * @method hideOutShowIn - */ -hideOutShowIn : function ( -) -{ -}, - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionScene} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionScene; -}, - -/** - * @method TransitionScene - * @constructor - */ -TransitionScene : function ( -) -{ -}, - -}; - -/** - * @class TransitionSceneOriented - */ -cc.TransitionSceneOriented = { - -/** - * @method initWithDuration - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @param {cc.TransitionScene::Orientation} arg2 - * @return {bool} - */ -initWithDuration : function ( -float, -scene, -orientation -) -{ - return false; -}, - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @param {cc.TransitionScene::Orientation} arg2 - * @return {cc.TransitionSceneOriented} - */ -create : function ( -float, -scene, -orientation -) -{ - return cc.TransitionSceneOriented; -}, - -/** - * @method TransitionSceneOriented - * @constructor - */ -TransitionSceneOriented : function ( -) -{ -}, - -}; - -/** - * @class TransitionRotoZoom - */ -cc.TransitionRotoZoom = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionRotoZoom} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionRotoZoom; -}, - -/** - * @method TransitionRotoZoom - * @constructor - */ -TransitionRotoZoom : function ( -) -{ -}, - -}; - -/** - * @class TransitionJumpZoom - */ -cc.TransitionJumpZoom = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionJumpZoom} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionJumpZoom; -}, - -/** - * @method TransitionJumpZoom - * @constructor - */ -TransitionJumpZoom : function ( -) -{ -}, - -}; - -/** - * @class TransitionMoveInL - */ -cc.TransitionMoveInL = { - -/** - * @method action - * @return {cc.ActionInterval} - */ -action : function ( -) -{ - return cc.ActionInterval; -}, - -/** - * @method easeActionWithAction - * @param {cc.ActionInterval} arg0 - * @return {cc.ActionInterval} - */ -easeActionWithAction : function ( -actioninterval -) -{ - return cc.ActionInterval; -}, - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionMoveInL} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionMoveInL; -}, - -/** - * @method TransitionMoveInL - * @constructor - */ -TransitionMoveInL : function ( -) -{ -}, - -}; - -/** - * @class TransitionMoveInR - */ -cc.TransitionMoveInR = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionMoveInR} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionMoveInR; -}, - -/** - * @method TransitionMoveInR - * @constructor - */ -TransitionMoveInR : function ( -) -{ -}, - -}; - -/** - * @class TransitionMoveInT - */ -cc.TransitionMoveInT = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionMoveInT} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionMoveInT; -}, - -/** - * @method TransitionMoveInT - * @constructor - */ -TransitionMoveInT : function ( -) -{ -}, - -}; - -/** - * @class TransitionMoveInB - */ -cc.TransitionMoveInB = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionMoveInB} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionMoveInB; -}, - -/** - * @method TransitionMoveInB - * @constructor - */ -TransitionMoveInB : function ( -) -{ -}, - -}; - -/** - * @class TransitionSlideInL - */ -cc.TransitionSlideInL = { - -/** - * @method action - * @return {cc.ActionInterval} - */ -action : function ( -) -{ - return cc.ActionInterval; -}, - -/** - * @method easeActionWithAction - * @param {cc.ActionInterval} arg0 - * @return {cc.ActionInterval} - */ -easeActionWithAction : function ( -actioninterval -) -{ - return cc.ActionInterval; -}, - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionSlideInL} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionSlideInL; -}, - -/** - * @method TransitionSlideInL - * @constructor - */ -TransitionSlideInL : function ( -) -{ -}, - -}; - -/** - * @class TransitionSlideInR - */ -cc.TransitionSlideInR = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionSlideInR} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionSlideInR; -}, - -/** - * @method TransitionSlideInR - * @constructor - */ -TransitionSlideInR : function ( -) -{ -}, - -}; - -/** - * @class TransitionSlideInB - */ -cc.TransitionSlideInB = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionSlideInB} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionSlideInB; -}, - -/** - * @method TransitionSlideInB - * @constructor - */ -TransitionSlideInB : function ( -) -{ -}, - -}; - -/** - * @class TransitionSlideInT - */ -cc.TransitionSlideInT = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionSlideInT} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionSlideInT; -}, - -/** - * @method TransitionSlideInT - * @constructor - */ -TransitionSlideInT : function ( -) -{ -}, - -}; - -/** - * @class TransitionShrinkGrow - */ -cc.TransitionShrinkGrow = { - -/** - * @method easeActionWithAction - * @param {cc.ActionInterval} arg0 - * @return {cc.ActionInterval} - */ -easeActionWithAction : function ( -actioninterval -) -{ - return cc.ActionInterval; -}, - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionShrinkGrow} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionShrinkGrow; -}, - -/** - * @method TransitionShrinkGrow - * @constructor - */ -TransitionShrinkGrow : function ( -) -{ -}, - -}; - -/** - * @class TransitionFlipX - */ -cc.TransitionFlipX = { - -/** - * @method create -* @param {float|float} float -* @param {cc.Scene|cc.Scene} scene -* @param {cc.TransitionScene::Orientation} orientation -* @return {cc.TransitionFlipX|cc.TransitionFlipX} -*/ -create : function( -float, -scene, -orientation -) -{ - return cc.TransitionFlipX; -}, - -/** - * @method TransitionFlipX - * @constructor - */ -TransitionFlipX : function ( -) -{ -}, - -}; - -/** - * @class TransitionFlipY - */ -cc.TransitionFlipY = { - -/** - * @method create -* @param {float|float} float -* @param {cc.Scene|cc.Scene} scene -* @param {cc.TransitionScene::Orientation} orientation -* @return {cc.TransitionFlipY|cc.TransitionFlipY} -*/ -create : function( -float, -scene, -orientation -) -{ - return cc.TransitionFlipY; -}, - -/** - * @method TransitionFlipY - * @constructor - */ -TransitionFlipY : function ( -) -{ -}, - -}; - -/** - * @class TransitionFlipAngular - */ -cc.TransitionFlipAngular = { - -/** - * @method create -* @param {float|float} float -* @param {cc.Scene|cc.Scene} scene -* @param {cc.TransitionScene::Orientation} orientation -* @return {cc.TransitionFlipAngular|cc.TransitionFlipAngular} -*/ -create : function( -float, -scene, -orientation -) -{ - return cc.TransitionFlipAngular; -}, - -/** - * @method TransitionFlipAngular - * @constructor - */ -TransitionFlipAngular : function ( -) -{ -}, - -}; - -/** - * @class TransitionZoomFlipX - */ -cc.TransitionZoomFlipX = { - -/** - * @method create -* @param {float|float} float -* @param {cc.Scene|cc.Scene} scene -* @param {cc.TransitionScene::Orientation} orientation -* @return {cc.TransitionZoomFlipX|cc.TransitionZoomFlipX} -*/ -create : function( -float, -scene, -orientation -) -{ - return cc.TransitionZoomFlipX; -}, - -/** - * @method TransitionZoomFlipX - * @constructor - */ -TransitionZoomFlipX : function ( -) -{ -}, - -}; - -/** - * @class TransitionZoomFlipY - */ -cc.TransitionZoomFlipY = { - -/** - * @method create -* @param {float|float} float -* @param {cc.Scene|cc.Scene} scene -* @param {cc.TransitionScene::Orientation} orientation -* @return {cc.TransitionZoomFlipY|cc.TransitionZoomFlipY} -*/ -create : function( -float, -scene, -orientation -) -{ - return cc.TransitionZoomFlipY; -}, - -/** - * @method TransitionZoomFlipY - * @constructor - */ -TransitionZoomFlipY : function ( -) -{ -}, - -}; - -/** - * @class TransitionZoomFlipAngular - */ -cc.TransitionZoomFlipAngular = { - -/** - * @method create -* @param {float|float} float -* @param {cc.Scene|cc.Scene} scene -* @param {cc.TransitionScene::Orientation} orientation -* @return {cc.TransitionZoomFlipAngular|cc.TransitionZoomFlipAngular} -*/ -create : function( -float, -scene, -orientation -) -{ - return cc.TransitionZoomFlipAngular; -}, - -/** - * @method TransitionZoomFlipAngular - * @constructor - */ -TransitionZoomFlipAngular : function ( -) -{ -}, - -}; - -/** - * @class TransitionFade - */ -cc.TransitionFade = { - -/** - * @method initWithDuration -* @param {float|float} float -* @param {cc.Scene|cc.Scene} scene -* @param {color3b_object} color3b -* @return {bool|bool} -*/ -initWithDuration : function( -float, -scene, -color3b -) -{ - return false; -}, - -/** - * @method create -* @param {float|float} float -* @param {cc.Scene|cc.Scene} scene -* @param {color3b_object} color3b -* @return {cc.TransitionFade|cc.TransitionFade} -*/ -create : function( -float, -scene, -color3b -) -{ - return cc.TransitionFade; -}, - -/** - * @method TransitionFade - * @constructor - */ -TransitionFade : function ( -) -{ -}, - -}; - -/** - * @class TransitionCrossFade - */ -cc.TransitionCrossFade = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionCrossFade} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionCrossFade; -}, - -/** - * @method TransitionCrossFade - * @constructor - */ -TransitionCrossFade : function ( -) -{ -}, - -}; - -/** - * @class TransitionTurnOffTiles - */ -cc.TransitionTurnOffTiles = { - -/** - * @method easeActionWithAction - * @param {cc.ActionInterval} arg0 - * @return {cc.ActionInterval} - */ -easeActionWithAction : function ( -actioninterval -) -{ - return cc.ActionInterval; -}, - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionTurnOffTiles} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionTurnOffTiles; -}, - -/** - * @method TransitionTurnOffTiles - * @constructor - */ -TransitionTurnOffTiles : function ( -) -{ -}, - -}; - -/** - * @class TransitionSplitCols - */ -cc.TransitionSplitCols = { - -/** - * @method action - * @return {cc.ActionInterval} - */ -action : function ( -) -{ - return cc.ActionInterval; -}, - -/** - * @method easeActionWithAction - * @param {cc.ActionInterval} arg0 - * @return {cc.ActionInterval} - */ -easeActionWithAction : function ( -actioninterval -) -{ - return cc.ActionInterval; -}, - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionSplitCols} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionSplitCols; -}, - -/** - * @method TransitionSplitCols - * @constructor - */ -TransitionSplitCols : function ( -) -{ -}, - -}; - -/** - * @class TransitionSplitRows - */ -cc.TransitionSplitRows = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionSplitRows} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionSplitRows; -}, - -/** - * @method TransitionSplitRows - * @constructor - */ -TransitionSplitRows : function ( -) -{ -}, - -}; - -/** - * @class TransitionFadeTR - */ -cc.TransitionFadeTR = { - -/** - * @method easeActionWithAction - * @param {cc.ActionInterval} arg0 - * @return {cc.ActionInterval} - */ -easeActionWithAction : function ( -actioninterval -) -{ - return cc.ActionInterval; -}, - -/** - * @method actionWithSize - * @param {size_object} arg0 - * @return {cc.ActionInterval} - */ -actionWithSize : function ( -size -) -{ - return cc.ActionInterval; -}, - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionFadeTR} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionFadeTR; -}, - -/** - * @method TransitionFadeTR - * @constructor - */ -TransitionFadeTR : function ( -) -{ -}, - -}; - -/** - * @class TransitionFadeBL - */ -cc.TransitionFadeBL = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionFadeBL} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionFadeBL; -}, - -/** - * @method TransitionFadeBL - * @constructor - */ -TransitionFadeBL : function ( -) -{ -}, - -}; - -/** - * @class TransitionFadeUp - */ -cc.TransitionFadeUp = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionFadeUp} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionFadeUp; -}, - -/** - * @method TransitionFadeUp - * @constructor - */ -TransitionFadeUp : function ( -) -{ -}, - -}; - -/** - * @class TransitionFadeDown - */ -cc.TransitionFadeDown = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionFadeDown} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionFadeDown; -}, - -/** - * @method TransitionFadeDown - * @constructor - */ -TransitionFadeDown : function ( -) -{ -}, - -}; - -/** - * @class TransitionPageTurn - */ -cc.TransitionPageTurn = { - -/** - * @method actionWithSize - * @param {size_object} arg0 - * @return {cc.ActionInterval} - */ -actionWithSize : function ( -size -) -{ - return cc.ActionInterval; -}, - -/** - * @method initWithDuration - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @param {bool} arg2 - * @return {bool} - */ -initWithDuration : function ( -float, -scene, -bool -) -{ - return false; -}, - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @param {bool} arg2 - * @return {cc.TransitionPageTurn} - */ -create : function ( -float, -scene, -bool -) -{ - return cc.TransitionPageTurn; -}, - -/** - * @method TransitionPageTurn - * @constructor - */ -TransitionPageTurn : function ( -) -{ -}, - -}; - -/** - * @class TransitionProgress - */ -cc.TransitionProgress = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionProgress} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionProgress; -}, - -/** - * @method TransitionProgress - * @constructor - */ -TransitionProgress : function ( -) -{ -}, - -}; - -/** - * @class TransitionProgressRadialCCW - */ -cc.TransitionProgressRadialCCW = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionProgressRadialCCW} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionProgressRadialCCW; -}, - -/** - * @method TransitionProgressRadialCCW - * @constructor - */ -TransitionProgressRadialCCW : function ( -) -{ -}, - -}; - -/** - * @class TransitionProgressRadialCW - */ -cc.TransitionProgressRadialCW = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionProgressRadialCW} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionProgressRadialCW; -}, - -/** - * @method TransitionProgressRadialCW - * @constructor - */ -TransitionProgressRadialCW : function ( -) -{ -}, - -}; - -/** - * @class TransitionProgressHorizontal - */ -cc.TransitionProgressHorizontal = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionProgressHorizontal} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionProgressHorizontal; -}, - -/** - * @method TransitionProgressHorizontal - * @constructor - */ -TransitionProgressHorizontal : function ( -) -{ -}, - -}; - -/** - * @class TransitionProgressVertical - */ -cc.TransitionProgressVertical = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionProgressVertical} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionProgressVertical; -}, - -/** - * @method TransitionProgressVertical - * @constructor - */ -TransitionProgressVertical : function ( -) -{ -}, - -}; - -/** - * @class TransitionProgressInOut - */ -cc.TransitionProgressInOut = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionProgressInOut} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionProgressInOut; -}, - -/** - * @method TransitionProgressInOut - * @constructor - */ -TransitionProgressInOut : function ( -) -{ -}, - -}; - -/** - * @class TransitionProgressOutIn - */ -cc.TransitionProgressOutIn = { - -/** - * @method create - * @param {float} arg0 - * @param {cc.Scene} arg1 - * @return {cc.TransitionProgressOutIn} - */ -create : function ( -float, -scene -) -{ - return cc.TransitionProgressOutIn; -}, - -/** - * @method TransitionProgressOutIn - * @constructor - */ -TransitionProgressOutIn : function ( -) -{ -}, - -}; - /** * @class MenuItem */ @@ -14726,104 +13420,6 @@ Menu : function ( }; -/** - * @class ClippingNode - */ -cc.ClippingNode = { - -/** - * @method hasContent - * @return {bool} - */ -hasContent : function ( -) -{ - return false; -}, - -/** - * @method setInverted - * @param {bool} arg0 - */ -setInverted : function ( -bool -) -{ -}, - -/** - * @method setStencil - * @param {cc.Node} arg0 - */ -setStencil : function ( -node -) -{ -}, - -/** - * @method getAlphaThreshold - * @return {float} - */ -getAlphaThreshold : function ( -) -{ - return 0; -}, - -/** - * @method getStencil - * @return {cc.Node} - */ -getStencil : function ( -) -{ - return cc.Node; -}, - -/** - * @method setAlphaThreshold - * @param {float} arg0 - */ -setAlphaThreshold : function ( -float -) -{ -}, - -/** - * @method isInverted - * @return {bool} - */ -isInverted : function ( -) -{ - return false; -}, - -/** - * @method create -* @param {cc.Node} node -* @return {cc.ClippingNode|cc.ClippingNode} -*/ -create : function( -node -) -{ - return cc.ClippingNode; -}, - -/** - * @method ClippingNode - * @constructor - */ -ClippingNode : function ( -) -{ -}, - -}; - /** * @class MotionStreak */ @@ -14998,1058 +13594,6 @@ MotionStreak : function ( }; -/** - * @class ProgressTimer - */ -cc.ProgressTimer = { - -/** - * @method initWithSprite - * @param {cc.Sprite} arg0 - * @return {bool} - */ -initWithSprite : function ( -sprite -) -{ - return false; -}, - -/** - * @method isReverseDirection - * @return {bool} - */ -isReverseDirection : function ( -) -{ - return false; -}, - -/** - * @method setBarChangeRate - * @param {vec2_object} arg0 - */ -setBarChangeRate : function ( -vec2 -) -{ -}, - -/** - * @method getPercentage - * @return {float} - */ -getPercentage : function ( -) -{ - return 0; -}, - -/** - * @method setSprite - * @param {cc.Sprite} arg0 - */ -setSprite : function ( -sprite -) -{ -}, - -/** - * @method getType - * @return {cc.ProgressTimer::Type} - */ -getType : function ( -) -{ - return 0; -}, - -/** - * @method getSprite - * @return {cc.Sprite} - */ -getSprite : function ( -) -{ - return cc.Sprite; -}, - -/** - * @method setMidpoint - * @param {vec2_object} arg0 - */ -setMidpoint : function ( -vec2 -) -{ -}, - -/** - * @method getBarChangeRate - * @return {vec2_object} - */ -getBarChangeRate : function ( -) -{ - return cc.Vec2; -}, - -/** - * @method setReverseDirection -* @param {bool|bool} bool -*/ -setReverseDirection : function( -bool -) -{ -}, - -/** - * @method getMidpoint - * @return {vec2_object} - */ -getMidpoint : function ( -) -{ - return cc.Vec2; -}, - -/** - * @method setPercentage - * @param {float} arg0 - */ -setPercentage : function ( -float -) -{ -}, - -/** - * @method setType - * @param {cc.ProgressTimer::Type} arg0 - */ -setType : function ( -type -) -{ -}, - -/** - * @method create - * @param {cc.Sprite} arg0 - * @return {cc.ProgressTimer} - */ -create : function ( -sprite -) -{ - return cc.ProgressTimer; -}, - -/** - * @method ProgressTimer - * @constructor - */ -ProgressTimer : function ( -) -{ -}, - -}; - -/** - * @class Sprite - */ -cc.Sprite = { - -/** - * @method setSpriteFrame -* @param {cc.SpriteFrame|String} spriteframe -*/ -setSpriteFrame : function( -str -) -{ -}, - -/** - * @method setTexture -* @param {cc.Texture2D|String} texture2d -*/ -setTexture : function( -str -) -{ -}, - -/** - * @method getTexture - * @return {cc.Texture2D} - */ -getTexture : function ( -) -{ - return cc.Texture2D; -}, - -/** - * @method setFlippedY - * @param {bool} arg0 - */ -setFlippedY : function ( -bool -) -{ -}, - -/** - * @method setFlippedX - * @param {bool} arg0 - */ -setFlippedX : function ( -bool -) -{ -}, - -/** - * @method setRotationSkewX - * @param {float} arg0 - */ -setRotationSkewX : function ( -float -) -{ -}, - -/** - * @method setRotationSkewY - * @param {float} arg0 - */ -setRotationSkewY : function ( -float -) -{ -}, - -/** - * @method initWithTexture -* @param {cc.Texture2D|cc.Texture2D|cc.Texture2D} texture2d -* @param {rect_object|rect_object} rect -* @param {bool} bool -* @return {bool|bool|bool} -*/ -initWithTexture : function( -texture2d, -rect, -bool -) -{ - return false; -}, - -/** - * @method getBatchNode - * @return {cc.SpriteBatchNode} - */ -getBatchNode : function ( -) -{ - return cc.SpriteBatchNode; -}, - -/** - * @method getOffsetPosition - * @return {vec2_object} - */ -getOffsetPosition : function ( -) -{ - return cc.Vec2; -}, - -/** - * @method removeAllChildrenWithCleanup - * @param {bool} arg0 - */ -removeAllChildrenWithCleanup : function ( -bool -) -{ -}, - -/** - * @method setTextureRect -* @param {rect_object|rect_object} rect -* @param {bool} bool -* @param {size_object} size -*/ -setTextureRect : function( -rect, -bool, -size -) -{ -}, - -/** - * @method initWithSpriteFrameName - * @param {String} arg0 - * @return {bool} - */ -initWithSpriteFrameName : function ( -str -) -{ - return false; -}, - -/** - * @method isFrameDisplayed - * @param {cc.SpriteFrame} arg0 - * @return {bool} - */ -isFrameDisplayed : function ( -spriteframe -) -{ - return false; -}, - -/** - * @method getAtlasIndex - * @return {long} - */ -getAtlasIndex : function ( -) -{ - return 0; -}, - -/** - * @method setBatchNode - * @param {cc.SpriteBatchNode} arg0 - */ -setBatchNode : function ( -spritebatchnode -) -{ -}, - -/** - * @method getBlendFunc - * @return {cc.BlendFunc} - */ -getBlendFunc : function ( -) -{ - return cc.BlendFunc; -}, - -/** - * @method setDisplayFrameWithAnimationName - * @param {String} arg0 - * @param {long} arg1 - */ -setDisplayFrameWithAnimationName : function ( -str, -long -) -{ -}, - -/** - * @method setTextureAtlas - * @param {cc.TextureAtlas} arg0 - */ -setTextureAtlas : function ( -textureatlas -) -{ -}, - -/** - * @method getSpriteFrame - * @return {cc.SpriteFrame} - */ -getSpriteFrame : function ( -) -{ - return cc.SpriteFrame; -}, - -/** - * @method isDirty - * @return {bool} - */ -isDirty : function ( -) -{ - return false; -}, - -/** - * @method setAtlasIndex - * @param {long} arg0 - */ -setAtlasIndex : function ( -long -) -{ -}, - -/** - * @method setDirty - * @param {bool} arg0 - */ -setDirty : function ( -bool -) -{ -}, - -/** - * @method isTextureRectRotated - * @return {bool} - */ -isTextureRectRotated : function ( -) -{ - return false; -}, - -/** - * @method getTextureRect - * @return {rect_object} - */ -getTextureRect : function ( -) -{ - return cc.Rect; -}, - -/** - * @method initWithFile -* @param {String|String} str -* @param {rect_object} rect -* @return {bool|bool} -*/ -initWithFile : function( -str, -rect -) -{ - return false; -}, - -/** - * @method setBlendFunc - * @param {cc.BlendFunc} arg0 - */ -setBlendFunc : function ( -blendfunc -) -{ -}, - -/** - * @method getTextureAtlas - * @return {cc.TextureAtlas} - */ -getTextureAtlas : function ( -) -{ - return cc.TextureAtlas; -}, - -/** - * @method initWithSpriteFrame - * @param {cc.SpriteFrame} arg0 - * @return {bool} - */ -initWithSpriteFrame : function ( -spriteframe -) -{ - return false; -}, - -/** - * @method isFlippedX - * @return {bool} - */ -isFlippedX : function ( -) -{ - return false; -}, - -/** - * @method isFlippedY - * @return {bool} - */ -isFlippedY : function ( -) -{ - return false; -}, - -/** - * @method setVertexRect - * @param {rect_object} arg0 - */ -setVertexRect : function ( -rect -) -{ -}, - -/** - * @method create -* @param {String|String} str -* @param {rect_object} rect -* @return {cc.Sprite|cc.Sprite|cc.Sprite} -*/ -create : function( -str, -rect -) -{ - return cc.Sprite; -}, - -/** - * @method createWithTexture -* @param {cc.Texture2D|cc.Texture2D} texture2d -* @param {rect_object} rect -* @param {bool} bool -* @return {cc.Sprite|cc.Sprite} -*/ -createWithTexture : function( -texture2d, -rect, -bool -) -{ - return cc.Sprite; -}, - -/** - * @method createWithSpriteFrameName - * @param {String} arg0 - * @return {cc.Sprite} - */ -createWithSpriteFrameName : function ( -str -) -{ - return cc.Sprite; -}, - -/** - * @method createWithSpriteFrame - * @param {cc.SpriteFrame} arg0 - * @return {cc.Sprite} - */ -createWithSpriteFrame : function ( -spriteframe -) -{ - return cc.Sprite; -}, - -/** - * @method Sprite - * @constructor - */ -Sprite : function ( -) -{ -}, - -}; - -/** - * @class Image - */ -cc.Image = { - -/** - * @method hasPremultipliedAlpha - * @return {bool} - */ -hasPremultipliedAlpha : function ( -) -{ - return false; -}, - -/** - * @method getDataLen - * @return {long} - */ -getDataLen : function ( -) -{ - return 0; -}, - -/** - * @method saveToFile - * @param {String} arg0 - * @param {bool} arg1 - * @return {bool} - */ -saveToFile : function ( -str, -bool -) -{ - return false; -}, - -/** - * @method hasAlpha - * @return {bool} - */ -hasAlpha : function ( -) -{ - return false; -}, - -/** - * @method isCompressed - * @return {bool} - */ -isCompressed : function ( -) -{ - return false; -}, - -/** - * @method getHeight - * @return {int} - */ -getHeight : function ( -) -{ - return 0; -}, - -/** - * @method initWithImageFile - * @param {String} arg0 - * @return {bool} - */ -initWithImageFile : function ( -str -) -{ - return false; -}, - -/** - * @method getWidth - * @return {int} - */ -getWidth : function ( -) -{ - return 0; -}, - -/** - * @method getBitPerPixel - * @return {int} - */ -getBitPerPixel : function ( -) -{ - return 0; -}, - -/** - * @method getFileType - * @return {cc.Image::Format} - */ -getFileType : function ( -) -{ - return 0; -}, - -/** - * @method getNumberOfMipmaps - * @return {int} - */ -getNumberOfMipmaps : function ( -) -{ - return 0; -}, - -/** - * @method getRenderFormat - * @return {cc.Texture2D::PixelFormat} - */ -getRenderFormat : function ( -) -{ - return 0; -}, - -/** - * @method getData - * @return {unsigned char} - */ -getData : function ( -) -{ - return 0; -}, - -/** - * @method getMipmaps - * @return {cc._MipmapInfo} - */ -getMipmaps : function ( -) -{ - return cc._MipmapInfo; -}, - -/** - * @method initWithRawData - * @param {unsigned char} arg0 - * @param {long} arg1 - * @param {int} arg2 - * @param {int} arg3 - * @param {int} arg4 - * @param {bool} arg5 - * @return {bool} - */ -initWithRawData : function ( -char, -long, -int, -int, -int, -bool -) -{ - return false; -}, - -/** - * @method setPVRImagesHavePremultipliedAlpha - * @param {bool} arg0 - */ -setPVRImagesHavePremultipliedAlpha : function ( -bool -) -{ -}, - -/** - * @method Image - * @constructor - */ -Image : function ( -) -{ -}, - -}; - -/** - * @class RenderTexture - */ -cc.RenderTexture = { - -/** - * @method setVirtualViewport - * @param {vec2_object} arg0 - * @param {rect_object} arg1 - * @param {rect_object} arg2 - */ -setVirtualViewport : function ( -vec2, -rect, -rect -) -{ -}, - -/** - * @method clearStencil - * @param {int} arg0 - */ -clearStencil : function ( -int -) -{ -}, - -/** - * @method getClearDepth - * @return {float} - */ -getClearDepth : function ( -) -{ - return 0; -}, - -/** - * @method getClearStencil - * @return {int} - */ -getClearStencil : function ( -) -{ - return 0; -}, - -/** - * @method end - */ -end : function ( -) -{ -}, - -/** - * @method setClearStencil - * @param {int} arg0 - */ -setClearStencil : function ( -int -) -{ -}, - -/** - * @method setSprite - * @param {cc.Sprite} arg0 - */ -setSprite : function ( -sprite -) -{ -}, - -/** - * @method getSprite - * @return {cc.Sprite} - */ -getSprite : function ( -) -{ - return cc.Sprite; -}, - -/** - * @method isAutoDraw - * @return {bool} - */ -isAutoDraw : function ( -) -{ - return false; -}, - -/** - * @method setKeepMatrix - * @param {bool} arg0 - */ -setKeepMatrix : function ( -bool -) -{ -}, - -/** - * @method setClearFlags - * @param {unsigned int} arg0 - */ -setClearFlags : function ( -int -) -{ -}, - -/** - * @method begin - */ -begin : function ( -) -{ -}, - -/** - * @method setAutoDraw - * @param {bool} arg0 - */ -setAutoDraw : function ( -bool -) -{ -}, - -/** - * @method setClearColor - * @param {color4f_object} arg0 - */ -setClearColor : function ( -color4f -) -{ -}, - -/** - * @method endToLua - */ -endToLua : function ( -) -{ -}, - -/** - * @method beginWithClear -* @param {float|float|float} float -* @param {float|float|float} float -* @param {float|float|float} float -* @param {float|float|float} float -* @param {float|float} float -* @param {int} int -*/ -beginWithClear : function( -float, -float, -float, -float, -float, -int -) -{ -}, - -/** - * @method clearDepth - * @param {float} arg0 - */ -clearDepth : function ( -float -) -{ -}, - -/** - * @method getClearColor - * @return {color4f_object} - */ -getClearColor : function ( -) -{ - return cc.Color4F; -}, - -/** - * @method clear - * @param {float} arg0 - * @param {float} arg1 - * @param {float} arg2 - * @param {float} arg3 - */ -clear : function ( -float, -float, -float, -float -) -{ -}, - -/** - * @method getClearFlags - * @return {unsigned int} - */ -getClearFlags : function ( -) -{ - return 0; -}, - -/** - * @method newImage - * @return {cc.Image} - */ -newImage : function ( -) -{ - return cc.Image; -}, - -/** - * @method setClearDepth - * @param {float} arg0 - */ -setClearDepth : function ( -float -) -{ -}, - -/** - * @method initWithWidthAndHeight -* @param {int|int} int -* @param {int|int} int -* @param {cc.Texture2D::PixelFormat|cc.Texture2D::PixelFormat} pixelformat -* @param {unsigned int} int -* @return {bool|bool} -*/ -initWithWidthAndHeight : function( -int, -int, -pixelformat, -int -) -{ - return false; -}, - -/** - * @method create -* @param {int|int|int} int -* @param {int|int|int} int -* @param {cc.Texture2D::PixelFormat|cc.Texture2D::PixelFormat} pixelformat -* @param {unsigned int} int -* @return {cc.RenderTexture|cc.RenderTexture|cc.RenderTexture} -*/ -create : function( -int, -int, -pixelformat, -int -) -{ - return cc.RenderTexture; -}, - -/** - * @method RenderTexture - * @constructor - */ -RenderTexture : function ( -) -{ -}, - -}; - /** * @class NodeGrid */ @@ -18014,6 +15558,2793 @@ ParticleRain : function ( }; +/** + * @class ProgressTimer + */ +cc.ProgressTimer = { + +/** + * @method initWithSprite + * @param {cc.Sprite} arg0 + * @return {bool} + */ +initWithSprite : function ( +sprite +) +{ + return false; +}, + +/** + * @method isReverseDirection + * @return {bool} + */ +isReverseDirection : function ( +) +{ + return false; +}, + +/** + * @method setBarChangeRate + * @param {vec2_object} arg0 + */ +setBarChangeRate : function ( +vec2 +) +{ +}, + +/** + * @method getPercentage + * @return {float} + */ +getPercentage : function ( +) +{ + return 0; +}, + +/** + * @method setSprite + * @param {cc.Sprite} arg0 + */ +setSprite : function ( +sprite +) +{ +}, + +/** + * @method getType + * @return {cc.ProgressTimer::Type} + */ +getType : function ( +) +{ + return 0; +}, + +/** + * @method getSprite + * @return {cc.Sprite} + */ +getSprite : function ( +) +{ + return cc.Sprite; +}, + +/** + * @method setMidpoint + * @param {vec2_object} arg0 + */ +setMidpoint : function ( +vec2 +) +{ +}, + +/** + * @method getBarChangeRate + * @return {vec2_object} + */ +getBarChangeRate : function ( +) +{ + return cc.Vec2; +}, + +/** + * @method setReverseDirection +* @param {bool|bool} bool +*/ +setReverseDirection : function( +bool +) +{ +}, + +/** + * @method getMidpoint + * @return {vec2_object} + */ +getMidpoint : function ( +) +{ + return cc.Vec2; +}, + +/** + * @method setPercentage + * @param {float} arg0 + */ +setPercentage : function ( +float +) +{ +}, + +/** + * @method setType + * @param {cc.ProgressTimer::Type} arg0 + */ +setType : function ( +type +) +{ +}, + +/** + * @method create + * @param {cc.Sprite} arg0 + * @return {cc.ProgressTimer} + */ +create : function ( +sprite +) +{ + return cc.ProgressTimer; +}, + +/** + * @method ProgressTimer + * @constructor + */ +ProgressTimer : function ( +) +{ +}, + +}; + +/** + * @class ProtectedNode + */ +cc.ProtectedNode = { + +/** + * @method addProtectedChild +* @param {cc.Node|cc.Node|cc.Node} node +* @param {int|int} int +* @param {int} int +*/ +addProtectedChild : function( +node, +int, +int +) +{ +}, + +/** + * @method disableCascadeColor + */ +disableCascadeColor : function ( +) +{ +}, + +/** + * @method removeProtectedChildByTag + * @param {int} arg0 + * @param {bool} arg1 + */ +removeProtectedChildByTag : function ( +int, +bool +) +{ +}, + +/** + * @method reorderProtectedChild + * @param {cc.Node} arg0 + * @param {int} arg1 + */ +reorderProtectedChild : function ( +node, +int +) +{ +}, + +/** + * @method removeAllProtectedChildrenWithCleanup + * @param {bool} arg0 + */ +removeAllProtectedChildrenWithCleanup : function ( +bool +) +{ +}, + +/** + * @method disableCascadeOpacity + */ +disableCascadeOpacity : function ( +) +{ +}, + +/** + * @method sortAllProtectedChildren + */ +sortAllProtectedChildren : function ( +) +{ +}, + +/** + * @method getProtectedChildByTag + * @param {int} arg0 + * @return {cc.Node} + */ +getProtectedChildByTag : function ( +int +) +{ + return cc.Node; +}, + +/** + * @method removeProtectedChild + * @param {cc.Node} arg0 + * @param {bool} arg1 + */ +removeProtectedChild : function ( +node, +bool +) +{ +}, + +/** + * @method removeAllProtectedChildren + */ +removeAllProtectedChildren : function ( +) +{ +}, + +/** + * @method create + * @return {cc.ProtectedNode} + */ +create : function ( +) +{ + return cc.ProtectedNode; +}, + +/** + * @method ProtectedNode + * @constructor + */ +ProtectedNode : function ( +) +{ +}, + +}; + +/** + * @class Sprite + */ +cc.Sprite = { + +/** + * @method setSpriteFrame +* @param {cc.SpriteFrame|String} spriteframe +*/ +setSpriteFrame : function( +str +) +{ +}, + +/** + * @method setTexture +* @param {cc.Texture2D|String} texture2d +*/ +setTexture : function( +str +) +{ +}, + +/** + * @method getTexture + * @return {cc.Texture2D} + */ +getTexture : function ( +) +{ + return cc.Texture2D; +}, + +/** + * @method setFlippedY + * @param {bool} arg0 + */ +setFlippedY : function ( +bool +) +{ +}, + +/** + * @method setFlippedX + * @param {bool} arg0 + */ +setFlippedX : function ( +bool +) +{ +}, + +/** + * @method setRotationSkewX + * @param {float} arg0 + */ +setRotationSkewX : function ( +float +) +{ +}, + +/** + * @method setRotationSkewY + * @param {float} arg0 + */ +setRotationSkewY : function ( +float +) +{ +}, + +/** + * @method initWithTexture +* @param {cc.Texture2D|cc.Texture2D|cc.Texture2D} texture2d +* @param {rect_object|rect_object} rect +* @param {bool} bool +* @return {bool|bool|bool} +*/ +initWithTexture : function( +texture2d, +rect, +bool +) +{ + return false; +}, + +/** + * @method getBatchNode + * @return {cc.SpriteBatchNode} + */ +getBatchNode : function ( +) +{ + return cc.SpriteBatchNode; +}, + +/** + * @method getOffsetPosition + * @return {vec2_object} + */ +getOffsetPosition : function ( +) +{ + return cc.Vec2; +}, + +/** + * @method removeAllChildrenWithCleanup + * @param {bool} arg0 + */ +removeAllChildrenWithCleanup : function ( +bool +) +{ +}, + +/** + * @method setTextureRect +* @param {rect_object|rect_object} rect +* @param {bool} bool +* @param {size_object} size +*/ +setTextureRect : function( +rect, +bool, +size +) +{ +}, + +/** + * @method initWithSpriteFrameName + * @param {String} arg0 + * @return {bool} + */ +initWithSpriteFrameName : function ( +str +) +{ + return false; +}, + +/** + * @method isFrameDisplayed + * @param {cc.SpriteFrame} arg0 + * @return {bool} + */ +isFrameDisplayed : function ( +spriteframe +) +{ + return false; +}, + +/** + * @method getAtlasIndex + * @return {long} + */ +getAtlasIndex : function ( +) +{ + return 0; +}, + +/** + * @method setBatchNode + * @param {cc.SpriteBatchNode} arg0 + */ +setBatchNode : function ( +spritebatchnode +) +{ +}, + +/** + * @method getBlendFunc + * @return {cc.BlendFunc} + */ +getBlendFunc : function ( +) +{ + return cc.BlendFunc; +}, + +/** + * @method setDisplayFrameWithAnimationName + * @param {String} arg0 + * @param {long} arg1 + */ +setDisplayFrameWithAnimationName : function ( +str, +long +) +{ +}, + +/** + * @method setTextureAtlas + * @param {cc.TextureAtlas} arg0 + */ +setTextureAtlas : function ( +textureatlas +) +{ +}, + +/** + * @method getSpriteFrame + * @return {cc.SpriteFrame} + */ +getSpriteFrame : function ( +) +{ + return cc.SpriteFrame; +}, + +/** + * @method isDirty + * @return {bool} + */ +isDirty : function ( +) +{ + return false; +}, + +/** + * @method setAtlasIndex + * @param {long} arg0 + */ +setAtlasIndex : function ( +long +) +{ +}, + +/** + * @method setDirty + * @param {bool} arg0 + */ +setDirty : function ( +bool +) +{ +}, + +/** + * @method isTextureRectRotated + * @return {bool} + */ +isTextureRectRotated : function ( +) +{ + return false; +}, + +/** + * @method getTextureRect + * @return {rect_object} + */ +getTextureRect : function ( +) +{ + return cc.Rect; +}, + +/** + * @method initWithFile +* @param {String|String} str +* @param {rect_object} rect +* @return {bool|bool} +*/ +initWithFile : function( +str, +rect +) +{ + return false; +}, + +/** + * @method setBlendFunc + * @param {cc.BlendFunc} arg0 + */ +setBlendFunc : function ( +blendfunc +) +{ +}, + +/** + * @method getTextureAtlas + * @return {cc.TextureAtlas} + */ +getTextureAtlas : function ( +) +{ + return cc.TextureAtlas; +}, + +/** + * @method initWithSpriteFrame + * @param {cc.SpriteFrame} arg0 + * @return {bool} + */ +initWithSpriteFrame : function ( +spriteframe +) +{ + return false; +}, + +/** + * @method isFlippedX + * @return {bool} + */ +isFlippedX : function ( +) +{ + return false; +}, + +/** + * @method isFlippedY + * @return {bool} + */ +isFlippedY : function ( +) +{ + return false; +}, + +/** + * @method setVertexRect + * @param {rect_object} arg0 + */ +setVertexRect : function ( +rect +) +{ +}, + +/** + * @method create +* @param {String|String} str +* @param {rect_object} rect +* @return {cc.Sprite|cc.Sprite|cc.Sprite} +*/ +create : function( +str, +rect +) +{ + return cc.Sprite; +}, + +/** + * @method createWithTexture +* @param {cc.Texture2D|cc.Texture2D} texture2d +* @param {rect_object} rect +* @param {bool} bool +* @return {cc.Sprite|cc.Sprite} +*/ +createWithTexture : function( +texture2d, +rect, +bool +) +{ + return cc.Sprite; +}, + +/** + * @method createWithSpriteFrameName + * @param {String} arg0 + * @return {cc.Sprite} + */ +createWithSpriteFrameName : function ( +str +) +{ + return cc.Sprite; +}, + +/** + * @method createWithSpriteFrame + * @param {cc.SpriteFrame} arg0 + * @return {cc.Sprite} + */ +createWithSpriteFrame : function ( +spriteframe +) +{ + return cc.Sprite; +}, + +/** + * @method Sprite + * @constructor + */ +Sprite : function ( +) +{ +}, + +}; + +/** + * @class Image + */ +cc.Image = { + +/** + * @method hasPremultipliedAlpha + * @return {bool} + */ +hasPremultipliedAlpha : function ( +) +{ + return false; +}, + +/** + * @method getDataLen + * @return {long} + */ +getDataLen : function ( +) +{ + return 0; +}, + +/** + * @method saveToFile + * @param {String} arg0 + * @param {bool} arg1 + * @return {bool} + */ +saveToFile : function ( +str, +bool +) +{ + return false; +}, + +/** + * @method hasAlpha + * @return {bool} + */ +hasAlpha : function ( +) +{ + return false; +}, + +/** + * @method isCompressed + * @return {bool} + */ +isCompressed : function ( +) +{ + return false; +}, + +/** + * @method getHeight + * @return {int} + */ +getHeight : function ( +) +{ + return 0; +}, + +/** + * @method initWithImageFile + * @param {String} arg0 + * @return {bool} + */ +initWithImageFile : function ( +str +) +{ + return false; +}, + +/** + * @method getWidth + * @return {int} + */ +getWidth : function ( +) +{ + return 0; +}, + +/** + * @method getBitPerPixel + * @return {int} + */ +getBitPerPixel : function ( +) +{ + return 0; +}, + +/** + * @method getFileType + * @return {cc.Image::Format} + */ +getFileType : function ( +) +{ + return 0; +}, + +/** + * @method getNumberOfMipmaps + * @return {int} + */ +getNumberOfMipmaps : function ( +) +{ + return 0; +}, + +/** + * @method getRenderFormat + * @return {cc.Texture2D::PixelFormat} + */ +getRenderFormat : function ( +) +{ + return 0; +}, + +/** + * @method getData + * @return {unsigned char} + */ +getData : function ( +) +{ + return 0; +}, + +/** + * @method getMipmaps + * @return {cc._MipmapInfo} + */ +getMipmaps : function ( +) +{ + return cc._MipmapInfo; +}, + +/** + * @method initWithRawData + * @param {unsigned char} arg0 + * @param {long} arg1 + * @param {int} arg2 + * @param {int} arg3 + * @param {int} arg4 + * @param {bool} arg5 + * @return {bool} + */ +initWithRawData : function ( +char, +long, +int, +int, +int, +bool +) +{ + return false; +}, + +/** + * @method setPVRImagesHavePremultipliedAlpha + * @param {bool} arg0 + */ +setPVRImagesHavePremultipliedAlpha : function ( +bool +) +{ +}, + +/** + * @method Image + * @constructor + */ +Image : function ( +) +{ +}, + +}; + +/** + * @class RenderTexture + */ +cc.RenderTexture = { + +/** + * @method setVirtualViewport + * @param {vec2_object} arg0 + * @param {rect_object} arg1 + * @param {rect_object} arg2 + */ +setVirtualViewport : function ( +vec2, +rect, +rect +) +{ +}, + +/** + * @method clearStencil + * @param {int} arg0 + */ +clearStencil : function ( +int +) +{ +}, + +/** + * @method getClearDepth + * @return {float} + */ +getClearDepth : function ( +) +{ + return 0; +}, + +/** + * @method getClearStencil + * @return {int} + */ +getClearStencil : function ( +) +{ + return 0; +}, + +/** + * @method end + */ +end : function ( +) +{ +}, + +/** + * @method setClearStencil + * @param {int} arg0 + */ +setClearStencil : function ( +int +) +{ +}, + +/** + * @method setSprite + * @param {cc.Sprite} arg0 + */ +setSprite : function ( +sprite +) +{ +}, + +/** + * @method getSprite + * @return {cc.Sprite} + */ +getSprite : function ( +) +{ + return cc.Sprite; +}, + +/** + * @method isAutoDraw + * @return {bool} + */ +isAutoDraw : function ( +) +{ + return false; +}, + +/** + * @method setKeepMatrix + * @param {bool} arg0 + */ +setKeepMatrix : function ( +bool +) +{ +}, + +/** + * @method setClearFlags + * @param {unsigned int} arg0 + */ +setClearFlags : function ( +int +) +{ +}, + +/** + * @method begin + */ +begin : function ( +) +{ +}, + +/** + * @method setAutoDraw + * @param {bool} arg0 + */ +setAutoDraw : function ( +bool +) +{ +}, + +/** + * @method setClearColor + * @param {color4f_object} arg0 + */ +setClearColor : function ( +color4f +) +{ +}, + +/** + * @method endToLua + */ +endToLua : function ( +) +{ +}, + +/** + * @method beginWithClear +* @param {float|float|float} float +* @param {float|float|float} float +* @param {float|float|float} float +* @param {float|float|float} float +* @param {float|float} float +* @param {int} int +*/ +beginWithClear : function( +float, +float, +float, +float, +float, +int +) +{ +}, + +/** + * @method clearDepth + * @param {float} arg0 + */ +clearDepth : function ( +float +) +{ +}, + +/** + * @method getClearColor + * @return {color4f_object} + */ +getClearColor : function ( +) +{ + return cc.Color4F; +}, + +/** + * @method clear + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {float} arg3 + */ +clear : function ( +float, +float, +float, +float +) +{ +}, + +/** + * @method getClearFlags + * @return {unsigned int} + */ +getClearFlags : function ( +) +{ + return 0; +}, + +/** + * @method newImage + * @return {cc.Image} + */ +newImage : function ( +) +{ + return cc.Image; +}, + +/** + * @method setClearDepth + * @param {float} arg0 + */ +setClearDepth : function ( +float +) +{ +}, + +/** + * @method initWithWidthAndHeight +* @param {int|int} int +* @param {int|int} int +* @param {cc.Texture2D::PixelFormat|cc.Texture2D::PixelFormat} pixelformat +* @param {unsigned int} int +* @return {bool|bool} +*/ +initWithWidthAndHeight : function( +int, +int, +pixelformat, +int +) +{ + return false; +}, + +/** + * @method create +* @param {int|int|int} int +* @param {int|int|int} int +* @param {cc.Texture2D::PixelFormat|cc.Texture2D::PixelFormat} pixelformat +* @param {unsigned int} int +* @return {cc.RenderTexture|cc.RenderTexture|cc.RenderTexture} +*/ +create : function( +int, +int, +pixelformat, +int +) +{ + return cc.RenderTexture; +}, + +/** + * @method RenderTexture + * @constructor + */ +RenderTexture : function ( +) +{ +}, + +}; + +/** + * @class TransitionEaseScene + */ +cc.TransitionEaseScene = { + +/** + * @method easeActionWithAction + * @param {cc.ActionInterval} arg0 + * @return {cc.ActionInterval} + */ +easeActionWithAction : function ( +actioninterval +) +{ + return cc.ActionInterval; +}, + +}; + +/** + * @class TransitionScene + */ +cc.TransitionScene = { + +/** + * @method getInScene + * @return {cc.Scene} + */ +getInScene : function ( +) +{ + return cc.Scene; +}, + +/** + * @method finish + */ +finish : function ( +) +{ +}, + +/** + * @method initWithDuration + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {bool} + */ +initWithDuration : function ( +float, +scene +) +{ + return false; +}, + +/** + * @method getDuration + * @return {float} + */ +getDuration : function ( +) +{ + return 0; +}, + +/** + * @method hideOutShowIn + */ +hideOutShowIn : function ( +) +{ +}, + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionScene} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionScene; +}, + +/** + * @method TransitionScene + * @constructor + */ +TransitionScene : function ( +) +{ +}, + +}; + +/** + * @class TransitionSceneOriented + */ +cc.TransitionSceneOriented = { + +/** + * @method initWithDuration + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @param {cc.TransitionScene::Orientation} arg2 + * @return {bool} + */ +initWithDuration : function ( +float, +scene, +orientation +) +{ + return false; +}, + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @param {cc.TransitionScene::Orientation} arg2 + * @return {cc.TransitionSceneOriented} + */ +create : function ( +float, +scene, +orientation +) +{ + return cc.TransitionSceneOriented; +}, + +/** + * @method TransitionSceneOriented + * @constructor + */ +TransitionSceneOriented : function ( +) +{ +}, + +}; + +/** + * @class TransitionRotoZoom + */ +cc.TransitionRotoZoom = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionRotoZoom} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionRotoZoom; +}, + +/** + * @method TransitionRotoZoom + * @constructor + */ +TransitionRotoZoom : function ( +) +{ +}, + +}; + +/** + * @class TransitionJumpZoom + */ +cc.TransitionJumpZoom = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionJumpZoom} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionJumpZoom; +}, + +/** + * @method TransitionJumpZoom + * @constructor + */ +TransitionJumpZoom : function ( +) +{ +}, + +}; + +/** + * @class TransitionMoveInL + */ +cc.TransitionMoveInL = { + +/** + * @method action + * @return {cc.ActionInterval} + */ +action : function ( +) +{ + return cc.ActionInterval; +}, + +/** + * @method easeActionWithAction + * @param {cc.ActionInterval} arg0 + * @return {cc.ActionInterval} + */ +easeActionWithAction : function ( +actioninterval +) +{ + return cc.ActionInterval; +}, + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionMoveInL} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionMoveInL; +}, + +/** + * @method TransitionMoveInL + * @constructor + */ +TransitionMoveInL : function ( +) +{ +}, + +}; + +/** + * @class TransitionMoveInR + */ +cc.TransitionMoveInR = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionMoveInR} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionMoveInR; +}, + +/** + * @method TransitionMoveInR + * @constructor + */ +TransitionMoveInR : function ( +) +{ +}, + +}; + +/** + * @class TransitionMoveInT + */ +cc.TransitionMoveInT = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionMoveInT} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionMoveInT; +}, + +/** + * @method TransitionMoveInT + * @constructor + */ +TransitionMoveInT : function ( +) +{ +}, + +}; + +/** + * @class TransitionMoveInB + */ +cc.TransitionMoveInB = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionMoveInB} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionMoveInB; +}, + +/** + * @method TransitionMoveInB + * @constructor + */ +TransitionMoveInB : function ( +) +{ +}, + +}; + +/** + * @class TransitionSlideInL + */ +cc.TransitionSlideInL = { + +/** + * @method action + * @return {cc.ActionInterval} + */ +action : function ( +) +{ + return cc.ActionInterval; +}, + +/** + * @method easeActionWithAction + * @param {cc.ActionInterval} arg0 + * @return {cc.ActionInterval} + */ +easeActionWithAction : function ( +actioninterval +) +{ + return cc.ActionInterval; +}, + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionSlideInL} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionSlideInL; +}, + +/** + * @method TransitionSlideInL + * @constructor + */ +TransitionSlideInL : function ( +) +{ +}, + +}; + +/** + * @class TransitionSlideInR + */ +cc.TransitionSlideInR = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionSlideInR} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionSlideInR; +}, + +/** + * @method TransitionSlideInR + * @constructor + */ +TransitionSlideInR : function ( +) +{ +}, + +}; + +/** + * @class TransitionSlideInB + */ +cc.TransitionSlideInB = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionSlideInB} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionSlideInB; +}, + +/** + * @method TransitionSlideInB + * @constructor + */ +TransitionSlideInB : function ( +) +{ +}, + +}; + +/** + * @class TransitionSlideInT + */ +cc.TransitionSlideInT = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionSlideInT} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionSlideInT; +}, + +/** + * @method TransitionSlideInT + * @constructor + */ +TransitionSlideInT : function ( +) +{ +}, + +}; + +/** + * @class TransitionShrinkGrow + */ +cc.TransitionShrinkGrow = { + +/** + * @method easeActionWithAction + * @param {cc.ActionInterval} arg0 + * @return {cc.ActionInterval} + */ +easeActionWithAction : function ( +actioninterval +) +{ + return cc.ActionInterval; +}, + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionShrinkGrow} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionShrinkGrow; +}, + +/** + * @method TransitionShrinkGrow + * @constructor + */ +TransitionShrinkGrow : function ( +) +{ +}, + +}; + +/** + * @class TransitionFlipX + */ +cc.TransitionFlipX = { + +/** + * @method create +* @param {float|float} float +* @param {cc.Scene|cc.Scene} scene +* @param {cc.TransitionScene::Orientation} orientation +* @return {cc.TransitionFlipX|cc.TransitionFlipX} +*/ +create : function( +float, +scene, +orientation +) +{ + return cc.TransitionFlipX; +}, + +/** + * @method TransitionFlipX + * @constructor + */ +TransitionFlipX : function ( +) +{ +}, + +}; + +/** + * @class TransitionFlipY + */ +cc.TransitionFlipY = { + +/** + * @method create +* @param {float|float} float +* @param {cc.Scene|cc.Scene} scene +* @param {cc.TransitionScene::Orientation} orientation +* @return {cc.TransitionFlipY|cc.TransitionFlipY} +*/ +create : function( +float, +scene, +orientation +) +{ + return cc.TransitionFlipY; +}, + +/** + * @method TransitionFlipY + * @constructor + */ +TransitionFlipY : function ( +) +{ +}, + +}; + +/** + * @class TransitionFlipAngular + */ +cc.TransitionFlipAngular = { + +/** + * @method create +* @param {float|float} float +* @param {cc.Scene|cc.Scene} scene +* @param {cc.TransitionScene::Orientation} orientation +* @return {cc.TransitionFlipAngular|cc.TransitionFlipAngular} +*/ +create : function( +float, +scene, +orientation +) +{ + return cc.TransitionFlipAngular; +}, + +/** + * @method TransitionFlipAngular + * @constructor + */ +TransitionFlipAngular : function ( +) +{ +}, + +}; + +/** + * @class TransitionZoomFlipX + */ +cc.TransitionZoomFlipX = { + +/** + * @method create +* @param {float|float} float +* @param {cc.Scene|cc.Scene} scene +* @param {cc.TransitionScene::Orientation} orientation +* @return {cc.TransitionZoomFlipX|cc.TransitionZoomFlipX} +*/ +create : function( +float, +scene, +orientation +) +{ + return cc.TransitionZoomFlipX; +}, + +/** + * @method TransitionZoomFlipX + * @constructor + */ +TransitionZoomFlipX : function ( +) +{ +}, + +}; + +/** + * @class TransitionZoomFlipY + */ +cc.TransitionZoomFlipY = { + +/** + * @method create +* @param {float|float} float +* @param {cc.Scene|cc.Scene} scene +* @param {cc.TransitionScene::Orientation} orientation +* @return {cc.TransitionZoomFlipY|cc.TransitionZoomFlipY} +*/ +create : function( +float, +scene, +orientation +) +{ + return cc.TransitionZoomFlipY; +}, + +/** + * @method TransitionZoomFlipY + * @constructor + */ +TransitionZoomFlipY : function ( +) +{ +}, + +}; + +/** + * @class TransitionZoomFlipAngular + */ +cc.TransitionZoomFlipAngular = { + +/** + * @method create +* @param {float|float} float +* @param {cc.Scene|cc.Scene} scene +* @param {cc.TransitionScene::Orientation} orientation +* @return {cc.TransitionZoomFlipAngular|cc.TransitionZoomFlipAngular} +*/ +create : function( +float, +scene, +orientation +) +{ + return cc.TransitionZoomFlipAngular; +}, + +/** + * @method TransitionZoomFlipAngular + * @constructor + */ +TransitionZoomFlipAngular : function ( +) +{ +}, + +}; + +/** + * @class TransitionFade + */ +cc.TransitionFade = { + +/** + * @method initWithDuration +* @param {float|float} float +* @param {cc.Scene|cc.Scene} scene +* @param {color3b_object} color3b +* @return {bool|bool} +*/ +initWithDuration : function( +float, +scene, +color3b +) +{ + return false; +}, + +/** + * @method create +* @param {float|float} float +* @param {cc.Scene|cc.Scene} scene +* @param {color3b_object} color3b +* @return {cc.TransitionFade|cc.TransitionFade} +*/ +create : function( +float, +scene, +color3b +) +{ + return cc.TransitionFade; +}, + +/** + * @method TransitionFade + * @constructor + */ +TransitionFade : function ( +) +{ +}, + +}; + +/** + * @class TransitionCrossFade + */ +cc.TransitionCrossFade = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionCrossFade} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionCrossFade; +}, + +/** + * @method TransitionCrossFade + * @constructor + */ +TransitionCrossFade : function ( +) +{ +}, + +}; + +/** + * @class TransitionTurnOffTiles + */ +cc.TransitionTurnOffTiles = { + +/** + * @method easeActionWithAction + * @param {cc.ActionInterval} arg0 + * @return {cc.ActionInterval} + */ +easeActionWithAction : function ( +actioninterval +) +{ + return cc.ActionInterval; +}, + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionTurnOffTiles} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionTurnOffTiles; +}, + +/** + * @method TransitionTurnOffTiles + * @constructor + */ +TransitionTurnOffTiles : function ( +) +{ +}, + +}; + +/** + * @class TransitionSplitCols + */ +cc.TransitionSplitCols = { + +/** + * @method action + * @return {cc.ActionInterval} + */ +action : function ( +) +{ + return cc.ActionInterval; +}, + +/** + * @method easeActionWithAction + * @param {cc.ActionInterval} arg0 + * @return {cc.ActionInterval} + */ +easeActionWithAction : function ( +actioninterval +) +{ + return cc.ActionInterval; +}, + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionSplitCols} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionSplitCols; +}, + +/** + * @method TransitionSplitCols + * @constructor + */ +TransitionSplitCols : function ( +) +{ +}, + +}; + +/** + * @class TransitionSplitRows + */ +cc.TransitionSplitRows = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionSplitRows} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionSplitRows; +}, + +/** + * @method TransitionSplitRows + * @constructor + */ +TransitionSplitRows : function ( +) +{ +}, + +}; + +/** + * @class TransitionFadeTR + */ +cc.TransitionFadeTR = { + +/** + * @method easeActionWithAction + * @param {cc.ActionInterval} arg0 + * @return {cc.ActionInterval} + */ +easeActionWithAction : function ( +actioninterval +) +{ + return cc.ActionInterval; +}, + +/** + * @method actionWithSize + * @param {size_object} arg0 + * @return {cc.ActionInterval} + */ +actionWithSize : function ( +size +) +{ + return cc.ActionInterval; +}, + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionFadeTR} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionFadeTR; +}, + +/** + * @method TransitionFadeTR + * @constructor + */ +TransitionFadeTR : function ( +) +{ +}, + +}; + +/** + * @class TransitionFadeBL + */ +cc.TransitionFadeBL = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionFadeBL} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionFadeBL; +}, + +/** + * @method TransitionFadeBL + * @constructor + */ +TransitionFadeBL : function ( +) +{ +}, + +}; + +/** + * @class TransitionFadeUp + */ +cc.TransitionFadeUp = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionFadeUp} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionFadeUp; +}, + +/** + * @method TransitionFadeUp + * @constructor + */ +TransitionFadeUp : function ( +) +{ +}, + +}; + +/** + * @class TransitionFadeDown + */ +cc.TransitionFadeDown = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionFadeDown} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionFadeDown; +}, + +/** + * @method TransitionFadeDown + * @constructor + */ +TransitionFadeDown : function ( +) +{ +}, + +}; + +/** + * @class TransitionPageTurn + */ +cc.TransitionPageTurn = { + +/** + * @method actionWithSize + * @param {size_object} arg0 + * @return {cc.ActionInterval} + */ +actionWithSize : function ( +size +) +{ + return cc.ActionInterval; +}, + +/** + * @method initWithDuration + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @param {bool} arg2 + * @return {bool} + */ +initWithDuration : function ( +float, +scene, +bool +) +{ + return false; +}, + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @param {bool} arg2 + * @return {cc.TransitionPageTurn} + */ +create : function ( +float, +scene, +bool +) +{ + return cc.TransitionPageTurn; +}, + +/** + * @method TransitionPageTurn + * @constructor + */ +TransitionPageTurn : function ( +) +{ +}, + +}; + +/** + * @class TransitionProgress + */ +cc.TransitionProgress = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionProgress} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionProgress; +}, + +/** + * @method TransitionProgress + * @constructor + */ +TransitionProgress : function ( +) +{ +}, + +}; + +/** + * @class TransitionProgressRadialCCW + */ +cc.TransitionProgressRadialCCW = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionProgressRadialCCW} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionProgressRadialCCW; +}, + +/** + * @method TransitionProgressRadialCCW + * @constructor + */ +TransitionProgressRadialCCW : function ( +) +{ +}, + +}; + +/** + * @class TransitionProgressRadialCW + */ +cc.TransitionProgressRadialCW = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionProgressRadialCW} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionProgressRadialCW; +}, + +/** + * @method TransitionProgressRadialCW + * @constructor + */ +TransitionProgressRadialCW : function ( +) +{ +}, + +}; + +/** + * @class TransitionProgressHorizontal + */ +cc.TransitionProgressHorizontal = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionProgressHorizontal} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionProgressHorizontal; +}, + +/** + * @method TransitionProgressHorizontal + * @constructor + */ +TransitionProgressHorizontal : function ( +) +{ +}, + +}; + +/** + * @class TransitionProgressVertical + */ +cc.TransitionProgressVertical = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionProgressVertical} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionProgressVertical; +}, + +/** + * @method TransitionProgressVertical + * @constructor + */ +TransitionProgressVertical : function ( +) +{ +}, + +}; + +/** + * @class TransitionProgressInOut + */ +cc.TransitionProgressInOut = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionProgressInOut} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionProgressInOut; +}, + +/** + * @method TransitionProgressInOut + * @constructor + */ +TransitionProgressInOut : function ( +) +{ +}, + +}; + +/** + * @class TransitionProgressOutIn + */ +cc.TransitionProgressOutIn = { + +/** + * @method create + * @param {float} arg0 + * @param {cc.Scene} arg1 + * @return {cc.TransitionProgressOutIn} + */ +create : function ( +float, +scene +) +{ + return cc.TransitionProgressOutIn; +}, + +/** + * @method TransitionProgressOutIn + * @constructor + */ +TransitionProgressOutIn : function ( +) +{ +}, + +}; + +/** + * @class Camera + */ +cc.Camera = { + +/** + * @method setScene + * @param {cc.Scene} arg0 + */ +setScene : function ( +scene +) +{ +}, + +/** + * @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; +}, + +/** + * @method getViewProjectionMatrix + * @return {mat4_object} + */ +getViewProjectionMatrix : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method getViewMatrix + * @return {mat4_object} + */ +getViewMatrix : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method getCameraFlag + * @return {cc.CameraFlag} + */ +getCameraFlag : function ( +) +{ + return 0; +}, + +/** + * @method getType + * @return {cc.Camera::Type} + */ +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 getDepthInView + * @param {mat4_object} arg0 + * @return {float} + */ +getDepthInView : function ( +mat4 +) +{ + return 0; +}, + +/** + * @method lookAt + * @param {vec3_object} arg0 + * @param {vec3_object} arg1 + */ +lookAt : function ( +vec3, +vec3 +) +{ +}, + +/** + * @method setCameraFlag + * @param {cc.CameraFlag} arg0 + */ +setCameraFlag : function ( +cameraflag +) +{ +}, + +/** + * @method initOrthographic + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {float} arg3 + * @return {bool} + */ +initOrthographic : function ( +float, +float, +float, +float +) +{ + return false; +}, + +/** + * @method setAdditionalProjection + * @param {mat4_object} arg0 + */ +setAdditionalProjection : function ( +mat4 +) +{ +}, + +/** + * @method getDepth + * @return {int} + */ +getDepth : function ( +) +{ + return 0; +}, + +/** + * @method setDepth + * @param {int} arg0 + */ +setDepth : function ( +int +) +{ +}, + +/** + * @method create + * @return {cc.Camera} + */ +create : function ( +) +{ + return cc.Camera; +}, + +/** + * @method createPerspective + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {float} arg3 + * @return {cc.Camera} + */ +createPerspective : function ( +float, +float, +float, +float +) +{ + return cc.Camera; +}, + +/** + * @method createOrthographic + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {float} arg3 + * @return {cc.Camera} + */ +createOrthographic : function ( +float, +float, +float, +float +) +{ + return cc.Camera; +}, + +/** + * @method getDefaultCamera + * @return {cc.Camera} + */ +getDefaultCamera : function ( +) +{ + return cc.Camera; +}, + +/** + * @method getVisitingCamera + * @return {cc.Camera} + */ +getVisitingCamera : function ( +) +{ + return cc.Camera; +}, + +/** + * @method Camera + * @constructor + */ +Camera : function ( +) +{ +}, + +}; + /** * @class GridBase */ @@ -18303,270 +18634,6 @@ TiledGrid3D : function ( }; -/** - * @class Camera - */ -cc.Camera = { - -/** - * @method setScene - * @param {cc.Scene} arg0 - */ -setScene : function ( -scene -) -{ -}, - -/** - * @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; -}, - -/** - * @method getViewProjectionMatrix - * @return {mat4_object} - */ -getViewProjectionMatrix : function ( -) -{ - return cc.Mat4; -}, - -/** - * @method getViewMatrix - * @return {mat4_object} - */ -getViewMatrix : function ( -) -{ - return cc.Mat4; -}, - -/** - * @method getCameraFlag - * @return {cc.CameraFlag} - */ -getCameraFlag : function ( -) -{ - return 0; -}, - -/** - * @method getType - * @return {cc.Camera::Type} - */ -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 getDepthInView - * @param {mat4_object} arg0 - * @return {float} - */ -getDepthInView : function ( -mat4 -) -{ - return 0; -}, - -/** - * @method lookAt - * @param {vec3_object} arg0 - * @param {vec3_object} arg1 - */ -lookAt : function ( -vec3, -vec3 -) -{ -}, - -/** - * @method setCameraFlag - * @param {cc.CameraFlag} arg0 - */ -setCameraFlag : function ( -cameraflag -) -{ -}, - -/** - * @method initOrthographic - * @param {float} arg0 - * @param {float} arg1 - * @param {float} arg2 - * @param {float} arg3 - * @return {bool} - */ -initOrthographic : function ( -float, -float, -float, -float -) -{ - return false; -}, - -/** - * @method setAdditionalProjection - * @param {mat4_object} arg0 - */ -setAdditionalProjection : function ( -mat4 -) -{ -}, - -/** - * @method getDepth - * @return {int} - */ -getDepth : function ( -) -{ - return 0; -}, - -/** - * @method setDepth - * @param {int} arg0 - */ -setDepth : function ( -int -) -{ -}, - -/** - * @method create - * @return {cc.Camera} - */ -create : function ( -) -{ - return cc.Camera; -}, - -/** - * @method createPerspective - * @param {float} arg0 - * @param {float} arg1 - * @param {float} arg2 - * @param {float} arg3 - * @return {cc.Camera} - */ -createPerspective : function ( -float, -float, -float, -float -) -{ - return cc.Camera; -}, - -/** - * @method createOrthographic - * @param {float} arg0 - * @param {float} arg1 - * @param {float} arg2 - * @param {float} arg3 - * @return {cc.Camera} - */ -createOrthographic : function ( -float, -float, -float, -float -) -{ - return cc.Camera; -}, - -/** - * @method getDefaultCamera - * @return {cc.Camera} - */ -getDefaultCamera : function ( -) -{ - return cc.Camera; -}, - -/** - * @method getVisitingCamera - * @return {cc.Camera} - */ -getVisitingCamera : function ( -) -{ - return cc.Camera; -}, - -/** - * @method Camera - * @constructor - */ -Camera : function ( -) -{ -}, - -}; - /** * @class BaseLight */ @@ -21631,36 +21698,70 @@ getInstance : function ( }; /** - * @class AsyncTaskPool + * @class SpritePolygonCache */ -cc.AsyncTaskPool = { +cc.SpritePolygonCache = { /** - * @method stopTasks - * @param {cc.AsyncTaskPool::TaskType} arg0 + * @method isSpritePolygonCachExist + * @param {String} arg0 + * @param {rect_object} arg1 + * @return {bool} */ -stopTasks : function ( -tasktype +isSpritePolygonCachExist : function ( +str, +rect +) +{ + return false; +}, + +/** + * @method removeAllSpritePolygonCache + */ +removeAllSpritePolygonCache : function ( ) { }, /** - * @method destoryInstance + * @method removeSpritePolygonCache + * @param {String} arg0 + * @param {rect_object} arg1 */ -destoryInstance : function ( +removeSpritePolygonCache : function ( +str, +rect +) +{ +}, + +/** + * @method destroyInstance + */ +destroyInstance : function ( +) +{ +}, + +/** + * @method printInfo + * @param {cc._SpritePolygonInfo} arg0 + */ +printInfo : function ( +_spritepolygoninfo ) { }, /** * @method getInstance - * @return {cc.AsyncTaskPool} + * @return {cc.SpritePolygonCache} */ getInstance : function ( ) { - return cc.AsyncTaskPool; + return cc.SpritePolygonCache; }, }; diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_api.js new file mode 100644 index 0000000000..5ea1dd93d7 --- /dev/null +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_api.js @@ -0,0 +1,99 @@ +/** + * @module cocos2dx_experimental + */ +var ccexp = ccexp || {}; + +/** + * @class SpritePolygon + */ +ccexp.SpritePolygon = { + +/** + * @method setTexture +* @param {cc.Texture2D|String} texture2d +*/ +setTexture : function( +str +) +{ +}, + +/** + * @method initWithTexture + * @param {cc.Texture2D} arg0 + * @return {bool} + */ +initWithTexture : function ( +texture2d +) +{ + return false; +}, + +/** + * @method showDebug + * @param {bool} arg0 + */ +showDebug : function ( +bool +) +{ +}, + +/** + * @method getTexture + * @return {cc.Texture2D} + */ +getTexture : function ( +) +{ + return cc.Texture2D; +}, + +/** + * @method getArea + * @return {float} + */ +getArea : function ( +) +{ + return 0; +}, + +/** + * @method initWithMarching + * @param {String} arg0 + * @param {rect_object} arg1 + * @param {float} arg2 + * @return {bool} + */ +initWithMarching : function ( +str, +rect, +float +) +{ + return false; +}, + +/** + * @method getVertCount + * @return {long} + */ +getVertCount : function ( +) +{ + return 0; +}, + +/** + * @method getTrianglesCount + * @return {long} + */ +getTrianglesCount : function ( +) +{ + return 0; +}, + +}; 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 85dc43c43f..5fb1448702 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp @@ -810,2134 +810,6 @@ void js_register_cocos2dx_3d_Animate3D(JSContext *cx, JS::HandleObject global) { } } -JSClass *jsb_cocos2d_Skeleton3D_class; -JSObject *jsb_cocos2d_Skeleton3D_prototype; - -bool js_cocos2dx_3d_Skeleton3D_removeAllBones(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_removeAllBones : Invalid Native Object"); - if (argc == 0) { - cobj->removeAllBones(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_removeAllBones : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Skeleton3D_addBone(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_addBone : Invalid Native Object"); - if (argc == 1) { - cocos2d::Bone3D* 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::Bone3D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Skeleton3D_addBone : Error processing arguments"); - cobj->addBone(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_addBone : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Skeleton3D_getBoneByName(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneByName : 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_Skeleton3D_getBoneByName : Error processing arguments"); - cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Bone3D*)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_Skeleton3D_getBoneByName : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Skeleton3D_getRootBone(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getRootBone : 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_3d_Skeleton3D_getRootBone : Error processing arguments"); - cocos2d::Bone3D* ret = cobj->getRootBone(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Bone3D*)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_Skeleton3D_getRootBone : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Skeleton3D_updateBoneMatrix(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_updateBoneMatrix : Invalid Native Object"); - if (argc == 0) { - cobj->updateBoneMatrix(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_updateBoneMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Skeleton3D_getBoneByIndex(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneByIndex : 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_3d_Skeleton3D_getBoneByIndex : Error processing arguments"); - cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Bone3D*)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_Skeleton3D_getBoneByIndex : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Skeleton3D_getRootCount(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getRootCount : Invalid Native Object"); - if (argc == 0) { - ssize_t ret = cobj->getRootCount(); - jsval jsret = JSVAL_NULL; - jsret = ssize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_getRootCount : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Skeleton3D_getBoneIndex(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneIndex : Invalid Native Object"); - if (argc == 1) { - cocos2d::Bone3D* 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::Bone3D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneIndex : Error processing arguments"); - int ret = cobj->getBoneIndex(arg0); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_getBoneIndex : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Skeleton3D_getBoneCount(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneCount : Invalid Native Object"); - if (argc == 0) { - ssize_t ret = cobj->getBoneCount(); - jsval jsret = JSVAL_NULL; - jsret = ssize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_getBoneCount : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Skeleton3D_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Skeleton3D* cobj = new (std::nothrow) cocos2d::Skeleton3D(); - 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::Skeleton3D"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - - -void js_cocos2d_Skeleton3D_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Skeleton3D)", obj); -} - -void js_register_cocos2dx_3d_Skeleton3D(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Skeleton3D_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Skeleton3D_class->name = "Skeleton3D"; - jsb_cocos2d_Skeleton3D_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Skeleton3D_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Skeleton3D_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Skeleton3D_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Skeleton3D_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Skeleton3D_class->resolve = JS_ResolveStub; - jsb_cocos2d_Skeleton3D_class->convert = JS_ConvertStub; - jsb_cocos2d_Skeleton3D_class->finalize = js_cocos2d_Skeleton3D_finalize; - jsb_cocos2d_Skeleton3D_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("removeAllBones", js_cocos2dx_3d_Skeleton3D_removeAllBones, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addBone", js_cocos2dx_3d_Skeleton3D_addBone, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBoneByName", js_cocos2dx_3d_Skeleton3D_getBoneByName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRootBone", js_cocos2dx_3d_Skeleton3D_getRootBone, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("updateBoneMatrix", js_cocos2dx_3d_Skeleton3D_updateBoneMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBoneByIndex", js_cocos2dx_3d_Skeleton3D_getBoneByIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRootCount", js_cocos2dx_3d_Skeleton3D_getRootCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBoneIndex", js_cocos2dx_3d_Skeleton3D_getBoneIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBoneCount", js_cocos2dx_3d_Skeleton3D_getBoneCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_Skeleton3D_prototype = JS_InitClass( - cx, global, - JS::NullPtr(), // parent proto - jsb_cocos2d_Skeleton3D_class, - js_cocos2dx_3d_Skeleton3D_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, "Skeleton3D", 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_Skeleton3D_class; - p->proto = jsb_cocos2d_Skeleton3D_prototype; - p->parentProto = NULL; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Sprite3D_class; -JSObject *jsb_cocos2d_Sprite3D_prototype; - -bool js_cocos2dx_3d_Sprite3D_setCullFaceEnabled(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setCullFaceEnabled : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_setCullFaceEnabled : Error processing arguments"); - cobj->setCullFaceEnabled(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setCullFaceEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_setTexture(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::Sprite3D* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setTexture : Invalid Native Object"); - do { - if (argc == 1) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cobj->setTexture(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cobj->setTexture(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setTexture : wrong number of arguments"); - return false; -} -bool js_cocos2dx_3d_Sprite3D_getLightMask(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getLightMask : Invalid Native Object"); - if (argc == 0) { - unsigned int ret = cobj->getLightMask(); - jsval jsret = JSVAL_NULL; - jsret = uint32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_getLightMask : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode : Invalid Native Object"); - if (argc == 2) { - cocos2d::NodeData* arg0; - cocos2d::MaterialDatas arg1; - #pragma warning NO CONVERSION TO NATIVE FOR NodeData* - ok = false; - #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas - ok = false; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode : Error processing arguments"); - cobj->createAttachSprite3DNode(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_3d_Sprite3D_loadFromFile(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_loadFromFile : Invalid Native Object"); - if (argc == 4) { - std::string arg0; - cocos2d::NodeDatas* arg1; - cocos2d::MeshDatas* arg2; - cocos2d::MaterialDatas* arg3; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas* - ok = false; - #pragma warning NO CONVERSION TO NATIVE FOR MeshDatas* - ok = false; - #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas* - ok = false; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_loadFromFile : Error processing arguments"); - bool ret = cobj->loadFromFile(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_loadFromFile : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_3d_Sprite3D_setCullFace(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setCullFace : 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_3d_Sprite3D_setCullFace : Error processing arguments"); - cobj->setCullFace(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setCullFace : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_addMesh(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_addMesh : Invalid Native Object"); - if (argc == 1) { - cocos2d::Mesh* 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::Mesh*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_addMesh : Error processing arguments"); - cobj->addMesh(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_addMesh : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_removeAllAttachNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_removeAllAttachNode : Invalid Native Object"); - if (argc == 0) { - cobj->removeAllAttachNode(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_removeAllAttachNode : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3D_setMaterial(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::Sprite3D* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setMaterial : Invalid Native Object"); - do { - if (argc == 2) { - cocos2d::Material* 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::Material*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - int arg1; - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - if (!ok) { ok = true; break; } - cobj->setMaterial(arg0, arg1); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 1) { - cocos2d::Material* 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::Material*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cobj->setMaterial(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setMaterial : wrong number of arguments"); - return false; -} -bool js_cocos2dx_3d_Sprite3D_genGLProgramState(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_genGLProgramState : Invalid Native Object"); - if (argc == 0) { - cobj->genGLProgramState(); - args.rval().setUndefined(); - return true; - } - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_genGLProgramState : Error processing arguments"); - cobj->genGLProgramState(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_genGLProgramState : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3D_getMesh(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMesh : Invalid Native Object"); - if (argc == 0) { - cocos2d::Mesh* ret = cobj->getMesh(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Mesh*)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_Sprite3D_getMesh : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3D_createSprite3DNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_createSprite3DNode : Invalid Native Object"); - if (argc == 3) { - cocos2d::NodeData* arg0; - cocos2d::ModelData* arg1; - cocos2d::MaterialDatas arg2; - #pragma warning NO CONVERSION TO NATIVE FOR NodeData* - ok = false; - #pragma warning NO CONVERSION TO NATIVE FOR ModelData* - ok = false; - #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas - ok = false; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_createSprite3DNode : Error processing arguments"); - cocos2d::Sprite3D* ret = cobj->createSprite3DNode(arg0, arg1, arg2); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3D*)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_Sprite3D_createSprite3DNode : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} -bool js_cocos2dx_3d_Sprite3D_getMeshCount(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMeshCount : Invalid Native Object"); - if (argc == 0) { - ssize_t ret = cobj->getMeshCount(); - jsval jsret = JSVAL_NULL; - jsret = ssize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_getMeshCount : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3D_onAABBDirty(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_onAABBDirty : Invalid Native Object"); - if (argc == 0) { - cobj->onAABBDirty(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_onAABBDirty : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3D_getMeshByIndex(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMeshByIndex : 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_3d_Sprite3D_getMeshByIndex : Error processing arguments"); - cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Mesh*)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_Sprite3D_getMeshByIndex : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_createNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_createNode : Invalid Native Object"); - if (argc == 4) { - cocos2d::NodeData* arg0; - cocos2d::Node* arg1; - cocos2d::MaterialDatas arg2; - bool arg3; - #pragma warning NO CONVERSION TO NATIVE FOR NodeData* - ok = false; - 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); - #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas - ok = false; - arg3 = JS::ToBoolean(args.get(3)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_createNode : Error processing arguments"); - cobj->createNode(arg0, arg1, arg2, arg3); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_createNode : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_3d_Sprite3D_isForceDepthWrite(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_isForceDepthWrite : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isForceDepthWrite(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_isForceDepthWrite : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3D_getBlendFunc(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getBlendFunc : Invalid Native Object"); - if (argc == 0) { - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - jsval jsret = JSVAL_NULL; - jsret = blendfunc_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3D_getMeshIndexData(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMeshIndexData : 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_Sprite3D_getMeshIndexData : Error processing arguments"); - cocos2d::MeshIndexData* ret = cobj->getMeshIndexData(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MeshIndexData*)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_Sprite3D_getMeshIndexData : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_removeAttachNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_removeAttachNode : 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_Sprite3D_removeAttachNode : Error processing arguments"); - cobj->removeAttachNode(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_removeAttachNode : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_setLightMask(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setLightMask : 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_3d_Sprite3D_setLightMask : Error processing arguments"); - cobj->setLightMask(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setLightMask : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_afterAsyncLoad(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_afterAsyncLoad : 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_3d_Sprite3D_afterAsyncLoad : Error processing arguments"); - cobj->afterAsyncLoad(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_afterAsyncLoad : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_loadFromCache(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_loadFromCache : 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_Sprite3D_loadFromCache : Error processing arguments"); - bool ret = cobj->loadFromCache(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_loadFromCache : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_initFrom(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_initFrom : Invalid Native Object"); - if (argc == 3) { - cocos2d::NodeDatas arg0; - cocos2d::MeshDatas arg1; - cocos2d::MaterialDatas arg2; - #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas - ok = false; - #pragma warning NO CONVERSION TO NATIVE FOR MeshDatas - ok = false; - #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas - ok = false; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_initFrom : Error processing arguments"); - bool ret = cobj->initFrom(arg0, arg1, arg2); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_initFrom : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} -bool js_cocos2dx_3d_Sprite3D_getAttachNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getAttachNode : 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_Sprite3D_getAttachNode : Error processing arguments"); - cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::AttachNode*)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_Sprite3D_getAttachNode : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_initWithFile(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_initWithFile : 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_Sprite3D_initWithFile : Error processing arguments"); - bool ret = cobj->initWithFile(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_initWithFile : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_setBlendFunc(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setBlendFunc : Invalid Native Object"); - if (argc == 1) { - cocos2d::BlendFunc arg0; - ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_setBlendFunc : Error processing arguments"); - cobj->setBlendFunc(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_getSkeleton(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getSkeleton : Invalid Native Object"); - if (argc == 0) { - cocos2d::Skeleton3D* ret = cobj->getSkeleton(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Skeleton3D*)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_Sprite3D_getSkeleton : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3D_setForceDepthWrite(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setForceDepthWrite : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_setForceDepthWrite : Error processing arguments"); - cobj->setForceDepthWrite(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setForceDepthWrite : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_getMeshByName(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMeshByName : 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_Sprite3D_getMeshByName : Error processing arguments"); - cocos2d::Mesh* ret = cobj->getMeshByName(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Mesh*)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_Sprite3D_getMeshByName : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3D_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - do { - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3D*)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::Sprite3D* ret = cocos2d::Sprite3D::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3D*)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) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3D*)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_3d_Sprite3D_create : wrong number of arguments"); - return false; -} -bool js_cocos2dx_3d_Sprite3D_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Sprite3D* cobj = new (std::nothrow) cocos2d::Sprite3D(); - 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::Sprite3D"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_Sprite3D_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Sprite3D)", obj); -} - -static bool js_cocos2d_Sprite3D_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::Sprite3D *nobj = new (std::nothrow) cocos2d::Sprite3D(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::Sprite3D"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_3d_Sprite3D(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Sprite3D_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Sprite3D_class->name = "Sprite3D"; - jsb_cocos2d_Sprite3D_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Sprite3D_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Sprite3D_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Sprite3D_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Sprite3D_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Sprite3D_class->resolve = JS_ResolveStub; - jsb_cocos2d_Sprite3D_class->convert = JS_ConvertStub; - jsb_cocos2d_Sprite3D_class->finalize = js_cocos2d_Sprite3D_finalize; - jsb_cocos2d_Sprite3D_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("setCullFaceEnabled", js_cocos2dx_3d_Sprite3D_setCullFaceEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTexture", js_cocos2dx_3d_Sprite3D_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getLightMask", js_cocos2dx_3d_Sprite3D_getLightMask, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createAttachSprite3DNode", js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadFromFile", js_cocos2dx_3d_Sprite3D_loadFromFile, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCullFace", js_cocos2dx_3d_Sprite3D_setCullFace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addMesh", js_cocos2dx_3d_Sprite3D_addMesh, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllAttachNode", js_cocos2dx_3d_Sprite3D_removeAllAttachNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMaterial", js_cocos2dx_3d_Sprite3D_setMaterial, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("genGLProgramState", js_cocos2dx_3d_Sprite3D_genGLProgramState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMesh", js_cocos2dx_3d_Sprite3D_getMesh, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createSprite3DNode", js_cocos2dx_3d_Sprite3D_createSprite3DNode, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMeshCount", js_cocos2dx_3d_Sprite3D_getMeshCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("onAABBDirty", js_cocos2dx_3d_Sprite3D_onAABBDirty, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMeshByIndex", js_cocos2dx_3d_Sprite3D_getMeshByIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createNode", js_cocos2dx_3d_Sprite3D_createNode, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isForceDepthWrite", js_cocos2dx_3d_Sprite3D_isForceDepthWrite, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBlendFunc", js_cocos2dx_3d_Sprite3D_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMeshIndexData", js_cocos2dx_3d_Sprite3D_getMeshIndexData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAttachNode", js_cocos2dx_3d_Sprite3D_removeAttachNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setLightMask", js_cocos2dx_3d_Sprite3D_setLightMask, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("afterAsyncLoad", js_cocos2dx_3d_Sprite3D_afterAsyncLoad, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadFromCache", js_cocos2dx_3d_Sprite3D_loadFromCache, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initFrom", js_cocos2dx_3d_Sprite3D_initFrom, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getAttachNode", js_cocos2dx_3d_Sprite3D_getAttachNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithFile", js_cocos2dx_3d_Sprite3D_initWithFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBlendFunc", js_cocos2dx_3d_Sprite3D_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSkeleton", js_cocos2dx_3d_Sprite3D_getSkeleton, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setForceDepthWrite", js_cocos2dx_3d_Sprite3D_setForceDepthWrite, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMeshByName", js_cocos2dx_3d_Sprite3D_getMeshByName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_Sprite3D_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_3d_Sprite3D_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_Sprite3D_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_Sprite3D_class, - js_cocos2dx_3d_Sprite3D_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, "Sprite3D", 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_Sprite3D_class; - p->proto = jsb_cocos2d_Sprite3D_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Sprite3DCache_class; -JSObject *jsb_cocos2d_Sprite3DCache_prototype; - -bool js_cocos2dx_3d_Sprite3DCache_removeSprite3DData(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::Sprite3DCache* cobj = (cocos2d::Sprite3DCache *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3DCache_removeSprite3DData : 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_Sprite3DCache_removeSprite3DData : Error processing arguments"); - cobj->removeSprite3DData(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3DCache_removeSprite3DData : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData(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::Sprite3DCache* cobj = (cocos2d::Sprite3DCache *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData : Invalid Native Object"); - if (argc == 0) { - cobj->removeAllSprite3DData(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Sprite3DCache_destroyInstance(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::Sprite3DCache::destroyInstance(); - args.rval().setUndefined(); - return true; - } - JS_ReportError(cx, "js_cocos2dx_3d_Sprite3DCache_destroyInstance : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_3d_Sprite3DCache_getInstance(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::Sprite3DCache* ret = cocos2d::Sprite3DCache::getInstance(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3DCache*)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_Sprite3DCache_getInstance : wrong number of arguments"); - return false; -} - - - -void js_cocos2d_Sprite3DCache_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Sprite3DCache)", obj); -} - -void js_register_cocos2dx_3d_Sprite3DCache(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Sprite3DCache_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Sprite3DCache_class->name = "Sprite3DCache"; - jsb_cocos2d_Sprite3DCache_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Sprite3DCache_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Sprite3DCache_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Sprite3DCache_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Sprite3DCache_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Sprite3DCache_class->resolve = JS_ResolveStub; - jsb_cocos2d_Sprite3DCache_class->convert = JS_ConvertStub; - jsb_cocos2d_Sprite3DCache_class->finalize = js_cocos2d_Sprite3DCache_finalize; - jsb_cocos2d_Sprite3DCache_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("removeSprite3DData", js_cocos2dx_3d_Sprite3DCache_removeSprite3DData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllSprite3DData", js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("destroyInstance", js_cocos2dx_3d_Sprite3DCache_destroyInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getInstance", js_cocos2dx_3d_Sprite3DCache_getInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_Sprite3DCache_prototype = JS_InitClass( - cx, global, - JS::NullPtr(), // parent proto - jsb_cocos2d_Sprite3DCache_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, "Sprite3DCache", 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_Sprite3DCache_class; - p->proto = jsb_cocos2d_Sprite3DCache_prototype; - p->parentProto = NULL; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Mesh_class; -JSObject *jsb_cocos2d_Mesh_prototype; - -bool js_cocos2dx_3d_Mesh_setTexture(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::Mesh* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setTexture : Invalid Native Object"); - do { - if (argc == 1) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cobj->setTexture(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cobj->setTexture(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setTexture : wrong number of arguments"); - return false; -} -bool js_cocos2dx_3d_Mesh_getTexture(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getTexture : Invalid Native Object"); - if (argc == 0) { - cocos2d::Texture2D* ret = cobj->getTexture(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)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_Mesh_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_getSkin(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getSkin : Invalid Native Object"); - if (argc == 0) { - cocos2d::MeshSkin* ret = cobj->getSkin(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MeshSkin*)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_Mesh_getSkin : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_getMaterial(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getMaterial : Invalid Native Object"); - if (argc == 0) { - cocos2d::Material* ret = cobj->getMaterial(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Material*)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_Mesh_getMaterial : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_getVertexSizeInBytes(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getVertexSizeInBytes : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getVertexSizeInBytes(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getVertexSizeInBytes : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_setMaterial(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setMaterial : Invalid Native Object"); - if (argc == 1) { - cocos2d::Material* 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::Material*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setMaterial : Error processing arguments"); - cobj->setMaterial(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setMaterial : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Mesh_getName(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getName : Invalid Native Object"); - if (argc == 0) { - const std::string& ret = cobj->getName(); - jsval jsret = JSVAL_NULL; - jsret = std_string_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getName : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_getIndexFormat(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getIndexFormat : Invalid Native Object"); - if (argc == 0) { - unsigned int ret = cobj->getIndexFormat(); - jsval jsret = JSVAL_NULL; - jsret = uint32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getIndexFormat : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_getGLProgramState(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getGLProgramState : Invalid Native Object"); - if (argc == 0) { - cocos2d::GLProgramState* ret = cobj->getGLProgramState(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::GLProgramState*)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_Mesh_getGLProgramState : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_getVertexBuffer(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getVertexBuffer : Invalid Native Object"); - if (argc == 0) { - unsigned int ret = cobj->getVertexBuffer(); - jsval jsret = JSVAL_NULL; - jsret = uint32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getVertexBuffer : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_calculateAABB(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_calculateAABB : Invalid Native Object"); - if (argc == 0) { - cobj->calculateAABB(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_calculateAABB : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_hasVertexAttrib(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_hasVertexAttrib : 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_3d_Mesh_hasVertexAttrib : Error processing arguments"); - bool ret = cobj->hasVertexAttrib(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_hasVertexAttrib : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Mesh_draw(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_draw : Invalid Native Object"); - if (argc == 7) { - cocos2d::Renderer* arg0; - double arg1; - cocos2d::Mat4 arg2; - unsigned int arg3; - unsigned int arg4; - cocos2d::Vec4 arg5; - bool arg6; - 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::Renderer*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); - ok &= jsval_to_matrix(cx, args.get(2), &arg2); - ok &= jsval_to_uint32(cx, args.get(3), &arg3); - ok &= jsval_to_uint32(cx, args.get(4), &arg4); - do { - if (!args.get(5).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(5).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg5 = (const cocos2d::Vec4&)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg5, cx, false, "Invalid Native Object"); - } while (0); - arg6 = JS::ToBoolean(args.get(6)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_draw : Error processing arguments"); - cobj->draw(arg0, arg1, arg2, arg3, arg4, arg5, arg6); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_draw : wrong number of arguments: %d, was expecting %d", argc, 7); - return false; -} -bool js_cocos2dx_3d_Mesh_getBlendFunc(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getBlendFunc : Invalid Native Object"); - if (argc == 0) { - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - jsval jsret = JSVAL_NULL; - jsret = blendfunc_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_getMeshIndexData(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getMeshIndexData : Invalid Native Object"); - if (argc == 0) { - cocos2d::MeshIndexData* ret = cobj->getMeshIndexData(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MeshIndexData*)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_Mesh_getMeshIndexData : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_setName(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setName : 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_Mesh_setName : Error processing arguments"); - cobj->setName(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setName : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Mesh_getIndexCount(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getIndexCount : Invalid Native Object"); - if (argc == 0) { - ssize_t ret = cobj->getIndexCount(); - jsval jsret = JSVAL_NULL; - jsret = ssize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getIndexCount : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_setMeshIndexData(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setMeshIndexData : Invalid Native Object"); - if (argc == 1) { - cocos2d::MeshIndexData* 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::MeshIndexData*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setMeshIndexData : Error processing arguments"); - cobj->setMeshIndexData(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setMeshIndexData : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Mesh_getMeshVertexAttribCount(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getMeshVertexAttribCount : Invalid Native Object"); - if (argc == 0) { - ssize_t ret = cobj->getMeshVertexAttribCount(); - jsval jsret = JSVAL_NULL; - jsret = ssize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getMeshVertexAttribCount : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_setBlendFunc(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setBlendFunc : Invalid Native Object"); - if (argc == 1) { - cocos2d::BlendFunc arg0; - ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setBlendFunc : Error processing arguments"); - cobj->setBlendFunc(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Mesh_getPrimitiveType(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getPrimitiveType : Invalid Native Object"); - if (argc == 0) { - unsigned int ret = cobj->getPrimitiveType(); - jsval jsret = JSVAL_NULL; - jsret = uint32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getPrimitiveType : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_setSkin(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setSkin : Invalid Native Object"); - if (argc == 1) { - cocos2d::MeshSkin* 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::MeshSkin*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setSkin : Error processing arguments"); - cobj->setSkin(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setSkin : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Mesh_isVisible(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_isVisible : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isVisible(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_isVisible : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_getIndexBuffer(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getIndexBuffer : Invalid Native Object"); - if (argc == 0) { - unsigned int ret = cobj->getIndexBuffer(); - jsval jsret = JSVAL_NULL; - jsret = uint32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getIndexBuffer : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Mesh_setGLProgramState(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setGLProgramState : Invalid Native Object"); - if (argc == 1) { - cocos2d::GLProgramState* 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::GLProgramState*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setGLProgramState : Error processing arguments"); - cobj->setGLProgramState(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setGLProgramState : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Mesh_setVisible(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setVisible : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setVisible : Error processing arguments"); - cobj->setVisible(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setVisible : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Mesh_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Mesh* cobj = new (std::nothrow) cocos2d::Mesh(); - 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::Mesh"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - - -void js_cocos2d_Mesh_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Mesh)", obj); -} - -void js_register_cocos2dx_3d_Mesh(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Mesh_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Mesh_class->name = "Mesh"; - jsb_cocos2d_Mesh_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Mesh_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Mesh_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Mesh_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Mesh_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Mesh_class->resolve = JS_ResolveStub; - jsb_cocos2d_Mesh_class->convert = JS_ConvertStub; - jsb_cocos2d_Mesh_class->finalize = js_cocos2d_Mesh_finalize; - jsb_cocos2d_Mesh_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("setTexture", js_cocos2dx_3d_Mesh_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTexture", js_cocos2dx_3d_Mesh_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSkin", js_cocos2dx_3d_Mesh_getSkin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMaterial", js_cocos2dx_3d_Mesh_getMaterial, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVertexSizeInBytes", js_cocos2dx_3d_Mesh_getVertexSizeInBytes, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMaterial", js_cocos2dx_3d_Mesh_setMaterial, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getName", js_cocos2dx_3d_Mesh_getName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getIndexFormat", js_cocos2dx_3d_Mesh_getIndexFormat, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getGLProgramState", js_cocos2dx_3d_Mesh_getGLProgramState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVertexBuffer", js_cocos2dx_3d_Mesh_getVertexBuffer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("calculateAABB", js_cocos2dx_3d_Mesh_calculateAABB, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("hasVertexAttrib", js_cocos2dx_3d_Mesh_hasVertexAttrib, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("draw", js_cocos2dx_3d_Mesh_draw, 7, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBlendFunc", js_cocos2dx_3d_Mesh_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMeshIndexData", js_cocos2dx_3d_Mesh_getMeshIndexData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setName", js_cocos2dx_3d_Mesh_setName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getIndexCount", js_cocos2dx_3d_Mesh_getIndexCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMeshIndexData", js_cocos2dx_3d_Mesh_setMeshIndexData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMeshVertexAttribCount", js_cocos2dx_3d_Mesh_getMeshVertexAttribCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBlendFunc", js_cocos2dx_3d_Mesh_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPrimitiveType", js_cocos2dx_3d_Mesh_getPrimitiveType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSkin", js_cocos2dx_3d_Mesh_setSkin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isVisible", js_cocos2dx_3d_Mesh_isVisible, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getIndexBuffer", js_cocos2dx_3d_Mesh_getIndexBuffer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setGLProgramState", js_cocos2dx_3d_Mesh_setGLProgramState, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setVisible", js_cocos2dx_3d_Mesh_setVisible, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_Mesh_prototype = JS_InitClass( - cx, global, - JS::NullPtr(), // parent proto - jsb_cocos2d_Mesh_class, - js_cocos2dx_3d_Mesh_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, "Mesh", 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_Mesh_class; - p->proto = jsb_cocos2d_Mesh_prototype; - p->parentProto = NULL; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - JSClass *jsb_cocos2d_AttachNode_class; JSObject *jsb_cocos2d_AttachNode_prototype; @@ -3390,72 +1262,573 @@ void js_register_cocos2dx_3d_BillBoard(JSContext *cx, JS::HandleObject global) { } } -JSClass *jsb_cocos2d_TextureCube_class; -JSObject *jsb_cocos2d_TextureCube_prototype; +JSClass *jsb_cocos2d_Mesh_class; +JSObject *jsb_cocos2d_Mesh_prototype; -bool js_cocos2dx_3d_TextureCube_reloadTexture(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_3d_Mesh_setTexture(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Mesh* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setTexture : Invalid Native Object"); + do { + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setTexture : wrong number of arguments"); + return false; +} +bool js_cocos2dx_3d_Mesh_getTexture(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::TextureCube* cobj = (cocos2d::TextureCube *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_TextureCube_reloadTexture : Invalid Native Object"); + cocos2d::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getTexture : Invalid Native Object"); if (argc == 0) { - bool ret = cobj->reloadTexture(); + cocos2d::Texture2D* ret = cobj->getTexture(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)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_Mesh_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_getSkin(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getSkin : Invalid Native Object"); + if (argc == 0) { + cocos2d::MeshSkin* ret = cobj->getSkin(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MeshSkin*)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_Mesh_getSkin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_getMaterial(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getMaterial : Invalid Native Object"); + if (argc == 0) { + cocos2d::Material* ret = cobj->getMaterial(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Material*)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_Mesh_getMaterial : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_getVertexSizeInBytes(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getVertexSizeInBytes : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getVertexSizeInBytes(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getVertexSizeInBytes : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_setMaterial(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setMaterial : Invalid Native Object"); + if (argc == 1) { + cocos2d::Material* 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::Material*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setMaterial : Error processing arguments"); + cobj->setMaterial(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setMaterial : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Mesh_getName(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getName : Invalid Native Object"); + if (argc == 0) { + const std::string& ret = cobj->getName(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getName : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_getIndexFormat(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getIndexFormat : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getIndexFormat(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getIndexFormat : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_getGLProgramState(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getGLProgramState : Invalid Native Object"); + if (argc == 0) { + cocos2d::GLProgramState* ret = cobj->getGLProgramState(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::GLProgramState*)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_Mesh_getGLProgramState : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_getVertexBuffer(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getVertexBuffer : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getVertexBuffer(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getVertexBuffer : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_calculateAABB(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_calculateAABB : Invalid Native Object"); + if (argc == 0) { + cobj->calculateAABB(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_calculateAABB : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_hasVertexAttrib(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_hasVertexAttrib : 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_3d_Mesh_hasVertexAttrib : Error processing arguments"); + bool ret = cobj->hasVertexAttrib(arg0); jsval jsret = JSVAL_NULL; jsret = BOOLEAN_TO_JSVAL(ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_3d_TextureCube_reloadTexture : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_hasVertexAttrib : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_3d_TextureCube_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_3d_Mesh_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 6) { - std::string arg0; - std::string arg1; - std::string arg2; - std::string arg3; - std::string arg4; - std::string arg5; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - ok &= jsval_to_std_string(cx, args.get(2), &arg2); - ok &= jsval_to_std_string(cx, args.get(3), &arg3); - ok &= jsval_to_std_string(cx, args.get(4), &arg4); - ok &= jsval_to_std_string(cx, args.get(5), &arg5); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_TextureCube_create : Error processing arguments"); - cocos2d::TextureCube* ret = cocos2d::TextureCube::create(arg0, arg1, arg2, arg3, arg4, arg5); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getBlendFunc : Invalid Native Object"); + if (argc == 0) { + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TextureCube*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); + jsret = blendfunc_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_3d_TextureCube_create : wrong number of arguments"); + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_3d_Mesh_getMeshIndexData(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getMeshIndexData : Invalid Native Object"); + if (argc == 0) { + cocos2d::MeshIndexData* ret = cobj->getMeshIndexData(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MeshIndexData*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } -bool js_cocos2dx_3d_TextureCube_constructor(JSContext *cx, uint32_t argc, jsval *vp) + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getMeshIndexData : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_setName(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - cocos2d::TextureCube* cobj = new (std::nothrow) cocos2d::TextureCube(); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setName : 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_Mesh_setName : Error processing arguments"); + cobj->setName(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setName : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Mesh_getIndexCount(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getIndexCount : Invalid Native Object"); + if (argc == 0) { + ssize_t ret = cobj->getIndexCount(); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getIndexCount : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_setMeshIndexData(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setMeshIndexData : Invalid Native Object"); + if (argc == 1) { + cocos2d::MeshIndexData* 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::MeshIndexData*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setMeshIndexData : Error processing arguments"); + cobj->setMeshIndexData(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setMeshIndexData : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Mesh_getMeshVertexAttribCount(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getMeshVertexAttribCount : Invalid Native Object"); + if (argc == 0) { + ssize_t ret = cobj->getMeshVertexAttribCount(); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getMeshVertexAttribCount : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_setBlendFunc(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setBlendFunc : Invalid Native Object"); + if (argc == 1) { + cocos2d::BlendFunc arg0; + ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setBlendFunc : Error processing arguments"); + cobj->setBlendFunc(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Mesh_getPrimitiveType(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getPrimitiveType : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getPrimitiveType(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getPrimitiveType : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_setSkin(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setSkin : Invalid Native Object"); + if (argc == 1) { + cocos2d::MeshSkin* 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::MeshSkin*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setSkin : Error processing arguments"); + cobj->setSkin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setSkin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Mesh_isVisible(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_isVisible : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isVisible(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_isVisible : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_getIndexBuffer(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getIndexBuffer : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getIndexBuffer(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getIndexBuffer : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Mesh_setGLProgramState(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setGLProgramState : Invalid Native Object"); + if (argc == 1) { + cocos2d::GLProgramState* 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::GLProgramState*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setGLProgramState : Error processing arguments"); + cobj->setGLProgramState(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setGLProgramState : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Mesh_setVisible(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::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setVisible : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setVisible : Error processing arguments"); + cobj->setVisible(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setVisible : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Mesh_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Mesh* cobj = new (std::nothrow) cocos2d::Mesh(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -3469,31 +1842,30 @@ bool js_cocos2dx_3d_TextureCube_constructor(JSContext *cx, uint32_t argc, jsval 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::TextureCube"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Mesh"); if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); return true; } -extern JSObject *jsb_cocos2d_Texture2D_prototype; -void js_cocos2d_TextureCube_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (TextureCube)", obj); +void js_cocos2d_Mesh_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Mesh)", obj); } -void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_TextureCube_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_TextureCube_class->name = "TextureCube"; - jsb_cocos2d_TextureCube_class->addProperty = JS_PropertyStub; - jsb_cocos2d_TextureCube_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_TextureCube_class->getProperty = JS_PropertyStub; - jsb_cocos2d_TextureCube_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_TextureCube_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_TextureCube_class->resolve = JS_ResolveStub; - jsb_cocos2d_TextureCube_class->convert = JS_ConvertStub; - jsb_cocos2d_TextureCube_class->finalize = js_cocos2d_TextureCube_finalize; - jsb_cocos2d_TextureCube_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_3d_Mesh(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Mesh_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Mesh_class->name = "Mesh"; + jsb_cocos2d_Mesh_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Mesh_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Mesh_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Mesh_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Mesh_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Mesh_class->resolve = JS_ResolveStub; + jsb_cocos2d_Mesh_class->convert = JS_ConvertStub; + jsb_cocos2d_Mesh_class->finalize = js_cocos2d_Mesh_finalize; + jsb_cocos2d_Mesh_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -3501,20 +1873,41 @@ void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global) }; static JSFunctionSpec funcs[] = { - JS_FN("reloadTexture", js_cocos2dx_3d_TextureCube_reloadTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTexture", js_cocos2dx_3d_Mesh_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTexture", js_cocos2dx_3d_Mesh_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSkin", js_cocos2dx_3d_Mesh_getSkin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMaterial", js_cocos2dx_3d_Mesh_getMaterial, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVertexSizeInBytes", js_cocos2dx_3d_Mesh_getVertexSizeInBytes, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaterial", js_cocos2dx_3d_Mesh_setMaterial, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getName", js_cocos2dx_3d_Mesh_getName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIndexFormat", js_cocos2dx_3d_Mesh_getIndexFormat, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getGLProgramState", js_cocos2dx_3d_Mesh_getGLProgramState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVertexBuffer", js_cocos2dx_3d_Mesh_getVertexBuffer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("calculateAABB", js_cocos2dx_3d_Mesh_calculateAABB, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("hasVertexAttrib", js_cocos2dx_3d_Mesh_hasVertexAttrib, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBlendFunc", js_cocos2dx_3d_Mesh_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMeshIndexData", js_cocos2dx_3d_Mesh_getMeshIndexData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setName", js_cocos2dx_3d_Mesh_setName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIndexCount", js_cocos2dx_3d_Mesh_getIndexCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMeshIndexData", js_cocos2dx_3d_Mesh_setMeshIndexData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMeshVertexAttribCount", js_cocos2dx_3d_Mesh_getMeshVertexAttribCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBlendFunc", js_cocos2dx_3d_Mesh_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPrimitiveType", js_cocos2dx_3d_Mesh_getPrimitiveType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSkin", js_cocos2dx_3d_Mesh_setSkin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isVisible", js_cocos2dx_3d_Mesh_isVisible, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIndexBuffer", js_cocos2dx_3d_Mesh_getIndexBuffer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setGLProgramState", js_cocos2dx_3d_Mesh_setGLProgramState, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setVisible", js_cocos2dx_3d_Mesh_setVisible, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_3d_TextureCube_create, 6, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; + JSFunctionSpec *st_funcs = NULL; - jsb_cocos2d_TextureCube_prototype = JS_InitClass( + jsb_cocos2d_Mesh_prototype = JS_InitClass( cx, global, - JS::RootedObject(cx, jsb_cocos2d_Texture2D_prototype), - jsb_cocos2d_TextureCube_class, - js_cocos2dx_3d_TextureCube_constructor, 0, // constructor + JS::NullPtr(), // parent proto + jsb_cocos2d_Mesh_class, + js_cocos2dx_3d_Mesh_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -3522,18 +1915,328 @@ void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global) // make the class enumerable in the registered namespace // bool found; //FIXME: Removed in Firefox v27 -// JS_SetPropertyAttributes(cx, global, "TextureCube", JSPROP_ENUMERATE | JSPROP_READONLY, &found); +// JS_SetPropertyAttributes(cx, global, "Mesh", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + 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_TextureCube_class; - p->proto = jsb_cocos2d_TextureCube_prototype; - p->parentProto = jsb_cocos2d_Texture2D_prototype; + p->jsclass = jsb_cocos2d_Mesh_class; + p->proto = jsb_cocos2d_Mesh_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Skeleton3D_class; +JSObject *jsb_cocos2d_Skeleton3D_prototype; + +bool js_cocos2dx_3d_Skeleton3D_removeAllBones(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_removeAllBones : Invalid Native Object"); + if (argc == 0) { + cobj->removeAllBones(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_removeAllBones : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Skeleton3D_addBone(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_addBone : Invalid Native Object"); + if (argc == 1) { + cocos2d::Bone3D* 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::Bone3D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Skeleton3D_addBone : Error processing arguments"); + cobj->addBone(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_addBone : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Skeleton3D_getBoneByName(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneByName : 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_Skeleton3D_getBoneByName : Error processing arguments"); + cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Bone3D*)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_Skeleton3D_getBoneByName : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Skeleton3D_getRootBone(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getRootBone : 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_3d_Skeleton3D_getRootBone : Error processing arguments"); + cocos2d::Bone3D* ret = cobj->getRootBone(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Bone3D*)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_Skeleton3D_getRootBone : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Skeleton3D_updateBoneMatrix(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_updateBoneMatrix : Invalid Native Object"); + if (argc == 0) { + cobj->updateBoneMatrix(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_updateBoneMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Skeleton3D_getBoneByIndex(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneByIndex : 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_3d_Skeleton3D_getBoneByIndex : Error processing arguments"); + cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Bone3D*)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_Skeleton3D_getBoneByIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Skeleton3D_getRootCount(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getRootCount : Invalid Native Object"); + if (argc == 0) { + ssize_t ret = cobj->getRootCount(); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_getRootCount : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Skeleton3D_getBoneIndex(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneIndex : Invalid Native Object"); + if (argc == 1) { + cocos2d::Bone3D* 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::Bone3D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneIndex : Error processing arguments"); + int ret = cobj->getBoneIndex(arg0); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_getBoneIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Skeleton3D_getBoneCount(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::Skeleton3D* cobj = (cocos2d::Skeleton3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Skeleton3D_getBoneCount : Invalid Native Object"); + if (argc == 0) { + ssize_t ret = cobj->getBoneCount(); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Skeleton3D_getBoneCount : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Skeleton3D_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Skeleton3D* cobj = new (std::nothrow) cocos2d::Skeleton3D(); + 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::Skeleton3D"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + + +void js_cocos2d_Skeleton3D_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Skeleton3D)", obj); +} + +void js_register_cocos2dx_3d_Skeleton3D(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Skeleton3D_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Skeleton3D_class->name = "Skeleton3D"; + jsb_cocos2d_Skeleton3D_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Skeleton3D_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Skeleton3D_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Skeleton3D_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Skeleton3D_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Skeleton3D_class->resolve = JS_ResolveStub; + jsb_cocos2d_Skeleton3D_class->convert = JS_ConvertStub; + jsb_cocos2d_Skeleton3D_class->finalize = js_cocos2d_Skeleton3D_finalize; + jsb_cocos2d_Skeleton3D_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("removeAllBones", js_cocos2dx_3d_Skeleton3D_removeAllBones, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addBone", js_cocos2dx_3d_Skeleton3D_addBone, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBoneByName", js_cocos2dx_3d_Skeleton3D_getBoneByName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRootBone", js_cocos2dx_3d_Skeleton3D_getRootBone, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("updateBoneMatrix", js_cocos2dx_3d_Skeleton3D_updateBoneMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBoneByIndex", js_cocos2dx_3d_Skeleton3D_getBoneByIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRootCount", js_cocos2dx_3d_Skeleton3D_getRootCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBoneIndex", js_cocos2dx_3d_Skeleton3D_getBoneIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBoneCount", js_cocos2dx_3d_Skeleton3D_getBoneCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_Skeleton3D_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Skeleton3D_class, + js_cocos2dx_3d_Skeleton3D_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, "Skeleton3D", 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_Skeleton3D_class; + p->proto = jsb_cocos2d_Skeleton3D_prototype; + p->parentProto = NULL; _js_global_type_map.insert(std::make_pair(typeName, p)); } } @@ -3789,6 +2492,1138 @@ void js_register_cocos2dx_3d_Skybox(JSContext *cx, JS::HandleObject global) { } } +JSClass *jsb_cocos2d_Sprite3D_class; +JSObject *jsb_cocos2d_Sprite3D_prototype; + +bool js_cocos2dx_3d_Sprite3D_setCullFaceEnabled(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setCullFaceEnabled : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_setCullFaceEnabled : Error processing arguments"); + cobj->setCullFaceEnabled(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setCullFaceEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_setTexture(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Sprite3D* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setTexture : Invalid Native Object"); + do { + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setTexture : wrong number of arguments"); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getLightMask(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getLightMask : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getLightMask(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_getLightMask : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode : Invalid Native Object"); + if (argc == 2) { + cocos2d::NodeData* arg0; + cocos2d::MaterialDatas arg1; + #pragma warning NO CONVERSION TO NATIVE FOR NodeData* + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode : Error processing arguments"); + cobj->createAttachSprite3DNode(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_3d_Sprite3D_loadFromFile(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_loadFromFile : Invalid Native Object"); + if (argc == 4) { + std::string arg0; + cocos2d::NodeDatas* arg1; + cocos2d::MeshDatas* arg2; + cocos2d::MaterialDatas* arg3; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas* + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MeshDatas* + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_loadFromFile : Error processing arguments"); + bool ret = cobj->loadFromFile(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_loadFromFile : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getMaterial(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMaterial : 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_3d_Sprite3D_getMaterial : Error processing arguments"); + cocos2d::Material* ret = cobj->getMaterial(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Material*)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_Sprite3D_getMaterial : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_setCullFace(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setCullFace : 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_3d_Sprite3D_setCullFace : Error processing arguments"); + cobj->setCullFace(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setCullFace : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_addMesh(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_addMesh : Invalid Native Object"); + if (argc == 1) { + cocos2d::Mesh* 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::Mesh*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_addMesh : Error processing arguments"); + cobj->addMesh(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_addMesh : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_removeAllAttachNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_removeAllAttachNode : Invalid Native Object"); + if (argc == 0) { + cobj->removeAllAttachNode(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_removeAllAttachNode : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3D_setMaterial(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Sprite3D* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setMaterial : Invalid Native Object"); + do { + if (argc == 2) { + cocos2d::Material* 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::Material*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + int arg1; + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + if (!ok) { ok = true; break; } + cobj->setMaterial(arg0, arg1); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + cocos2d::Material* 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::Material*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cobj->setMaterial(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setMaterial : wrong number of arguments"); + return false; +} +bool js_cocos2dx_3d_Sprite3D_genGLProgramState(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_genGLProgramState : Invalid Native Object"); + if (argc == 0) { + cobj->genGLProgramState(); + args.rval().setUndefined(); + return true; + } + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_genGLProgramState : Error processing arguments"); + cobj->genGLProgramState(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_genGLProgramState : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getMesh(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMesh : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mesh* ret = cobj->getMesh(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Mesh*)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_Sprite3D_getMesh : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3D_createSprite3DNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_createSprite3DNode : Invalid Native Object"); + if (argc == 3) { + cocos2d::NodeData* arg0; + cocos2d::ModelData* arg1; + cocos2d::MaterialDatas arg2; + #pragma warning NO CONVERSION TO NATIVE FOR NodeData* + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR ModelData* + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_createSprite3DNode : Error processing arguments"); + cocos2d::Sprite3D* ret = cobj->createSprite3DNode(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3D*)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_Sprite3D_createSprite3DNode : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getMeshCount(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMeshCount : Invalid Native Object"); + if (argc == 0) { + ssize_t ret = cobj->getMeshCount(); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_getMeshCount : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3D_onAABBDirty(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_onAABBDirty : Invalid Native Object"); + if (argc == 0) { + cobj->onAABBDirty(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_onAABBDirty : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getMeshByIndex(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMeshByIndex : 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_3d_Sprite3D_getMeshByIndex : Error processing arguments"); + cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Mesh*)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_Sprite3D_getMeshByIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_createNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_createNode : Invalid Native Object"); + if (argc == 4) { + cocos2d::NodeData* arg0; + cocos2d::Node* arg1; + cocos2d::MaterialDatas arg2; + bool arg3; + #pragma warning NO CONVERSION TO NATIVE FOR NodeData* + ok = false; + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + arg3 = JS::ToBoolean(args.get(3)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_createNode : Error processing arguments"); + cobj->createNode(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_createNode : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_3d_Sprite3D_isForceDepthWrite(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_isForceDepthWrite : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isForceDepthWrite(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_isForceDepthWrite : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getBlendFunc(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getBlendFunc : Invalid Native Object"); + if (argc == 0) { + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + jsval jsret = JSVAL_NULL; + jsret = blendfunc_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getMeshIndexData(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMeshIndexData : 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_Sprite3D_getMeshIndexData : Error processing arguments"); + cocos2d::MeshIndexData* ret = cobj->getMeshIndexData(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MeshIndexData*)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_Sprite3D_getMeshIndexData : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_setLightMask(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setLightMask : 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_3d_Sprite3D_setLightMask : Error processing arguments"); + cobj->setLightMask(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setLightMask : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_afterAsyncLoad(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_afterAsyncLoad : 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_3d_Sprite3D_afterAsyncLoad : Error processing arguments"); + cobj->afterAsyncLoad(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_afterAsyncLoad : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_loadFromCache(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_loadFromCache : 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_Sprite3D_loadFromCache : Error processing arguments"); + bool ret = cobj->loadFromCache(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_loadFromCache : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_initFrom(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_initFrom : Invalid Native Object"); + if (argc == 3) { + cocos2d::NodeDatas arg0; + cocos2d::MeshDatas arg1; + cocos2d::MaterialDatas arg2; + #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MeshDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_initFrom : Error processing arguments"); + bool ret = cobj->initFrom(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_initFrom : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getAttachNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getAttachNode : 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_Sprite3D_getAttachNode : Error processing arguments"); + cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::AttachNode*)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_Sprite3D_getAttachNode : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_initWithFile(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_initWithFile : 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_Sprite3D_initWithFile : Error processing arguments"); + bool ret = cobj->initWithFile(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_initWithFile : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_setBlendFunc(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setBlendFunc : Invalid Native Object"); + if (argc == 1) { + cocos2d::BlendFunc arg0; + ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_setBlendFunc : Error processing arguments"); + cobj->setBlendFunc(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_removeAttachNode(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_removeAttachNode : 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_Sprite3D_removeAttachNode : Error processing arguments"); + cobj->removeAttachNode(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_removeAttachNode : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getSkeleton(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getSkeleton : Invalid Native Object"); + if (argc == 0) { + cocos2d::Skeleton3D* ret = cobj->getSkeleton(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Skeleton3D*)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_Sprite3D_getSkeleton : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3D_setForceDepthWrite(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setForceDepthWrite : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Sprite3D_setForceDepthWrite : Error processing arguments"); + cobj->setForceDepthWrite(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setForceDepthWrite : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_getMeshByName(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::Sprite3D* cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_getMeshByName : 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_Sprite3D_getMeshByName : Error processing arguments"); + cocos2d::Mesh* ret = cobj->getMeshByName(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Mesh*)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_Sprite3D_getMeshByName : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3D_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3D*)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::Sprite3D* ret = cocos2d::Sprite3D::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3D*)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) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3D*)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_3d_Sprite3D_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_3d_Sprite3D_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Sprite3D* cobj = new (std::nothrow) cocos2d::Sprite3D(); + 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::Sprite3D"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_Sprite3D_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Sprite3D)", obj); +} + +static bool js_cocos2d_Sprite3D_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::Sprite3D *nobj = new (std::nothrow) cocos2d::Sprite3D(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Sprite3D"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_3d_Sprite3D(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Sprite3D_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Sprite3D_class->name = "Sprite3D"; + jsb_cocos2d_Sprite3D_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Sprite3D_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Sprite3D_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Sprite3D_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Sprite3D_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Sprite3D_class->resolve = JS_ResolveStub; + jsb_cocos2d_Sprite3D_class->convert = JS_ConvertStub; + jsb_cocos2d_Sprite3D_class->finalize = js_cocos2d_Sprite3D_finalize; + jsb_cocos2d_Sprite3D_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("setCullFaceEnabled", js_cocos2dx_3d_Sprite3D_setCullFaceEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTexture", js_cocos2dx_3d_Sprite3D_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLightMask", js_cocos2dx_3d_Sprite3D_getLightMask, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createAttachSprite3DNode", js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadFromFile", js_cocos2dx_3d_Sprite3D_loadFromFile, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMaterial", js_cocos2dx_3d_Sprite3D_getMaterial, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCullFace", js_cocos2dx_3d_Sprite3D_setCullFace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addMesh", js_cocos2dx_3d_Sprite3D_addMesh, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllAttachNode", js_cocos2dx_3d_Sprite3D_removeAllAttachNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaterial", js_cocos2dx_3d_Sprite3D_setMaterial, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("genGLProgramState", js_cocos2dx_3d_Sprite3D_genGLProgramState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMesh", js_cocos2dx_3d_Sprite3D_getMesh, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createSprite3DNode", js_cocos2dx_3d_Sprite3D_createSprite3DNode, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMeshCount", js_cocos2dx_3d_Sprite3D_getMeshCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("onAABBDirty", js_cocos2dx_3d_Sprite3D_onAABBDirty, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMeshByIndex", js_cocos2dx_3d_Sprite3D_getMeshByIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createNode", js_cocos2dx_3d_Sprite3D_createNode, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isForceDepthWrite", js_cocos2dx_3d_Sprite3D_isForceDepthWrite, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBlendFunc", js_cocos2dx_3d_Sprite3D_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMeshIndexData", js_cocos2dx_3d_Sprite3D_getMeshIndexData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLightMask", js_cocos2dx_3d_Sprite3D_setLightMask, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("afterAsyncLoad", js_cocos2dx_3d_Sprite3D_afterAsyncLoad, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadFromCache", js_cocos2dx_3d_Sprite3D_loadFromCache, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initFrom", js_cocos2dx_3d_Sprite3D_initFrom, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAttachNode", js_cocos2dx_3d_Sprite3D_getAttachNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithFile", js_cocos2dx_3d_Sprite3D_initWithFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBlendFunc", js_cocos2dx_3d_Sprite3D_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAttachNode", js_cocos2dx_3d_Sprite3D_removeAttachNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSkeleton", js_cocos2dx_3d_Sprite3D_getSkeleton, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setForceDepthWrite", js_cocos2dx_3d_Sprite3D_setForceDepthWrite, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMeshByName", js_cocos2dx_3d_Sprite3D_getMeshByName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_Sprite3D_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_3d_Sprite3D_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Sprite3D_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_Sprite3D_class, + js_cocos2dx_3d_Sprite3D_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, "Sprite3D", 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_Sprite3D_class; + p->proto = jsb_cocos2d_Sprite3D_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Sprite3DCache_class; +JSObject *jsb_cocos2d_Sprite3DCache_prototype; + +bool js_cocos2dx_3d_Sprite3DCache_removeSprite3DData(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::Sprite3DCache* cobj = (cocos2d::Sprite3DCache *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3DCache_removeSprite3DData : 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_Sprite3DCache_removeSprite3DData : Error processing arguments"); + cobj->removeSprite3DData(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3DCache_removeSprite3DData : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData(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::Sprite3DCache* cobj = (cocos2d::Sprite3DCache *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData : Invalid Native Object"); + if (argc == 0) { + cobj->removeAllSprite3DData(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Sprite3DCache_destroyInstance(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::Sprite3DCache::destroyInstance(); + args.rval().setUndefined(); + return true; + } + JS_ReportError(cx, "js_cocos2dx_3d_Sprite3DCache_destroyInstance : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_3d_Sprite3DCache_getInstance(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::Sprite3DCache* ret = cocos2d::Sprite3DCache::getInstance(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite3DCache*)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_Sprite3DCache_getInstance : wrong number of arguments"); + return false; +} + + + +void js_cocos2d_Sprite3DCache_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Sprite3DCache)", obj); +} + +void js_register_cocos2dx_3d_Sprite3DCache(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Sprite3DCache_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Sprite3DCache_class->name = "Sprite3DCache"; + jsb_cocos2d_Sprite3DCache_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Sprite3DCache_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Sprite3DCache_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Sprite3DCache_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Sprite3DCache_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Sprite3DCache_class->resolve = JS_ResolveStub; + jsb_cocos2d_Sprite3DCache_class->convert = JS_ConvertStub; + jsb_cocos2d_Sprite3DCache_class->finalize = js_cocos2d_Sprite3DCache_finalize; + jsb_cocos2d_Sprite3DCache_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("removeSprite3DData", js_cocos2dx_3d_Sprite3DCache_removeSprite3DData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllSprite3DData", js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("destroyInstance", js_cocos2dx_3d_Sprite3DCache_destroyInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getInstance", js_cocos2dx_3d_Sprite3DCache_getInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Sprite3DCache_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Sprite3DCache_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, "Sprite3DCache", 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_Sprite3DCache_class; + p->proto = jsb_cocos2d_Sprite3DCache_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_Terrain_class; JSObject *jsb_cocos2d_Terrain_prototype; @@ -3814,26 +3649,107 @@ bool js_cocos2dx_3d_Terrain_initHeightMap(JSContext *cx, uint32_t argc, jsval *v JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initHeightMap : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_3d_Terrain_getIntersectionPoint(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_3d_Terrain_setMaxDetailMapAmount(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getIntersectionPoint : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : Invalid Native Object"); if (argc == 1) { - cocos2d::Ray arg0; - ok &= jsval_to_ray(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_getIntersectionPoint : Error processing arguments"); - cocos2d::Vec3 ret = cobj->getIntersectionPoint(arg0); - jsval jsret = JSVAL_NULL; - jsret = vector3_to_jsval(cx, ret); - args.rval().set(jsret); + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : Error processing arguments"); + cobj->setMaxDetailMapAmount(arg0); + args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getIntersectionPoint : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Terrain_setDrawWire(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setDrawWire : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setDrawWire : Error processing arguments"); + cobj->setDrawWire(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setDrawWire : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Terrain_setIsEnableFrustumCull(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : Error processing arguments"); + cobj->setIsEnableFrustumCull(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Terrain_setDetailMap(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setDetailMap : Invalid Native Object"); + if (argc == 2) { + unsigned int arg0; + cocos2d::Terrain::DetailMap arg1; + ok &= jsval_to_uint32(cx, args.get(0), &arg0); + #pragma warning NO CONVERSION TO NATIVE FOR DetailMap + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setDetailMap : Error processing arguments"); + cobj->setDetailMap(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setDetailMap : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_3d_Terrain_resetHeightMap(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_resetHeightMap : Invalid Native Object"); + if (argc == 1) { + const char* arg0; + std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_resetHeightMap : Error processing arguments"); + cobj->resetHeightMap(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_resetHeightMap : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } bool js_cocos2dx_3d_Terrain_setAlphaMap(JSContext *cx, uint32_t argc, jsval *vp) @@ -3905,6 +3821,42 @@ bool js_cocos2dx_3d_Terrain_convertToTerrainSpace(JSContext *cx, uint32_t argc, JS_ReportError(cx, "js_cocos2dx_3d_Terrain_convertToTerrainSpace : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_3d_Terrain_initTextures(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_initTextures : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->initTextures(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initTextures : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Terrain_initProperties(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_initProperties : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->initProperties(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initProperties : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -3997,40 +3949,68 @@ bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getHeight : wrong number of arguments"); return false; } -bool js_cocos2dx_3d_Terrain_initTextures(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_3d_Terrain_setLODDistance(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_initTextures : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->initTextures(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setLODDistance : 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_3d_Terrain_setLODDistance : Error processing arguments"); + cobj->setLODDistance(arg0, arg1, arg2); + args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initTextures : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setLODDistance : wrong number of arguments: %d, was expecting %d", argc, 3); return false; } -bool js_cocos2dx_3d_Terrain_initProperties(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_3d_Terrain_getTerrainSize(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_initProperties : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getTerrainSize : Invalid Native Object"); if (argc == 0) { - bool ret = cobj->initProperties(); + cocos2d::Size ret = cobj->getTerrainSize(); jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); + jsret = ccsize_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initProperties : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getTerrainSize : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Terrain_getIntersectionPoint(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getIntersectionPoint : Invalid Native Object"); + if (argc == 1) { + cocos2d::Ray arg0; + ok &= jsval_to_ray(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_getIntersectionPoint : Error processing arguments"); + cocos2d::Vec3 ret = cobj->getIntersectionPoint(arg0); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getIntersectionPoint : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } bool js_cocos2dx_3d_Terrain_getNormal(JSContext *cx, uint32_t argc, jsval *vp) @@ -4057,26 +4037,6 @@ bool js_cocos2dx_3d_Terrain_getNormal(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getNormal : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_3d_Terrain_setDrawWire(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setDrawWire : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setDrawWire : Error processing arguments"); - cobj->setDrawWire(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setDrawWire : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} bool js_cocos2dx_3d_Terrain_reload(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -4093,29 +4053,6 @@ bool js_cocos2dx_3d_Terrain_reload(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_3d_Terrain_reload : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_3d_Terrain_setDetailMap(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setDetailMap : Invalid Native Object"); - if (argc == 2) { - unsigned int arg0; - cocos2d::Terrain::DetailMap arg1; - ok &= jsval_to_uint32(cx, args.get(0), &arg0); - #pragma warning NO CONVERSION TO NATIVE FOR DetailMap - ok = false; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setDetailMap : Error processing arguments"); - cobj->setDetailMap(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setDetailMap : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} bool js_cocos2dx_3d_Terrain_getImageHeight(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -4140,68 +4077,6 @@ bool js_cocos2dx_3d_Terrain_getImageHeight(JSContext *cx, uint32_t argc, jsval * JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getImageHeight : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_3d_Terrain_getMinHeight(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getMinHeight : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getMinHeight(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getMinHeight : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_3d_Terrain_setLODDistance(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setLODDistance : 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_3d_Terrain_setLODDistance : Error processing arguments"); - cobj->setLODDistance(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setLODDistance : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} -bool js_cocos2dx_3d_Terrain_resetHeightMap(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_resetHeightMap : Invalid Native Object"); - if (argc == 1) { - const char* arg0; - std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_resetHeightMap : Error processing arguments"); - cobj->resetHeightMap(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_resetHeightMap : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} bool js_cocos2dx_3d_Terrain_getMaxHeight(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -4220,44 +4095,22 @@ bool js_cocos2dx_3d_Terrain_getMaxHeight(JSContext *cx, uint32_t argc, jsval *vp JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getMaxHeight : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_3d_Terrain_setMaxDetailMapAmount(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_3d_Terrain_getMinHeight(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : 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_3d_Terrain_setMaxDetailMapAmount : Error processing arguments"); - cobj->setMaxDetailMapAmount(arg0); - args.rval().setUndefined(); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getMinHeight : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getMinHeight(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_3d_Terrain_setIsEnableFrustumCull(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : Error processing arguments"); - cobj->setIsEnableFrustumCull(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getMinHeight : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } @@ -4287,24 +4140,25 @@ void js_register_cocos2dx_3d_Terrain(JSContext *cx, JS::HandleObject global) { static JSFunctionSpec funcs[] = { JS_FN("initHeightMap", js_cocos2dx_3d_Terrain_initHeightMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getIntersectionPoint", js_cocos2dx_3d_Terrain_getIntersectionPoint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaxDetailMapAmount", js_cocos2dx_3d_Terrain_setMaxDetailMapAmount, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDrawWire", js_cocos2dx_3d_Terrain_setDrawWire, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setIsEnableFrustumCull", js_cocos2dx_3d_Terrain_setIsEnableFrustumCull, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDetailMap", js_cocos2dx_3d_Terrain_setDetailMap, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("resetHeightMap", js_cocos2dx_3d_Terrain_resetHeightMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setAlphaMap", js_cocos2dx_3d_Terrain_setAlphaMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setSkirtHeightRatio", js_cocos2dx_3d_Terrain_setSkirtHeightRatio, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("convertToTerrainSpace", js_cocos2dx_3d_Terrain_convertToTerrainSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getHeight", js_cocos2dx_3d_Terrain_getHeight, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("initTextures", js_cocos2dx_3d_Terrain_initTextures, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("initProperties", js_cocos2dx_3d_Terrain_initProperties, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getNormal", js_cocos2dx_3d_Terrain_getNormal, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDrawWire", js_cocos2dx_3d_Terrain_setDrawWire, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("reload", js_cocos2dx_3d_Terrain_reload, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDetailMap", js_cocos2dx_3d_Terrain_setDetailMap, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getImageHeight", js_cocos2dx_3d_Terrain_getImageHeight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMinHeight", js_cocos2dx_3d_Terrain_getMinHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getHeight", js_cocos2dx_3d_Terrain_getHeight, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setLODDistance", js_cocos2dx_3d_Terrain_setLODDistance, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("resetHeightMap", js_cocos2dx_3d_Terrain_resetHeightMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTerrainSize", js_cocos2dx_3d_Terrain_getTerrainSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIntersectionPoint", js_cocos2dx_3d_Terrain_getIntersectionPoint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getNormal", js_cocos2dx_3d_Terrain_getNormal, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("reload", js_cocos2dx_3d_Terrain_reload, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getImageHeight", js_cocos2dx_3d_Terrain_getImageHeight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getMaxHeight", js_cocos2dx_3d_Terrain_getMaxHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMaxDetailMapAmount", js_cocos2dx_3d_Terrain_setMaxDetailMapAmount, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setIsEnableFrustumCull", js_cocos2dx_3d_Terrain_setIsEnableFrustumCull, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMinHeight", js_cocos2dx_3d_Terrain_getMinHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; @@ -4338,6 +4192,154 @@ void js_register_cocos2dx_3d_Terrain(JSContext *cx, JS::HandleObject global) { } } +JSClass *jsb_cocos2d_TextureCube_class; +JSObject *jsb_cocos2d_TextureCube_prototype; + +bool js_cocos2dx_3d_TextureCube_reloadTexture(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::TextureCube* cobj = (cocos2d::TextureCube *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_TextureCube_reloadTexture : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->reloadTexture(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_TextureCube_reloadTexture : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_TextureCube_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 6) { + std::string arg0; + std::string arg1; + std::string arg2; + std::string arg3; + std::string arg4; + std::string arg5; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + ok &= jsval_to_std_string(cx, args.get(2), &arg2); + ok &= jsval_to_std_string(cx, args.get(3), &arg3); + ok &= jsval_to_std_string(cx, args.get(4), &arg4); + ok &= jsval_to_std_string(cx, args.get(5), &arg5); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_TextureCube_create : Error processing arguments"); + cocos2d::TextureCube* ret = cocos2d::TextureCube::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::TextureCube*)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_TextureCube_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_3d_TextureCube_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::TextureCube* cobj = new (std::nothrow) cocos2d::TextureCube(); + 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::TextureCube"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Texture2D_prototype; + +void js_cocos2d_TextureCube_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (TextureCube)", obj); +} + +void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_TextureCube_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_TextureCube_class->name = "TextureCube"; + jsb_cocos2d_TextureCube_class->addProperty = JS_PropertyStub; + jsb_cocos2d_TextureCube_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_TextureCube_class->getProperty = JS_PropertyStub; + jsb_cocos2d_TextureCube_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_TextureCube_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_TextureCube_class->resolve = JS_ResolveStub; + jsb_cocos2d_TextureCube_class->convert = JS_ConvertStub; + jsb_cocos2d_TextureCube_class->finalize = js_cocos2d_TextureCube_finalize; + jsb_cocos2d_TextureCube_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("reloadTexture", js_cocos2dx_3d_TextureCube_reloadTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_3d_TextureCube_create, 6, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_TextureCube_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Texture2D_prototype), + jsb_cocos2d_TextureCube_class, + js_cocos2dx_3d_TextureCube_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, "TextureCube", 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_TextureCube_class; + p->proto = jsb_cocos2d_TextureCube_prototype; + p->parentProto = jsb_cocos2d_Texture2D_prototype; + _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); @@ -4350,9 +4352,9 @@ 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_BillBoard(cx, ns); js_register_cocos2dx_3d_Skeleton3D(cx, ns); - js_register_cocos2dx_3d_Mesh(cx, ns); + js_register_cocos2dx_3d_BillBoard(cx, ns); js_register_cocos2dx_3d_Animation3D(cx, ns); + js_register_cocos2dx_3d_Mesh(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 0612d75d86..7ccbe87356 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.hpp @@ -43,111 +43,6 @@ bool js_cocos2dx_3d_Animate3D_createWithFrames(JSContext *cx, uint32_t argc, jsv bool js_cocos2dx_3d_Animate3D_setTransitionTime(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Animate3D_Animate3D(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_Skeleton3D_class; -extern JSObject *jsb_cocos2d_Skeleton3D_prototype; - -bool js_cocos2dx_3d_Skeleton3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_3d_Skeleton3D_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_3d_Skeleton3D(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_3d_Skeleton3D_removeAllBones(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Skeleton3D_addBone(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Skeleton3D_getBoneByName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Skeleton3D_getRootBone(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Skeleton3D_updateBoneMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Skeleton3D_getBoneByIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Skeleton3D_getRootCount(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Skeleton3D_getBoneIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Skeleton3D_getBoneCount(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Skeleton3D_Skeleton3D(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Sprite3D_class; -extern JSObject *jsb_cocos2d_Sprite3D_prototype; - -bool js_cocos2dx_3d_Sprite3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_3d_Sprite3D_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_3d_Sprite3D(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_3d_Sprite3D_setCullFaceEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_setTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_getLightMask(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_loadFromFile(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_setCullFace(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_addMesh(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_removeAllAttachNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_setMaterial(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_genGLProgramState(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_getMesh(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_createSprite3DNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_getMeshCount(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_onAABBDirty(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_getMeshByIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_createNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_isForceDepthWrite(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_getMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_removeAttachNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_setLightMask(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_afterAsyncLoad(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_loadFromCache(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_initFrom(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_getAttachNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_getSkeleton(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_setForceDepthWrite(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_getMeshByName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3D_Sprite3D(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Sprite3DCache_class; -extern JSObject *jsb_cocos2d_Sprite3DCache_prototype; - -bool js_cocos2dx_3d_Sprite3DCache_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_3d_Sprite3DCache_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_3d_Sprite3DCache(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_3d_Sprite3DCache_removeSprite3DData(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3DCache_destroyInstance(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Sprite3DCache_getInstance(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Mesh_class; -extern JSObject *jsb_cocos2d_Mesh_prototype; - -bool js_cocos2dx_3d_Mesh_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_3d_Mesh_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_3d_Mesh(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_3d_Mesh_setTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getSkin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getMaterial(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getVertexSizeInBytes(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_setMaterial(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getIndexFormat(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getGLProgramState(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getVertexBuffer(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_calculateAABB(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_hasVertexAttrib(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_draw(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_setName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getIndexCount(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_setMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getMeshVertexAttribCount(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getPrimitiveType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_setSkin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_isVisible(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_getIndexBuffer(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_setGLProgramState(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_setVisible(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Mesh_Mesh(JSContext *cx, uint32_t argc, jsval *vp); - extern JSClass *jsb_cocos2d_AttachNode_class; extern JSObject *jsb_cocos2d_AttachNode_prototype; @@ -171,16 +66,57 @@ bool js_cocos2dx_3d_BillBoard_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_BillBoard_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_BillBoard_BillBoard(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_TextureCube_class; -extern JSObject *jsb_cocos2d_TextureCube_prototype; +extern JSClass *jsb_cocos2d_Mesh_class; +extern JSObject *jsb_cocos2d_Mesh_prototype; -bool js_cocos2dx_3d_TextureCube_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_3d_TextureCube_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global); +bool js_cocos2dx_3d_Mesh_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_3d_Mesh_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_3d_Mesh(JSContext *cx, JS::HandleObject global); 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); +bool js_cocos2dx_3d_Mesh_setTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getSkin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getMaterial(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getVertexSizeInBytes(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_setMaterial(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getIndexFormat(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getGLProgramState(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getVertexBuffer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_calculateAABB(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_hasVertexAttrib(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_setName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getIndexCount(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_setMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getMeshVertexAttribCount(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getPrimitiveType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_setSkin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_isVisible(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_getIndexBuffer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_setGLProgramState(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_setVisible(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Mesh_Mesh(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Skeleton3D_class; +extern JSObject *jsb_cocos2d_Skeleton3D_prototype; + +bool js_cocos2dx_3d_Skeleton3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_3d_Skeleton3D_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_3d_Skeleton3D(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_3d_Skeleton3D_removeAllBones(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Skeleton3D_addBone(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Skeleton3D_getBoneByName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Skeleton3D_getRootBone(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Skeleton3D_updateBoneMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Skeleton3D_getBoneByIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Skeleton3D_getRootCount(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Skeleton3D_getBoneIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Skeleton3D_getBoneCount(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Skeleton3D_Skeleton3D(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_Skybox_class; extern JSObject *jsb_cocos2d_Skybox_prototype; @@ -195,6 +131,59 @@ bool js_cocos2dx_3d_Skybox_setTexture(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skybox_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Skybox_Skybox(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_Sprite3D_class; +extern JSObject *jsb_cocos2d_Sprite3D_prototype; + +bool js_cocos2dx_3d_Sprite3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_3d_Sprite3D_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_3d_Sprite3D(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_3d_Sprite3D_setCullFaceEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_setTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getLightMask(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_createAttachSprite3DNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_loadFromFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getMaterial(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_setCullFace(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_addMesh(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_removeAllAttachNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_setMaterial(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_genGLProgramState(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getMesh(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_createSprite3DNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getMeshCount(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_onAABBDirty(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getMeshByIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_createNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_isForceDepthWrite(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_setLightMask(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_afterAsyncLoad(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_loadFromCache(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_initFrom(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getAttachNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_removeAttachNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getSkeleton(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_setForceDepthWrite(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_getMeshByName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3D_Sprite3D(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Sprite3DCache_class; +extern JSObject *jsb_cocos2d_Sprite3DCache_prototype; + +bool js_cocos2dx_3d_Sprite3DCache_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_3d_Sprite3DCache_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_3d_Sprite3DCache(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_3d_Sprite3DCache_removeSprite3DData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3DCache_destroyInstance(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Sprite3DCache_getInstance(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_Terrain_class; extern JSObject *jsb_cocos2d_Terrain_prototype; @@ -203,23 +192,35 @@ void js_cocos2dx_3d_Terrain_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_3d_Terrain(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_Terrain_initHeightMap(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_getIntersectionPoint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_setMaxDetailMapAmount(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_setDrawWire(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_setIsEnableFrustumCull(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_setDetailMap(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_resetHeightMap(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Terrain_setAlphaMap(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Terrain_setSkirtHeightRatio(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Terrain_convertToTerrainSpace(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Terrain_initTextures(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Terrain_initProperties(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_getNormal(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_setDrawWire(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_reload(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_setDetailMap(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_getImageHeight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_getMinHeight(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Terrain_setLODDistance(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_resetHeightMap(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_getTerrainSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_getIntersectionPoint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_getNormal(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_reload(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_getImageHeight(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_Terrain_getMaxHeight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_setMaxDetailMapAmount(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_3d_Terrain_setIsEnableFrustumCull(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Terrain_getMinHeight(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_TextureCube_class; +extern JSObject *jsb_cocos2d_TextureCube_prototype; + +bool js_cocos2dx_3d_TextureCube_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_3d_TextureCube_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global); +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); #endif diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp index df39e1e46b..c6ca7f4961 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp @@ -4,6 +4,7 @@ #include "SimpleAudioEngine.h" #include "CCProtectedNode.h" #include "CCAsyncTaskPool.h" +#include "SpritePolygonCache.h" template static bool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) { @@ -44,970 +45,6 @@ static bool js_is_native_obj(JSContext *cx, uint32_t argc, jsval *vp) args.rval().setBoolean(true); return true; } -JSClass *jsb_cocos2d_Action_class; -JSObject *jsb_cocos2d_Action_prototype; - -bool js_cocos2dx_Action_startWithTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_startWithTarget : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Action_startWithTarget : Error processing arguments"); - cobj->startWithTarget(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_startWithTarget : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Action_setOriginalTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_setOriginalTarget : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Action_setOriginalTarget : Error processing arguments"); - cobj->setOriginalTarget(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_setOriginalTarget : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Action_clone(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_clone : Invalid Native Object"); - if (argc == 0) { - cocos2d::Action* ret = cobj->clone(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Action*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_clone : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Action_getOriginalTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_getOriginalTarget : Invalid Native Object"); - if (argc == 0) { - cocos2d::Node* ret = cobj->getOriginalTarget(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_getOriginalTarget : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Action_stop(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_stop : Invalid Native Object"); - if (argc == 0) { - cobj->stop(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_stop : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Action_update(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_update : 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_Action_update : Error processing arguments"); - cobj->update(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_update : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Action_getTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_getTarget : Invalid Native Object"); - if (argc == 0) { - cocos2d::Node* ret = cobj->getTarget(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_getTarget : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Action_step(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_step : 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_Action_step : Error processing arguments"); - cobj->step(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_step : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Action_setTag(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_setTag : 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_Action_setTag : Error processing arguments"); - cobj->setTag(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_setTag : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Action_getTag(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_getTag : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getTag(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_getTag : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Action_setTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_setTarget : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Action_setTarget : Error processing arguments"); - cobj->setTarget(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_setTarget : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Action_isDone(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_isDone : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isDone(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_isDone : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Action_reverse(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_reverse : Invalid Native Object"); - if (argc == 0) { - cocos2d::Action* ret = cobj->reverse(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Action*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Action_reverse : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} - - -void js_cocos2d_Action_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Action)", obj); -} - -void js_register_cocos2dx_Action(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Action_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Action_class->name = "Action"; - jsb_cocos2d_Action_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Action_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Action_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Action_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Action_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Action_class->resolve = JS_ResolveStub; - jsb_cocos2d_Action_class->convert = JS_ConvertStub; - jsb_cocos2d_Action_class->finalize = js_cocos2d_Action_finalize; - jsb_cocos2d_Action_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("startWithTarget", js_cocos2dx_Action_startWithTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setOriginalTarget", js_cocos2dx_Action_setOriginalTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("clone", js_cocos2dx_Action_clone, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getOriginalTarget", js_cocos2dx_Action_getOriginalTarget, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("stop", js_cocos2dx_Action_stop, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("update", js_cocos2dx_Action_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTarget", js_cocos2dx_Action_getTarget, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("step", js_cocos2dx_Action_step, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTag", js_cocos2dx_Action_setTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTag", js_cocos2dx_Action_getTag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTarget", js_cocos2dx_Action_setTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isDone", js_cocos2dx_Action_isDone, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("reverse", js_cocos2dx_Action_reverse, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_Action_prototype = JS_InitClass( - cx, global, - JS::NullPtr(), // parent proto - jsb_cocos2d_Action_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, "Action", 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_Action_class; - p->proto = jsb_cocos2d_Action_prototype; - p->parentProto = NULL; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_FiniteTimeAction_class; -JSObject *jsb_cocos2d_FiniteTimeAction_prototype; - -bool js_cocos2dx_FiniteTimeAction_setDuration(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::FiniteTimeAction* cobj = (cocos2d::FiniteTimeAction *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_FiniteTimeAction_setDuration : 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_FiniteTimeAction_setDuration : Error processing arguments"); - cobj->setDuration(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_FiniteTimeAction_setDuration : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_FiniteTimeAction_getDuration(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::FiniteTimeAction* cobj = (cocos2d::FiniteTimeAction *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_FiniteTimeAction_getDuration : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getDuration(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_FiniteTimeAction_getDuration : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} - -extern JSObject *jsb_cocos2d_Action_prototype; - -void js_cocos2d_FiniteTimeAction_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (FiniteTimeAction)", obj); -} - -void js_register_cocos2dx_FiniteTimeAction(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_FiniteTimeAction_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_FiniteTimeAction_class->name = "FiniteTimeAction"; - jsb_cocos2d_FiniteTimeAction_class->addProperty = JS_PropertyStub; - jsb_cocos2d_FiniteTimeAction_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_FiniteTimeAction_class->getProperty = JS_PropertyStub; - jsb_cocos2d_FiniteTimeAction_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_FiniteTimeAction_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_FiniteTimeAction_class->resolve = JS_ResolveStub; - jsb_cocos2d_FiniteTimeAction_class->convert = JS_ConvertStub; - jsb_cocos2d_FiniteTimeAction_class->finalize = js_cocos2d_FiniteTimeAction_finalize; - jsb_cocos2d_FiniteTimeAction_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("setDuration", js_cocos2dx_FiniteTimeAction_setDuration, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDuration", js_cocos2dx_FiniteTimeAction_getDuration, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_FiniteTimeAction_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Action_prototype), - jsb_cocos2d_FiniteTimeAction_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, "FiniteTimeAction", 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_FiniteTimeAction_class; - p->proto = jsb_cocos2d_FiniteTimeAction_prototype; - p->parentProto = jsb_cocos2d_Action_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Speed_class; -JSObject *jsb_cocos2d_Speed_prototype; - -bool js_cocos2dx_Speed_setInnerAction(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_setInnerAction : Invalid Native Object"); - if (argc == 1) { - cocos2d::ActionInterval* 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::ActionInterval*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Speed_setInnerAction : Error processing arguments"); - cobj->setInnerAction(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Speed_setInnerAction : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Speed_getSpeed(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_getSpeed : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getSpeed(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Speed_getSpeed : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Speed_setSpeed(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_setSpeed : 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_Speed_setSpeed : Error processing arguments"); - cobj->setSpeed(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Speed_setSpeed : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Speed_initWithAction(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_initWithAction : Invalid Native Object"); - if (argc == 2) { - cocos2d::ActionInterval* arg0; - double arg1; - 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::ActionInterval*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Speed_initWithAction : Error processing arguments"); - bool ret = cobj->initWithAction(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Speed_initWithAction : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_Speed_getInnerAction(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_getInnerAction : Invalid Native Object"); - if (argc == 0) { - cocos2d::ActionInterval* ret = cobj->getInnerAction(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ActionInterval*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Speed_getInnerAction : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Speed_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 2) { - cocos2d::ActionInterval* arg0; - double arg1; - 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::ActionInterval*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Speed_create : Error processing arguments"); - cocos2d::Speed* ret = cocos2d::Speed::create(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Speed*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Speed_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Speed_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Speed* cobj = new (std::nothrow) cocos2d::Speed(); - 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::Speed"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Action_prototype; - -void js_cocos2d_Speed_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Speed)", obj); -} - -void js_register_cocos2dx_Speed(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Speed_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Speed_class->name = "Speed"; - jsb_cocos2d_Speed_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Speed_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Speed_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Speed_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Speed_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Speed_class->resolve = JS_ResolveStub; - jsb_cocos2d_Speed_class->convert = JS_ConvertStub; - jsb_cocos2d_Speed_class->finalize = js_cocos2d_Speed_finalize; - jsb_cocos2d_Speed_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("setInnerAction", js_cocos2dx_Speed_setInnerAction, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("_getSpeed", js_cocos2dx_Speed_getSpeed, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("_setSpeed", js_cocos2dx_Speed_setSpeed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithAction", js_cocos2dx_Speed_initWithAction, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getInnerAction", js_cocos2dx_Speed_getInnerAction, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_Speed_create, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_Speed_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Action_prototype), - jsb_cocos2d_Speed_class, - js_cocos2dx_Speed_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, "Speed", 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_Speed_class; - p->proto = jsb_cocos2d_Speed_prototype; - p->parentProto = jsb_cocos2d_Action_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Follow_class; -JSObject *jsb_cocos2d_Follow_prototype; - -bool js_cocos2dx_Follow_setBoundarySet(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::Follow* cobj = (cocos2d::Follow *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Follow_setBoundarySet : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_setBoundarySet : Error processing arguments"); - cobj->setBoundarySet(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Follow_setBoundarySet : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Follow_initWithTarget(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::Follow* cobj = (cocos2d::Follow *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Follow_initWithTarget : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_initWithTarget : Error processing arguments"); - bool ret = cobj->initWithTarget(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - if (argc == 2) { - cocos2d::Node* arg0; - cocos2d::Rect arg1; - 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_initWithTarget : Error processing arguments"); - bool ret = cobj->initWithTarget(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Follow_initWithTarget : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Follow_isBoundarySet(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::Follow* cobj = (cocos2d::Follow *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Follow_isBoundarySet : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isBoundarySet(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Follow_isBoundarySet : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Follow_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_create : Error processing arguments"); - cocos2d::Follow* ret = cocos2d::Follow::create(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Follow*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - if (argc == 2) { - cocos2d::Node* arg0; - cocos2d::Rect arg1; - 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_create : Error processing arguments"); - cocos2d::Follow* ret = cocos2d::Follow::create(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Follow*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Follow_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Follow_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Follow* cobj = new (std::nothrow) cocos2d::Follow(); - 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::Follow"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Action_prototype; - -void js_cocos2d_Follow_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Follow)", obj); -} - -void js_register_cocos2dx_Follow(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Follow_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Follow_class->name = "Follow"; - jsb_cocos2d_Follow_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Follow_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Follow_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Follow_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Follow_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Follow_class->resolve = JS_ResolveStub; - jsb_cocos2d_Follow_class->convert = JS_ConvertStub; - jsb_cocos2d_Follow_class->finalize = js_cocos2d_Follow_finalize; - jsb_cocos2d_Follow_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("setBoundarySet", js_cocos2dx_Follow_setBoundarySet, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTarget", js_cocos2dx_Follow_initWithTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isBoundarySet", js_cocos2dx_Follow_isBoundarySet, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_Follow_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_Follow_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Action_prototype), - jsb_cocos2d_Follow_class, - js_cocos2dx_Follow_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, "Follow", 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_Follow_class; - p->proto = jsb_cocos2d_Follow_prototype; - p->parentProto = jsb_cocos2d_Action_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - JSClass *jsb_cocos2d_Texture2D_class; JSObject *jsb_cocos2d_Texture2D_prototype; @@ -3425,31 +2462,6 @@ bool js_cocos2dx_Node_convertTouchToNodeSpace(JSContext *cx, uint32_t argc, jsva JS_ReportError(cx, "js_cocos2dx_Node_convertTouchToNodeSpace : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_Node_getMaterial(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::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getMaterial : Invalid Native Object"); - if (argc == 0) { - cocos2d::Material* ret = cobj->getMaterial(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Material*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Node_getMaterial : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} bool js_cocos2dx_Node_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -3554,33 +2566,6 @@ bool js_cocos2dx_Node_isCascadeOpacityEnabled(JSContext *cx, uint32_t argc, jsva JS_ReportError(cx, "js_cocos2dx_Node_isCascadeOpacityEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Node_setMaterial(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::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setMaterial : Invalid Native Object"); - if (argc == 1) { - cocos2d::Material* 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::Material*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setMaterial : Error processing arguments"); - cobj->setMaterial(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Node_setMaterial : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} bool js_cocos2dx_Node_setParent(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -5902,13 +4887,11 @@ void js_register_cocos2dx_Node(JSContext *cx, JS::HandleObject global) { JS_FN("setNormalizedPosition", js_cocos2dx_Node_setNormalizedPosition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setonExitTransitionDidStartCallback", js_cocos2dx_Node_setonExitTransitionDidStartCallback, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("convertTouchToNodeSpace", js_cocos2dx_Node_convertTouchToNodeSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMaterial", js_cocos2dx_Node_getMaterial, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeAllChildren", js_cocos2dx_Node_removeAllChildrenWithCleanup, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getRotationX", js_cocos2dx_Node_getRotationSkewX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getRotationY", js_cocos2dx_Node_getRotationSkewY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getNodeToWorldTransform3D", js_cocos2dx_Node_getNodeToWorldTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isCascadeOpacityEnabled", js_cocos2dx_Node_isCascadeOpacityEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMaterial", js_cocos2dx_Node_setMaterial, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setParent", js_cocos2dx_Node_setParent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getName", js_cocos2dx_Node_getName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getRotation3D", js_cocos2dx_Node_getRotation3D, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -6149,6 +5132,3700 @@ void js_register_cocos2dx___NodeRGBA(JSContext *cx, JS::HandleObject global) { } } +JSClass *jsb_cocos2d_Scene_class; +JSObject *jsb_cocos2d_Scene_prototype; + +bool js_cocos2dx_Scene_setCameraOrderDirty(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_setCameraOrderDirty : Invalid Native Object"); + if (argc == 0) { + cobj->setCameraOrderDirty(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scene_setCameraOrderDirty : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Scene_render(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_render : Invalid Native Object"); + if (argc == 1) { + cocos2d::Renderer* 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::Renderer*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_render : Error processing arguments"); + cobj->render(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scene_render : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Scene_onProjectionChanged(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_onProjectionChanged : Invalid Native Object"); + if (argc == 1) { + cocos2d::EventCustom* 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::EventCustom*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_onProjectionChanged : Error processing arguments"); + cobj->onProjectionChanged(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scene_onProjectionChanged : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Scene_initWithSize(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_initWithSize : Invalid Native Object"); + if (argc == 1) { + cocos2d::Size arg0; + ok &= jsval_to_ccsize(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_initWithSize : Error processing arguments"); + bool ret = cobj->initWithSize(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scene_initWithSize : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Scene_getDefaultCamera(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_getDefaultCamera : Invalid Native Object"); + if (argc == 0) { + cocos2d::Camera* ret = cobj->getDefaultCamera(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)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_getDefaultCamera : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Scene_createWithSize(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + cocos2d::Size arg0; + ok &= jsval_to_ccsize(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_createWithSize : Error processing arguments"); + cocos2d::Scene* ret = cocos2d::Scene::createWithSize(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Scene*)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_createWithSize : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Scene_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::Scene* ret = cocos2d::Scene::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Scene*)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_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Scene_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Scene* cobj = new (std::nothrow) cocos2d::Scene(); + 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::Scene"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_Scene_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Scene)", obj); +} + +static bool js_cocos2d_Scene_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::Scene *nobj = new (std::nothrow) cocos2d::Scene(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Scene"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_Scene(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Scene_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Scene_class->name = "Scene"; + jsb_cocos2d_Scene_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Scene_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Scene_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Scene_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Scene_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Scene_class->resolve = JS_ResolveStub; + jsb_cocos2d_Scene_class->convert = JS_ConvertStub; + jsb_cocos2d_Scene_class->finalize = js_cocos2d_Scene_finalize; + jsb_cocos2d_Scene_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("setCameraOrderDirty", js_cocos2dx_Scene_setCameraOrderDirty, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("render", js_cocos2dx_Scene_render, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("onProjectionChanged", js_cocos2dx_Scene_onProjectionChanged, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithSize", js_cocos2dx_Scene_initWithSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDefaultCamera", js_cocos2dx_Scene_getDefaultCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_Scene_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("createWithSize", js_cocos2dx_Scene_createWithSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_Scene_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Scene_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_Scene_class, + js_cocos2dx_Scene_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, "Scene", 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_Scene_class; + p->proto = jsb_cocos2d_Scene_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_GLView_class; +JSObject *jsb_cocos2d_GLView_prototype; + +bool js_cocos2dx_GLView_setFrameSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setFrameSize : 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_GLView_setFrameSize : Error processing arguments"); + cobj->setFrameSize(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_setFrameSize : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_GLView_getViewPortRect(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getViewPortRect : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Rect& ret = cobj->getViewPortRect(); + jsval jsret = JSVAL_NULL; + jsret = ccrect_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getViewPortRect : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_setContentScaleFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setContentScaleFactor : 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_GLView_setContentScaleFactor : Error processing arguments"); + bool ret = cobj->setContentScaleFactor(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_setContentScaleFactor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_GLView_getContentScaleFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getContentScaleFactor : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getContentScaleFactor(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getContentScaleFactor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_setIMEKeyboardState(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setIMEKeyboardState : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_GLView_setIMEKeyboardState : Error processing arguments"); + cobj->setIMEKeyboardState(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_setIMEKeyboardState : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_GLView_setScissorInPoints(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setScissorInPoints : 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_GLView_setScissorInPoints : Error processing arguments"); + cobj->setScissorInPoints(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_setScissorInPoints : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_GLView_getViewName(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getViewName : Invalid Native Object"); + if (argc == 0) { + const std::string& ret = cobj->getViewName(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getViewName : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_isOpenGLReady(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_isOpenGLReady : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isOpenGLReady(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_isOpenGLReady : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_setCursorVisible(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setCursorVisible : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_GLView_setCursorVisible : Error processing arguments"); + cobj->setCursorVisible(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_setCursorVisible : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_GLView_getScaleY(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getScaleY : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getScaleY(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getScaleY : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_getScaleX(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getScaleX : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getScaleX(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getScaleX : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_getVisibleOrigin(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getVisibleOrigin : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec2 ret = cobj->getVisibleOrigin(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getVisibleOrigin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_getFrameSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getFrameSize : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Size& ret = cobj->getFrameSize(); + jsval jsret = JSVAL_NULL; + jsret = ccsize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getFrameSize : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_setFrameZoomFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setFrameZoomFactor : 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_GLView_setFrameZoomFactor : Error processing arguments"); + cobj->setFrameZoomFactor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_setFrameZoomFactor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_GLView_getFrameZoomFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getFrameZoomFactor : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getFrameZoomFactor(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getFrameZoomFactor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_getDesignResolutionSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getDesignResolutionSize : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Size& ret = cobj->getDesignResolutionSize(); + jsval jsret = JSVAL_NULL; + jsret = ccsize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getDesignResolutionSize : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_windowShouldClose(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_windowShouldClose : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->windowShouldClose(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_windowShouldClose : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_setDesignResolutionSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setDesignResolutionSize : Invalid Native Object"); + if (argc == 3) { + double arg0; + double arg1; + ResolutionPolicy arg2; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_GLView_setDesignResolutionSize : Error processing arguments"); + cobj->setDesignResolutionSize(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_setDesignResolutionSize : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_GLView_getResolutionPolicy(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getResolutionPolicy : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getResolutionPolicy(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getResolutionPolicy : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_isRetinaDisplay(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_isRetinaDisplay : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isRetinaDisplay(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_isRetinaDisplay : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_setViewPortInPoints(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setViewPortInPoints : 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_GLView_setViewPortInPoints : Error processing arguments"); + cobj->setViewPortInPoints(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_setViewPortInPoints : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_GLView_getScissorRect(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getScissorRect : Invalid Native Object"); + if (argc == 0) { + cocos2d::Rect ret = cobj->getScissorRect(); + jsval jsret = JSVAL_NULL; + jsret = ccrect_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getScissorRect : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_getRetinaFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getRetinaFactor : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getRetinaFactor(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getRetinaFactor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_setViewName(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setViewName : 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_GLView_setViewName : Error processing arguments"); + cobj->setViewName(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_setViewName : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_GLView_getVisibleRect(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getVisibleRect : Invalid Native Object"); + if (argc == 0) { + cocos2d::Rect ret = cobj->getVisibleRect(); + jsval jsret = JSVAL_NULL; + jsret = ccrect_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getVisibleRect : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_getVisibleSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getVisibleSize : Invalid Native Object"); + if (argc == 0) { + cocos2d::Size ret = cobj->getVisibleSize(); + jsval jsret = JSVAL_NULL; + jsret = ccsize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_getVisibleSize : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_isScissorEnabled(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_isScissorEnabled : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isScissorEnabled(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_isScissorEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_pollEvents(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_pollEvents : Invalid Native Object"); + if (argc == 0) { + cobj->pollEvents(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_GLView_pollEvents : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_GLView_setGLContextAttrs(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + GLContextAttrs arg0; + #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_GLView_setGLContextAttrs : Error processing arguments"); + cocos2d::GLView::setGLContextAttrs(arg0); + args.rval().setUndefined(); + return true; + } + JS_ReportError(cx, "js_cocos2dx_GLView_setGLContextAttrs : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_GLView_getGLContextAttrs(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + GLContextAttrs ret = cocos2d::GLView::getGLContextAttrs(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR GLContextAttrs; + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_GLView_getGLContextAttrs : wrong number of arguments"); + return false; +} + + + +void js_cocos2d_GLView_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (GLView)", obj); +} + +void js_register_cocos2dx_GLView(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_GLView_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_GLView_class->name = "GLView"; + jsb_cocos2d_GLView_class->addProperty = JS_PropertyStub; + jsb_cocos2d_GLView_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_GLView_class->getProperty = JS_PropertyStub; + jsb_cocos2d_GLView_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_GLView_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_GLView_class->resolve = JS_ResolveStub; + jsb_cocos2d_GLView_class->convert = JS_ConvertStub; + jsb_cocos2d_GLView_class->finalize = js_cocos2d_GLView_finalize; + jsb_cocos2d_GLView_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("setFrameSize", js_cocos2dx_GLView_setFrameSize, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getViewPortRect", js_cocos2dx_GLView_getViewPortRect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setContentScaleFactor", js_cocos2dx_GLView_setContentScaleFactor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getContentScaleFactor", js_cocos2dx_GLView_getContentScaleFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setIMEKeyboardState", js_cocos2dx_GLView_setIMEKeyboardState, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setScissorInPoints", js_cocos2dx_GLView_setScissorInPoints, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getViewName", js_cocos2dx_GLView_getViewName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isOpenGLReady", js_cocos2dx_GLView_isOpenGLReady, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCursorVisible", js_cocos2dx_GLView_setCursorVisible, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getScaleY", js_cocos2dx_GLView_getScaleY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getScaleX", js_cocos2dx_GLView_getScaleX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVisibleOrigin", js_cocos2dx_GLView_getVisibleOrigin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFrameSize", js_cocos2dx_GLView_getFrameSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFrameZoomFactor", js_cocos2dx_GLView_setFrameZoomFactor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFrameZoomFactor", js_cocos2dx_GLView_getFrameZoomFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDesignResolutionSize", js_cocos2dx_GLView_getDesignResolutionSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("windowShouldClose", js_cocos2dx_GLView_windowShouldClose, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDesignResolutionSize", js_cocos2dx_GLView_setDesignResolutionSize, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getResolutionPolicy", js_cocos2dx_GLView_getResolutionPolicy, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isRetinaDisplay", js_cocos2dx_GLView_isRetinaDisplay, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setViewPortInPoints", js_cocos2dx_GLView_setViewPortInPoints, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getScissorRect", js_cocos2dx_GLView_getScissorRect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRetinaFactor", js_cocos2dx_GLView_getRetinaFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setViewName", js_cocos2dx_GLView_setViewName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVisibleRect", js_cocos2dx_GLView_getVisibleRect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVisibleSize", js_cocos2dx_GLView_getVisibleSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isScissorEnabled", js_cocos2dx_GLView_isScissorEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("pollEvents", js_cocos2dx_GLView_pollEvents, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("setGLContextAttrs", js_cocos2dx_GLView_setGLContextAttrs, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getGLContextAttrs", js_cocos2dx_GLView_getGLContextAttrs, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_GLView_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_GLView_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, "GLView", 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_GLView_class; + p->proto = jsb_cocos2d_GLView_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Director_class; +JSObject *jsb_cocos2d_Director_prototype; + +bool js_cocos2dx_Director_pause(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_pause : Invalid Native Object"); + if (argc == 0) { + cobj->pause(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_pause : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setEventDispatcher(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setEventDispatcher : Invalid Native Object"); + if (argc == 1) { + cocos2d::EventDispatcher* 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::EventDispatcher*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setEventDispatcher : Error processing arguments"); + cobj->setEventDispatcher(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setEventDispatcher : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_setContentScaleFactor(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setContentScaleFactor : 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_Director_setContentScaleFactor : Error processing arguments"); + cobj->setContentScaleFactor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setContentScaleFactor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_getContentScaleFactor(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getContentScaleFactor : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getContentScaleFactor(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getContentScaleFactor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getWinSizeInPixels(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getWinSizeInPixels : Invalid Native Object"); + if (argc == 0) { + cocos2d::Size ret = cobj->getWinSizeInPixels(); + jsval jsret = JSVAL_NULL; + jsret = ccsize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getWinSizeInPixels : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getDeltaTime(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getDeltaTime : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getDeltaTime(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getDeltaTime : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setGLDefaultValues(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setGLDefaultValues : Invalid Native Object"); + if (argc == 0) { + cobj->setGLDefaultValues(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setGLDefaultValues : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setActionManager(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setActionManager : Invalid Native Object"); + if (argc == 1) { + cocos2d::ActionManager* 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::ActionManager*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setActionManager : Error processing arguments"); + cobj->setActionManager(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setActionManager : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_setAlphaBlending(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setAlphaBlending : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setAlphaBlending : Error processing arguments"); + cobj->setAlphaBlending(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setAlphaBlending : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_popToRootScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_popToRootScene : Invalid Native Object"); + if (argc == 0) { + cobj->popToRootScene(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_popToRootScene : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_loadMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_loadMatrix : Invalid Native Object"); + if (argc == 2) { + cocos2d::MATRIX_STACK_TYPE arg0; + cocos2d::Mat4 arg1; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_loadMatrix : Error processing arguments"); + cobj->loadMatrix(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_loadMatrix : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_Director_getNotificationNode(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getNotificationNode : Invalid Native Object"); + if (argc == 0) { + cocos2d::Node* ret = cobj->getNotificationNode(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getNotificationNode : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getWinSize(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getWinSize : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Size& ret = cobj->getWinSize(); + jsval jsret = JSVAL_NULL; + jsret = ccsize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getWinSize : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_end(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_end : Invalid Native Object"); + if (argc == 0) { + cobj->end(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_end : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getTextureCache(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getTextureCache : Invalid Native Object"); + if (argc == 0) { + cocos2d::TextureCache* ret = cobj->getTextureCache(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TextureCache*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getTextureCache : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_isSendCleanupToScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_isSendCleanupToScene : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isSendCleanupToScene(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_isSendCleanupToScene : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getVisibleOrigin(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getVisibleOrigin : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec2 ret = cobj->getVisibleOrigin(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getVisibleOrigin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_mainLoop(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_mainLoop : Invalid Native Object"); + if (argc == 0) { + cobj->mainLoop(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_mainLoop : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setDepthTest(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setDepthTest : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setDepthTest : Error processing arguments"); + cobj->setDepthTest(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setDepthTest : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_getFrameRate(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getFrameRate : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getFrameRate(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getFrameRate : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getSecondsPerFrame(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getSecondsPerFrame : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSecondsPerFrame(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getSecondsPerFrame : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_resetMatrixStack(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_resetMatrixStack : Invalid Native Object"); + if (argc == 0) { + cobj->resetMatrixStack(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_resetMatrixStack : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_convertToUI(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_convertToUI : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_convertToUI : Error processing arguments"); + cocos2d::Vec2 ret = cobj->convertToUI(arg0); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_convertToUI : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_pushMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_pushMatrix : Invalid Native Object"); + if (argc == 1) { + cocos2d::MATRIX_STACK_TYPE arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_pushMatrix : Error processing arguments"); + cobj->pushMatrix(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_pushMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_setDefaultValues(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setDefaultValues : Invalid Native Object"); + if (argc == 0) { + cobj->setDefaultValues(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setDefaultValues : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_init(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setScheduler(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setScheduler : Invalid Native Object"); + if (argc == 1) { + cocos2d::Scheduler* 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::Scheduler*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setScheduler : Error processing arguments"); + cobj->setScheduler(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setScheduler : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_getMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getMatrix : Invalid Native Object"); + if (argc == 1) { + cocos2d::MATRIX_STACK_TYPE arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_getMatrix : Error processing arguments"); + const cocos2d::Mat4& ret = cobj->getMatrix(arg0); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_startAnimation(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_startAnimation : Invalid Native Object"); + if (argc == 0) { + cobj->startAnimation(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_startAnimation : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getOpenGLView(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getOpenGLView : Invalid Native Object"); + if (argc == 0) { + cocos2d::GLView* ret = cobj->getOpenGLView(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::GLView*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getOpenGLView : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getRunningScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getRunningScene : Invalid Native Object"); + if (argc == 0) { + cocos2d::Scene* ret = cobj->getRunningScene(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Scene*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getRunningScene : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setViewport(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setViewport : Invalid Native Object"); + if (argc == 0) { + cobj->setViewport(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setViewport : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_stopAnimation(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_stopAnimation : Invalid Native Object"); + if (argc == 0) { + cobj->stopAnimation(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_stopAnimation : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_popToSceneStackLevel(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_popToSceneStackLevel : 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_Director_popToSceneStackLevel : Error processing arguments"); + cobj->popToSceneStackLevel(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_popToSceneStackLevel : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_resume(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_resume : Invalid Native Object"); + if (argc == 0) { + cobj->resume(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_resume : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_isNextDeltaTimeZero(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_isNextDeltaTimeZero : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isNextDeltaTimeZero(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_isNextDeltaTimeZero : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setClearColor(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setClearColor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color4F arg0; + ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setClearColor : Error processing arguments"); + cobj->setClearColor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setClearColor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_setOpenGLView(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setOpenGLView : Invalid Native Object"); + if (argc == 1) { + cocos2d::GLView* 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::GLView*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setOpenGLView : Error processing arguments"); + cobj->setOpenGLView(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setOpenGLView : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_convertToGL(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_convertToGL : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_convertToGL : Error processing arguments"); + cocos2d::Vec2 ret = cobj->convertToGL(arg0); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_convertToGL : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_purgeCachedData(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_purgeCachedData : Invalid Native Object"); + if (argc == 0) { + cobj->purgeCachedData(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_purgeCachedData : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getTotalFrames(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getTotalFrames : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getTotalFrames(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getTotalFrames : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_runWithScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_runWithScene : 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_Director_runWithScene : Error processing arguments"); + cobj->runWithScene(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_runWithScene : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_setNotificationNode(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setNotificationNode : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setNotificationNode : Error processing arguments"); + cobj->setNotificationNode(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setNotificationNode : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_drawScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_drawScene : Invalid Native Object"); + if (argc == 0) { + cobj->drawScene(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_drawScene : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_restart(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_restart : Invalid Native Object"); + if (argc == 0) { + cobj->restart(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_restart : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_popScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_popScene : Invalid Native Object"); + if (argc == 0) { + cobj->popScene(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_popScene : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_loadIdentityMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_loadIdentityMatrix : Invalid Native Object"); + if (argc == 1) { + cocos2d::MATRIX_STACK_TYPE arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_loadIdentityMatrix : Error processing arguments"); + cobj->loadIdentityMatrix(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_loadIdentityMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_isDisplayStats(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_isDisplayStats : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isDisplayStats(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_isDisplayStats : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setProjection(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setProjection : Invalid Native Object"); + if (argc == 1) { + cocos2d::Director::Projection arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setProjection : Error processing arguments"); + cobj->setProjection(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setProjection : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_multiplyMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_multiplyMatrix : Invalid Native Object"); + if (argc == 2) { + cocos2d::MATRIX_STACK_TYPE arg0; + cocos2d::Mat4 arg1; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_multiplyMatrix : Error processing arguments"); + cobj->multiplyMatrix(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_multiplyMatrix : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_Director_getZEye(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getZEye : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getZEye(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getZEye : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setNextDeltaTimeZero(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setNextDeltaTimeZero : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setNextDeltaTimeZero : Error processing arguments"); + cobj->setNextDeltaTimeZero(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setNextDeltaTimeZero : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_popMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_popMatrix : Invalid Native Object"); + if (argc == 1) { + cocos2d::MATRIX_STACK_TYPE arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_popMatrix : Error processing arguments"); + cobj->popMatrix(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_popMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_getVisibleSize(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getVisibleSize : Invalid Native Object"); + if (argc == 0) { + cocos2d::Size ret = cobj->getVisibleSize(); + jsval jsret = JSVAL_NULL; + jsret = ccsize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getVisibleSize : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getScheduler(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getScheduler : Invalid Native Object"); + if (argc == 0) { + cocos2d::Scheduler* ret = cobj->getScheduler(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Scheduler*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getScheduler : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_pushScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_pushScene : 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_Director_pushScene : Error processing arguments"); + cobj->pushScene(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_pushScene : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_getAnimationInterval(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getAnimationInterval : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getAnimationInterval(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getAnimationInterval : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_isPaused(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_isPaused : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isPaused(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_isPaused : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_setDisplayStats(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setDisplayStats : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setDisplayStats : Error processing arguments"); + cobj->setDisplayStats(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setDisplayStats : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_getEventDispatcher(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getEventDispatcher : Invalid Native Object"); + if (argc == 0) { + cocos2d::EventDispatcher* ret = cobj->getEventDispatcher(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::EventDispatcher*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getEventDispatcher : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_replaceScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_replaceScene : 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_Director_replaceScene : Error processing arguments"); + cobj->replaceScene(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_replaceScene : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_setAnimationInterval(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setAnimationInterval : 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_Director_setAnimationInterval : Error processing arguments"); + cobj->setAnimationInterval(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_setAnimationInterval : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Director_getActionManager(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getActionManager : Invalid Native Object"); + if (argc == 0) { + cocos2d::ActionManager* ret = cobj->getActionManager(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ActionManager*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Director_getActionManager : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Director_getInstance(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::Director* ret = cocos2d::Director::getInstance(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Director*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Director_getInstance : wrong number of arguments"); + return false; +} + + + +void js_cocos2d_Director_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Director)", obj); +} + +void js_register_cocos2dx_Director(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Director_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Director_class->name = "Director"; + jsb_cocos2d_Director_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Director_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Director_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Director_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Director_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Director_class->resolve = JS_ResolveStub; + jsb_cocos2d_Director_class->convert = JS_ConvertStub; + jsb_cocos2d_Director_class->finalize = js_cocos2d_Director_finalize; + jsb_cocos2d_Director_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("pause", js_cocos2dx_Director_pause, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEventDispatcher", js_cocos2dx_Director_setEventDispatcher, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setContentScaleFactor", js_cocos2dx_Director_setContentScaleFactor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getContentScaleFactor", js_cocos2dx_Director_getContentScaleFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getWinSizeInPixels", js_cocos2dx_Director_getWinSizeInPixels, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDeltaTime", js_cocos2dx_Director_getDeltaTime, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setGLDefaultValues", js_cocos2dx_Director_setGLDefaultValues, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setActionManager", js_cocos2dx_Director_setActionManager, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAlphaBlending", js_cocos2dx_Director_setAlphaBlending, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("popToRootScene", js_cocos2dx_Director_popToRootScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadMatrix", js_cocos2dx_Director_loadMatrix, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getNotificationNode", js_cocos2dx_Director_getNotificationNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getWinSize", js_cocos2dx_Director_getWinSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("end", js_cocos2dx_Director_end, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTextureCache", js_cocos2dx_Director_getTextureCache, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isSendCleanupToScene", js_cocos2dx_Director_isSendCleanupToScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVisibleOrigin", js_cocos2dx_Director_getVisibleOrigin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("mainLoop", js_cocos2dx_Director_mainLoop, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDepthTest", js_cocos2dx_Director_setDepthTest, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFrameRate", js_cocos2dx_Director_getFrameRate, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSecondsPerFrame", js_cocos2dx_Director_getSecondsPerFrame, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("resetMatrixStack", js_cocos2dx_Director_resetMatrixStack, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("convertToUI", js_cocos2dx_Director_convertToUI, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("pushMatrix", js_cocos2dx_Director_pushMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDefaultValues", js_cocos2dx_Director_setDefaultValues, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("init", js_cocos2dx_Director_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setScheduler", js_cocos2dx_Director_setScheduler, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMatrix", js_cocos2dx_Director_getMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("startAnimation", js_cocos2dx_Director_startAnimation, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getOpenGLView", js_cocos2dx_Director_getOpenGLView, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRunningScene", js_cocos2dx_Director_getRunningScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setViewport", js_cocos2dx_Director_setViewport, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("stopAnimation", js_cocos2dx_Director_stopAnimation, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("popToSceneStackLevel", js_cocos2dx_Director_popToSceneStackLevel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("resume", js_cocos2dx_Director_resume, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isNextDeltaTimeZero", js_cocos2dx_Director_isNextDeltaTimeZero, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setClearColor", js_cocos2dx_Director_setClearColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setOpenGLView", js_cocos2dx_Director_setOpenGLView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("convertToGL", js_cocos2dx_Director_convertToGL, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("purgeCachedData", js_cocos2dx_Director_purgeCachedData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTotalFrames", js_cocos2dx_Director_getTotalFrames, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("runWithScene", js_cocos2dx_Director_runWithScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setNotificationNode", js_cocos2dx_Director_setNotificationNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("drawScene", js_cocos2dx_Director_drawScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("restart", js_cocos2dx_Director_restart, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("popScene", js_cocos2dx_Director_popScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadIdentityMatrix", js_cocos2dx_Director_loadIdentityMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isDisplayStats", js_cocos2dx_Director_isDisplayStats, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setProjection", js_cocos2dx_Director_setProjection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("multiplyMatrix", js_cocos2dx_Director_multiplyMatrix, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getZEye", js_cocos2dx_Director_getZEye, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setNextDeltaTimeZero", js_cocos2dx_Director_setNextDeltaTimeZero, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("popMatrix", js_cocos2dx_Director_popMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVisibleSize", js_cocos2dx_Director_getVisibleSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getScheduler", js_cocos2dx_Director_getScheduler, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("pushScene", js_cocos2dx_Director_pushScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAnimationInterval", js_cocos2dx_Director_getAnimationInterval, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isPaused", js_cocos2dx_Director_isPaused, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDisplayStats", js_cocos2dx_Director_setDisplayStats, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEventDispatcher", js_cocos2dx_Director_getEventDispatcher, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("replaceScene", js_cocos2dx_Director_replaceScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAnimationInterval", js_cocos2dx_Director_setAnimationInterval, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getActionManager", js_cocos2dx_Director_getActionManager, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("getInstance", js_cocos2dx_Director_getInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Director_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Director_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, "Director", 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_Director_class; + p->proto = jsb_cocos2d_Director_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Scheduler_class; +JSObject *jsb_cocos2d_Scheduler_prototype; + +bool js_cocos2dx_Scheduler_setTimeScale(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_setTimeScale : 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_Scheduler_setTimeScale : Error processing arguments"); + cobj->setTimeScale(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scheduler_setTimeScale : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Scheduler_unscheduleAllWithMinPriority(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_unscheduleAllWithMinPriority : 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_Scheduler_unscheduleAllWithMinPriority : Error processing arguments"); + cobj->unscheduleAllWithMinPriority(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scheduler_unscheduleAllWithMinPriority : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Scheduler_update(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_update : 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_Scheduler_update : Error processing arguments"); + cobj->update(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scheduler_update : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Scheduler_unscheduleScriptEntry(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_unscheduleScriptEntry : 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_Scheduler_unscheduleScriptEntry : Error processing arguments"); + cobj->unscheduleScriptEntry(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scheduler_unscheduleScriptEntry : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Scheduler_performFunctionInCocosThread(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_performFunctionInCocosThread : Invalid Native Object"); + if (argc == 1) { + std::function arg0; + do { + if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(0))); + auto lambda = [=]() -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + JS::RootedValue rval(cx); + bool ok = func->invoke(0, nullptr, &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg0 = lambda; + } + else + { + arg0 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scheduler_performFunctionInCocosThread : Error processing arguments"); + cobj->performFunctionInCocosThread(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scheduler_performFunctionInCocosThread : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Scheduler_unscheduleAll(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_unscheduleAll : Invalid Native Object"); + if (argc == 0) { + cobj->unscheduleAll(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scheduler_unscheduleAll : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Scheduler_getTimeScale(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_getTimeScale : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getTimeScale(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scheduler_getTimeScale : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Scheduler_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Scheduler* cobj = new (std::nothrow) cocos2d::Scheduler(); + 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::Scheduler"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + + +void js_cocos2d_Scheduler_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Scheduler)", obj); +} + +void js_register_cocos2dx_Scheduler(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Scheduler_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Scheduler_class->name = "Scheduler"; + jsb_cocos2d_Scheduler_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Scheduler_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Scheduler_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Scheduler_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Scheduler_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Scheduler_class->resolve = JS_ResolveStub; + jsb_cocos2d_Scheduler_class->convert = JS_ConvertStub; + jsb_cocos2d_Scheduler_class->finalize = js_cocos2d_Scheduler_finalize; + jsb_cocos2d_Scheduler_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("setTimeScale", js_cocos2dx_Scheduler_setTimeScale, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("unscheduleAllWithMinPriority", js_cocos2dx_Scheduler_unscheduleAllWithMinPriority, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("update", js_cocos2dx_Scheduler_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("unscheduleScriptEntry", js_cocos2dx_Scheduler_unscheduleScriptEntry, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("performFunctionInCocosThread", js_cocos2dx_Scheduler_performFunctionInCocosThread, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("unscheduleAll", js_cocos2dx_Scheduler_unscheduleAll, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTimeScale", js_cocos2dx_Scheduler_getTimeScale, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_Scheduler_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Scheduler_class, + js_cocos2dx_Scheduler_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, "Scheduler", 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_Scheduler_class; + p->proto = jsb_cocos2d_Scheduler_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_AsyncTaskPool_class; +JSObject *jsb_cocos2d_AsyncTaskPool_prototype; + +bool js_cocos2dx_AsyncTaskPool_stopTasks(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::AsyncTaskPool* cobj = (cocos2d::AsyncTaskPool *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_AsyncTaskPool_stopTasks : Invalid Native Object"); + if (argc == 1) { + cocos2d::AsyncTaskPool::TaskType arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_AsyncTaskPool_stopTasks : Error processing arguments"); + cobj->stopTasks(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_AsyncTaskPool_stopTasks : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_AsyncTaskPool_destoryInstance(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::AsyncTaskPool::destoryInstance(); + args.rval().setUndefined(); + return true; + } + JS_ReportError(cx, "js_cocos2dx_AsyncTaskPool_destoryInstance : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_AsyncTaskPool_getInstance(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::AsyncTaskPool* ret = cocos2d::AsyncTaskPool::getInstance(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::AsyncTaskPool*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_AsyncTaskPool_getInstance : wrong number of arguments"); + return false; +} + + + +void js_cocos2d_AsyncTaskPool_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (AsyncTaskPool)", obj); +} + +void js_register_cocos2dx_AsyncTaskPool(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_AsyncTaskPool_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_AsyncTaskPool_class->name = "AsyncTaskPool"; + jsb_cocos2d_AsyncTaskPool_class->addProperty = JS_PropertyStub; + jsb_cocos2d_AsyncTaskPool_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_AsyncTaskPool_class->getProperty = JS_PropertyStub; + jsb_cocos2d_AsyncTaskPool_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_AsyncTaskPool_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_AsyncTaskPool_class->resolve = JS_ResolveStub; + jsb_cocos2d_AsyncTaskPool_class->convert = JS_ConvertStub; + jsb_cocos2d_AsyncTaskPool_class->finalize = js_cocos2d_AsyncTaskPool_finalize; + jsb_cocos2d_AsyncTaskPool_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("stopTasks", js_cocos2dx_AsyncTaskPool_stopTasks, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("destoryInstance", js_cocos2dx_AsyncTaskPool_destoryInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getInstance", js_cocos2dx_AsyncTaskPool_getInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_AsyncTaskPool_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_AsyncTaskPool_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, "AsyncTaskPool", 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_AsyncTaskPool_class; + p->proto = jsb_cocos2d_AsyncTaskPool_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Action_class; +JSObject *jsb_cocos2d_Action_prototype; + +bool js_cocos2dx_Action_startWithTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_startWithTarget : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Action_startWithTarget : Error processing arguments"); + cobj->startWithTarget(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_startWithTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Action_setOriginalTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_setOriginalTarget : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Action_setOriginalTarget : Error processing arguments"); + cobj->setOriginalTarget(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_setOriginalTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Action_clone(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_clone : Invalid Native Object"); + if (argc == 0) { + cocos2d::Action* ret = cobj->clone(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Action*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_clone : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Action_getOriginalTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_getOriginalTarget : Invalid Native Object"); + if (argc == 0) { + cocos2d::Node* ret = cobj->getOriginalTarget(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_getOriginalTarget : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Action_stop(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_stop : Invalid Native Object"); + if (argc == 0) { + cobj->stop(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_stop : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Action_update(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_update : 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_Action_update : Error processing arguments"); + cobj->update(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_update : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Action_getTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_getTarget : Invalid Native Object"); + if (argc == 0) { + cocos2d::Node* ret = cobj->getTarget(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_getTarget : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Action_step(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_step : 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_Action_step : Error processing arguments"); + cobj->step(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_step : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Action_setTag(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_setTag : 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_Action_setTag : Error processing arguments"); + cobj->setTag(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_setTag : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Action_getTag(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_getTag : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getTag(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_getTag : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Action_setTarget(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_setTarget : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Action_setTarget : Error processing arguments"); + cobj->setTarget(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_setTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Action_isDone(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_isDone : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isDone(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_isDone : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Action_reverse(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::Action* cobj = (cocos2d::Action *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Action_reverse : Invalid Native Object"); + if (argc == 0) { + cocos2d::Action* ret = cobj->reverse(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Action*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Action_reverse : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} + + +void js_cocos2d_Action_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Action)", obj); +} + +void js_register_cocos2dx_Action(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Action_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Action_class->name = "Action"; + jsb_cocos2d_Action_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Action_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Action_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Action_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Action_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Action_class->resolve = JS_ResolveStub; + jsb_cocos2d_Action_class->convert = JS_ConvertStub; + jsb_cocos2d_Action_class->finalize = js_cocos2d_Action_finalize; + jsb_cocos2d_Action_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("startWithTarget", js_cocos2dx_Action_startWithTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setOriginalTarget", js_cocos2dx_Action_setOriginalTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clone", js_cocos2dx_Action_clone, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getOriginalTarget", js_cocos2dx_Action_getOriginalTarget, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("stop", js_cocos2dx_Action_stop, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("update", js_cocos2dx_Action_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTarget", js_cocos2dx_Action_getTarget, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("step", js_cocos2dx_Action_step, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTag", js_cocos2dx_Action_setTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTag", js_cocos2dx_Action_getTag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTarget", js_cocos2dx_Action_setTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isDone", js_cocos2dx_Action_isDone, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("reverse", js_cocos2dx_Action_reverse, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_Action_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Action_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, "Action", 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_Action_class; + p->proto = jsb_cocos2d_Action_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_FiniteTimeAction_class; +JSObject *jsb_cocos2d_FiniteTimeAction_prototype; + +bool js_cocos2dx_FiniteTimeAction_setDuration(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::FiniteTimeAction* cobj = (cocos2d::FiniteTimeAction *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_FiniteTimeAction_setDuration : 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_FiniteTimeAction_setDuration : Error processing arguments"); + cobj->setDuration(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_FiniteTimeAction_setDuration : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_FiniteTimeAction_getDuration(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::FiniteTimeAction* cobj = (cocos2d::FiniteTimeAction *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_FiniteTimeAction_getDuration : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getDuration(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_FiniteTimeAction_getDuration : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} + +extern JSObject *jsb_cocos2d_Action_prototype; + +void js_cocos2d_FiniteTimeAction_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (FiniteTimeAction)", obj); +} + +void js_register_cocos2dx_FiniteTimeAction(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_FiniteTimeAction_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_FiniteTimeAction_class->name = "FiniteTimeAction"; + jsb_cocos2d_FiniteTimeAction_class->addProperty = JS_PropertyStub; + jsb_cocos2d_FiniteTimeAction_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_FiniteTimeAction_class->getProperty = JS_PropertyStub; + jsb_cocos2d_FiniteTimeAction_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_FiniteTimeAction_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_FiniteTimeAction_class->resolve = JS_ResolveStub; + jsb_cocos2d_FiniteTimeAction_class->convert = JS_ConvertStub; + jsb_cocos2d_FiniteTimeAction_class->finalize = js_cocos2d_FiniteTimeAction_finalize; + jsb_cocos2d_FiniteTimeAction_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("setDuration", js_cocos2dx_FiniteTimeAction_setDuration, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDuration", js_cocos2dx_FiniteTimeAction_getDuration, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_FiniteTimeAction_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Action_prototype), + jsb_cocos2d_FiniteTimeAction_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, "FiniteTimeAction", 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_FiniteTimeAction_class; + p->proto = jsb_cocos2d_FiniteTimeAction_prototype; + p->parentProto = jsb_cocos2d_Action_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Speed_class; +JSObject *jsb_cocos2d_Speed_prototype; + +bool js_cocos2dx_Speed_setInnerAction(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_setInnerAction : Invalid Native Object"); + if (argc == 1) { + cocos2d::ActionInterval* 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::ActionInterval*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Speed_setInnerAction : Error processing arguments"); + cobj->setInnerAction(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Speed_setInnerAction : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Speed_getSpeed(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_getSpeed : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSpeed(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Speed_getSpeed : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Speed_setSpeed(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_setSpeed : 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_Speed_setSpeed : Error processing arguments"); + cobj->setSpeed(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Speed_setSpeed : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Speed_initWithAction(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_initWithAction : Invalid Native Object"); + if (argc == 2) { + cocos2d::ActionInterval* arg0; + double arg1; + 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::ActionInterval*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Speed_initWithAction : Error processing arguments"); + bool ret = cobj->initWithAction(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Speed_initWithAction : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_Speed_getInnerAction(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::Speed* cobj = (cocos2d::Speed *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Speed_getInnerAction : Invalid Native Object"); + if (argc == 0) { + cocos2d::ActionInterval* ret = cobj->getInnerAction(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ActionInterval*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Speed_getInnerAction : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Speed_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 2) { + cocos2d::ActionInterval* arg0; + double arg1; + 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::ActionInterval*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Speed_create : Error processing arguments"); + cocos2d::Speed* ret = cocos2d::Speed::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Speed*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Speed_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Speed_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Speed* cobj = new (std::nothrow) cocos2d::Speed(); + 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::Speed"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Action_prototype; + +void js_cocos2d_Speed_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Speed)", obj); +} + +void js_register_cocos2dx_Speed(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Speed_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Speed_class->name = "Speed"; + jsb_cocos2d_Speed_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Speed_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Speed_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Speed_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Speed_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Speed_class->resolve = JS_ResolveStub; + jsb_cocos2d_Speed_class->convert = JS_ConvertStub; + jsb_cocos2d_Speed_class->finalize = js_cocos2d_Speed_finalize; + jsb_cocos2d_Speed_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("setInnerAction", js_cocos2dx_Speed_setInnerAction, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("_getSpeed", js_cocos2dx_Speed_getSpeed, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("_setSpeed", js_cocos2dx_Speed_setSpeed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithAction", js_cocos2dx_Speed_initWithAction, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getInnerAction", js_cocos2dx_Speed_getInnerAction, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_Speed_create, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Speed_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Action_prototype), + jsb_cocos2d_Speed_class, + js_cocos2dx_Speed_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, "Speed", 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_Speed_class; + p->proto = jsb_cocos2d_Speed_prototype; + p->parentProto = jsb_cocos2d_Action_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Follow_class; +JSObject *jsb_cocos2d_Follow_prototype; + +bool js_cocos2dx_Follow_setBoundarySet(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::Follow* cobj = (cocos2d::Follow *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Follow_setBoundarySet : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_setBoundarySet : Error processing arguments"); + cobj->setBoundarySet(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Follow_setBoundarySet : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Follow_initWithTarget(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::Follow* cobj = (cocos2d::Follow *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Follow_initWithTarget : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_initWithTarget : Error processing arguments"); + bool ret = cobj->initWithTarget(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + if (argc == 2) { + cocos2d::Node* arg0; + cocos2d::Rect arg1; + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_initWithTarget : Error processing arguments"); + bool ret = cobj->initWithTarget(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Follow_initWithTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Follow_isBoundarySet(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::Follow* cobj = (cocos2d::Follow *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Follow_isBoundarySet : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isBoundarySet(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Follow_isBoundarySet : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Follow_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_create : Error processing arguments"); + cocos2d::Follow* ret = cocos2d::Follow::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Follow*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + if (argc == 2) { + cocos2d::Node* arg0; + cocos2d::Rect arg1; + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Follow_create : Error processing arguments"); + cocos2d::Follow* ret = cocos2d::Follow::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Follow*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Follow_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Follow_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Follow* cobj = new (std::nothrow) cocos2d::Follow(); + 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::Follow"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Action_prototype; + +void js_cocos2d_Follow_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Follow)", obj); +} + +void js_register_cocos2dx_Follow(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Follow_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Follow_class->name = "Follow"; + jsb_cocos2d_Follow_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Follow_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Follow_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Follow_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Follow_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Follow_class->resolve = JS_ResolveStub; + jsb_cocos2d_Follow_class->convert = JS_ConvertStub; + jsb_cocos2d_Follow_class->finalize = js_cocos2d_Follow_finalize; + jsb_cocos2d_Follow_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("setBoundarySet", js_cocos2dx_Follow_setBoundarySet, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTarget", js_cocos2dx_Follow_initWithTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isBoundarySet", js_cocos2dx_Follow_isBoundarySet, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_Follow_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Follow_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Action_prototype), + jsb_cocos2d_Follow_class, + js_cocos2dx_Follow_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, "Follow", 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_Follow_class; + p->proto = jsb_cocos2d_Follow_prototype; + p->parentProto = jsb_cocos2d_Action_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_SpriteFrame_class; JSObject *jsb_cocos2d_SpriteFrame_prototype; @@ -12446,6 +15123,219 @@ void js_register_cocos2dx_TargetedAction(JSContext *cx, JS::HandleObject global) } } +JSClass *jsb_cocos2d_ActionFloat_class; +JSObject *jsb_cocos2d_ActionFloat_prototype; + +bool js_cocos2dx_ActionFloat_initWithDuration(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::ActionFloat* cobj = (cocos2d::ActionFloat *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionFloat_initWithDuration : Invalid Native Object"); + if (argc == 4) { + double arg0; + double arg1; + double arg2; + std::function 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); + do { + if(JS_TypeOfValue(cx, args.get(3)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(3))); + auto lambda = [=](float larg0) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[1]; + largv[0] = DOUBLE_TO_JSVAL(larg0); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg3 = lambda; + } + else + { + arg3 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionFloat_initWithDuration : Error processing arguments"); + bool ret = cobj->initWithDuration(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionFloat_initWithDuration : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_ActionFloat_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 4) { + double arg0; + double arg1; + double arg2; + std::function 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); + do { + if(JS_TypeOfValue(cx, args.get(3)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(3))); + auto lambda = [=](float larg0) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[1]; + largv[0] = DOUBLE_TO_JSVAL(larg0); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg3 = lambda; + } + else + { + arg3 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionFloat_create : Error processing arguments"); + cocos2d::ActionFloat* ret = cocos2d::ActionFloat::create(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ActionFloat*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ActionFloat_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ActionFloat_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ActionFloat* cobj = new (std::nothrow) cocos2d::ActionFloat(); + 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::ActionFloat"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ActionInterval_prototype; + +void js_cocos2d_ActionFloat_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ActionFloat)", obj); +} + +static bool js_cocos2d_ActionFloat_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::ActionFloat *nobj = new (std::nothrow) cocos2d::ActionFloat(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::ActionFloat"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_ActionFloat(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ActionFloat_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ActionFloat_class->name = "ActionFloat"; + jsb_cocos2d_ActionFloat_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ActionFloat_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ActionFloat_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ActionFloat_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ActionFloat_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ActionFloat_class->resolve = JS_ResolveStub; + jsb_cocos2d_ActionFloat_class->convert = JS_ConvertStub; + jsb_cocos2d_ActionFloat_class->finalize = js_cocos2d_ActionFloat_finalize; + jsb_cocos2d_ActionFloat_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("initWithDuration", js_cocos2dx_ActionFloat_initWithDuration, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_ActionFloat_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ActionFloat_create, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ActionFloat_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ActionInterval_prototype), + jsb_cocos2d_ActionFloat_class, + js_cocos2dx_ActionFloat_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, "ActionFloat", 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_ActionFloat_class; + p->proto = jsb_cocos2d_ActionFloat_prototype; + p->parentProto = jsb_cocos2d_ActionInterval_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_Configuration_class; JSObject *jsb_cocos2d_Configuration_prototype; @@ -12986,2617 +15876,6 @@ void js_register_cocos2dx_Configuration(JSContext *cx, JS::HandleObject global) } } -JSClass *jsb_cocos2d_Scene_class; -JSObject *jsb_cocos2d_Scene_prototype; - -bool js_cocos2dx_Scene_setCameraOrderDirty(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_setCameraOrderDirty : Invalid Native Object"); - if (argc == 0) { - cobj->setCameraOrderDirty(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scene_setCameraOrderDirty : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Scene_render(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_render : Invalid Native Object"); - if (argc == 1) { - cocos2d::Renderer* 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::Renderer*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_render : Error processing arguments"); - cobj->render(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scene_render : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Scene_onProjectionChanged(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_onProjectionChanged : Invalid Native Object"); - if (argc == 1) { - cocos2d::EventCustom* 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::EventCustom*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_onProjectionChanged : Error processing arguments"); - cobj->onProjectionChanged(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scene_onProjectionChanged : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Scene_initWithSize(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_initWithSize : Invalid Native Object"); - if (argc == 1) { - cocos2d::Size arg0; - ok &= jsval_to_ccsize(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_initWithSize : Error processing arguments"); - bool ret = cobj->initWithSize(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scene_initWithSize : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Scene_getDefaultCamera(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_getDefaultCamera : Invalid Native Object"); - if (argc == 0) { - cocos2d::Camera* ret = cobj->getDefaultCamera(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)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_getDefaultCamera : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Scene_createWithSize(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - cocos2d::Size arg0; - ok &= jsval_to_ccsize(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_createWithSize : Error processing arguments"); - cocos2d::Scene* ret = cocos2d::Scene::createWithSize(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Scene*)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_createWithSize : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Scene_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::Scene* ret = cocos2d::Scene::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Scene*)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_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Scene_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Scene* cobj = new (std::nothrow) cocos2d::Scene(); - 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::Scene"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_Scene_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Scene)", obj); -} - -static bool js_cocos2d_Scene_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::Scene *nobj = new (std::nothrow) cocos2d::Scene(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::Scene"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_Scene(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Scene_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Scene_class->name = "Scene"; - jsb_cocos2d_Scene_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Scene_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Scene_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Scene_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Scene_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Scene_class->resolve = JS_ResolveStub; - jsb_cocos2d_Scene_class->convert = JS_ConvertStub; - jsb_cocos2d_Scene_class->finalize = js_cocos2d_Scene_finalize; - jsb_cocos2d_Scene_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("setCameraOrderDirty", js_cocos2dx_Scene_setCameraOrderDirty, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("render", js_cocos2dx_Scene_render, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("onProjectionChanged", js_cocos2dx_Scene_onProjectionChanged, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithSize", js_cocos2dx_Scene_initWithSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDefaultCamera", js_cocos2dx_Scene_getDefaultCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_Scene_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("createWithSize", js_cocos2dx_Scene_createWithSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("create", js_cocos2dx_Scene_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_Scene_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_Scene_class, - js_cocos2dx_Scene_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, "Scene", 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_Scene_class; - p->proto = jsb_cocos2d_Scene_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_GLView_class; -JSObject *jsb_cocos2d_GLView_prototype; - -bool js_cocos2dx_GLView_setFrameSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setFrameSize : 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_GLView_setFrameSize : Error processing arguments"); - cobj->setFrameSize(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_setFrameSize : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_GLView_getViewPortRect(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getViewPortRect : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Rect& ret = cobj->getViewPortRect(); - jsval jsret = JSVAL_NULL; - jsret = ccrect_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getViewPortRect : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_setContentScaleFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setContentScaleFactor : 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_GLView_setContentScaleFactor : Error processing arguments"); - bool ret = cobj->setContentScaleFactor(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_setContentScaleFactor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_GLView_getContentScaleFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getContentScaleFactor : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getContentScaleFactor(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getContentScaleFactor : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_setIMEKeyboardState(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setIMEKeyboardState : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_GLView_setIMEKeyboardState : Error processing arguments"); - cobj->setIMEKeyboardState(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_setIMEKeyboardState : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_GLView_setScissorInPoints(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setScissorInPoints : 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_GLView_setScissorInPoints : Error processing arguments"); - cobj->setScissorInPoints(arg0, arg1, arg2, arg3); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_setScissorInPoints : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_GLView_getViewName(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getViewName : Invalid Native Object"); - if (argc == 0) { - const std::string& ret = cobj->getViewName(); - jsval jsret = JSVAL_NULL; - jsret = std_string_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getViewName : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_isOpenGLReady(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_isOpenGLReady : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isOpenGLReady(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_isOpenGLReady : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_setCursorVisible(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setCursorVisible : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_GLView_setCursorVisible : Error processing arguments"); - cobj->setCursorVisible(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_setCursorVisible : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_GLView_getScaleY(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getScaleY : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getScaleY(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getScaleY : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_getScaleX(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getScaleX : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getScaleX(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getScaleX : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_getVisibleOrigin(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getVisibleOrigin : Invalid Native Object"); - if (argc == 0) { - cocos2d::Vec2 ret = cobj->getVisibleOrigin(); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getVisibleOrigin : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_getFrameSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getFrameSize : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Size& ret = cobj->getFrameSize(); - jsval jsret = JSVAL_NULL; - jsret = ccsize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getFrameSize : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_setFrameZoomFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setFrameZoomFactor : 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_GLView_setFrameZoomFactor : Error processing arguments"); - cobj->setFrameZoomFactor(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_setFrameZoomFactor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_GLView_getFrameZoomFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getFrameZoomFactor : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getFrameZoomFactor(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getFrameZoomFactor : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_getDesignResolutionSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getDesignResolutionSize : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Size& ret = cobj->getDesignResolutionSize(); - jsval jsret = JSVAL_NULL; - jsret = ccsize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getDesignResolutionSize : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_windowShouldClose(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_windowShouldClose : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->windowShouldClose(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_windowShouldClose : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_setDesignResolutionSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setDesignResolutionSize : Invalid Native Object"); - if (argc == 3) { - double arg0; - double arg1; - ResolutionPolicy arg2; - ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); - ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_GLView_setDesignResolutionSize : Error processing arguments"); - cobj->setDesignResolutionSize(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_setDesignResolutionSize : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} -bool js_cocos2dx_GLView_getResolutionPolicy(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getResolutionPolicy : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getResolutionPolicy(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getResolutionPolicy : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_isRetinaDisplay(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_isRetinaDisplay : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isRetinaDisplay(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_isRetinaDisplay : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_setViewPortInPoints(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setViewPortInPoints : 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_GLView_setViewPortInPoints : Error processing arguments"); - cobj->setViewPortInPoints(arg0, arg1, arg2, arg3); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_setViewPortInPoints : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_GLView_getScissorRect(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getScissorRect : Invalid Native Object"); - if (argc == 0) { - cocos2d::Rect ret = cobj->getScissorRect(); - jsval jsret = JSVAL_NULL; - jsret = ccrect_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getScissorRect : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_getRetinaFactor(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getRetinaFactor : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getRetinaFactor(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getRetinaFactor : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_setViewName(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_setViewName : 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_GLView_setViewName : Error processing arguments"); - cobj->setViewName(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_setViewName : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_GLView_getVisibleRect(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getVisibleRect : Invalid Native Object"); - if (argc == 0) { - cocos2d::Rect ret = cobj->getVisibleRect(); - jsval jsret = JSVAL_NULL; - jsret = ccrect_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getVisibleRect : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_getVisibleSize(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_getVisibleSize : Invalid Native Object"); - if (argc == 0) { - cocos2d::Size ret = cobj->getVisibleSize(); - jsval jsret = JSVAL_NULL; - jsret = ccsize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_getVisibleSize : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_isScissorEnabled(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_isScissorEnabled : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isScissorEnabled(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_isScissorEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_pollEvents(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::GLView* cobj = (cocos2d::GLView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLView_pollEvents : Invalid Native Object"); - if (argc == 0) { - cobj->pollEvents(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_GLView_pollEvents : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_GLView_setGLContextAttrs(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - GLContextAttrs arg0; - #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs - ok = false; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_GLView_setGLContextAttrs : Error processing arguments"); - cocos2d::GLView::setGLContextAttrs(arg0); - args.rval().setUndefined(); - return true; - } - JS_ReportError(cx, "js_cocos2dx_GLView_setGLContextAttrs : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_GLView_getGLContextAttrs(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - GLContextAttrs ret = cocos2d::GLView::getGLContextAttrs(); - jsval jsret = JSVAL_NULL; - #pragma warning NO CONVERSION FROM NATIVE FOR GLContextAttrs; - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_GLView_getGLContextAttrs : wrong number of arguments"); - return false; -} - - - -void js_cocos2d_GLView_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (GLView)", obj); -} - -void js_register_cocos2dx_GLView(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_GLView_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_GLView_class->name = "GLView"; - jsb_cocos2d_GLView_class->addProperty = JS_PropertyStub; - jsb_cocos2d_GLView_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_GLView_class->getProperty = JS_PropertyStub; - jsb_cocos2d_GLView_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_GLView_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_GLView_class->resolve = JS_ResolveStub; - jsb_cocos2d_GLView_class->convert = JS_ConvertStub; - jsb_cocos2d_GLView_class->finalize = js_cocos2d_GLView_finalize; - jsb_cocos2d_GLView_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("setFrameSize", js_cocos2dx_GLView_setFrameSize, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getViewPortRect", js_cocos2dx_GLView_getViewPortRect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setContentScaleFactor", js_cocos2dx_GLView_setContentScaleFactor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getContentScaleFactor", js_cocos2dx_GLView_getContentScaleFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setIMEKeyboardState", js_cocos2dx_GLView_setIMEKeyboardState, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setScissorInPoints", js_cocos2dx_GLView_setScissorInPoints, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getViewName", js_cocos2dx_GLView_getViewName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isOpenGLReady", js_cocos2dx_GLView_isOpenGLReady, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCursorVisible", js_cocos2dx_GLView_setCursorVisible, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getScaleY", js_cocos2dx_GLView_getScaleY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getScaleX", js_cocos2dx_GLView_getScaleX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVisibleOrigin", js_cocos2dx_GLView_getVisibleOrigin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFrameSize", js_cocos2dx_GLView_getFrameSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFrameZoomFactor", js_cocos2dx_GLView_setFrameZoomFactor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFrameZoomFactor", js_cocos2dx_GLView_getFrameZoomFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDesignResolutionSize", js_cocos2dx_GLView_getDesignResolutionSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("windowShouldClose", js_cocos2dx_GLView_windowShouldClose, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDesignResolutionSize", js_cocos2dx_GLView_setDesignResolutionSize, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getResolutionPolicy", js_cocos2dx_GLView_getResolutionPolicy, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isRetinaDisplay", js_cocos2dx_GLView_isRetinaDisplay, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setViewPortInPoints", js_cocos2dx_GLView_setViewPortInPoints, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getScissorRect", js_cocos2dx_GLView_getScissorRect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRetinaFactor", js_cocos2dx_GLView_getRetinaFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setViewName", js_cocos2dx_GLView_setViewName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVisibleRect", js_cocos2dx_GLView_getVisibleRect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVisibleSize", js_cocos2dx_GLView_getVisibleSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isScissorEnabled", js_cocos2dx_GLView_isScissorEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("pollEvents", js_cocos2dx_GLView_pollEvents, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("setGLContextAttrs", js_cocos2dx_GLView_setGLContextAttrs, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getGLContextAttrs", js_cocos2dx_GLView_getGLContextAttrs, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_GLView_prototype = JS_InitClass( - cx, global, - JS::NullPtr(), // parent proto - jsb_cocos2d_GLView_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, "GLView", 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_GLView_class; - p->proto = jsb_cocos2d_GLView_prototype; - p->parentProto = NULL; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Director_class; -JSObject *jsb_cocos2d_Director_prototype; - -bool js_cocos2dx_Director_pause(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_pause : Invalid Native Object"); - if (argc == 0) { - cobj->pause(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_pause : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setEventDispatcher(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setEventDispatcher : Invalid Native Object"); - if (argc == 1) { - cocos2d::EventDispatcher* 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::EventDispatcher*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setEventDispatcher : Error processing arguments"); - cobj->setEventDispatcher(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setEventDispatcher : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_setContentScaleFactor(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setContentScaleFactor : 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_Director_setContentScaleFactor : Error processing arguments"); - cobj->setContentScaleFactor(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setContentScaleFactor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_getContentScaleFactor(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getContentScaleFactor : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getContentScaleFactor(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getContentScaleFactor : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getWinSizeInPixels(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getWinSizeInPixels : Invalid Native Object"); - if (argc == 0) { - cocos2d::Size ret = cobj->getWinSizeInPixels(); - jsval jsret = JSVAL_NULL; - jsret = ccsize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getWinSizeInPixels : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getDeltaTime(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getDeltaTime : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getDeltaTime(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getDeltaTime : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setGLDefaultValues(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setGLDefaultValues : Invalid Native Object"); - if (argc == 0) { - cobj->setGLDefaultValues(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setGLDefaultValues : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setActionManager(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setActionManager : Invalid Native Object"); - if (argc == 1) { - cocos2d::ActionManager* 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::ActionManager*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setActionManager : Error processing arguments"); - cobj->setActionManager(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setActionManager : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_setAlphaBlending(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setAlphaBlending : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setAlphaBlending : Error processing arguments"); - cobj->setAlphaBlending(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setAlphaBlending : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_popToRootScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_popToRootScene : Invalid Native Object"); - if (argc == 0) { - cobj->popToRootScene(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_popToRootScene : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_loadMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_loadMatrix : Invalid Native Object"); - if (argc == 2) { - cocos2d::MATRIX_STACK_TYPE arg0; - cocos2d::Mat4 arg1; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - ok &= jsval_to_matrix(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_loadMatrix : Error processing arguments"); - cobj->loadMatrix(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_loadMatrix : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_Director_getNotificationNode(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getNotificationNode : Invalid Native Object"); - if (argc == 0) { - cocos2d::Node* ret = cobj->getNotificationNode(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getNotificationNode : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getWinSize(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getWinSize : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Size& ret = cobj->getWinSize(); - jsval jsret = JSVAL_NULL; - jsret = ccsize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getWinSize : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_end(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_end : Invalid Native Object"); - if (argc == 0) { - cobj->end(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_end : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getTextureCache(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getTextureCache : Invalid Native Object"); - if (argc == 0) { - cocos2d::TextureCache* ret = cobj->getTextureCache(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TextureCache*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getTextureCache : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_isSendCleanupToScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_isSendCleanupToScene : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isSendCleanupToScene(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_isSendCleanupToScene : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getVisibleOrigin(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getVisibleOrigin : Invalid Native Object"); - if (argc == 0) { - cocos2d::Vec2 ret = cobj->getVisibleOrigin(); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getVisibleOrigin : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_mainLoop(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_mainLoop : Invalid Native Object"); - if (argc == 0) { - cobj->mainLoop(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_mainLoop : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setDepthTest(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setDepthTest : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setDepthTest : Error processing arguments"); - cobj->setDepthTest(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setDepthTest : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_getFrameRate(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getFrameRate : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getFrameRate(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getFrameRate : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getSecondsPerFrame(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getSecondsPerFrame : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getSecondsPerFrame(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getSecondsPerFrame : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_resetMatrixStack(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_resetMatrixStack : Invalid Native Object"); - if (argc == 0) { - cobj->resetMatrixStack(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_resetMatrixStack : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_convertToUI(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_convertToUI : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= jsval_to_vector2(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_convertToUI : Error processing arguments"); - cocos2d::Vec2 ret = cobj->convertToUI(arg0); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_convertToUI : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_pushMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_pushMatrix : Invalid Native Object"); - if (argc == 1) { - cocos2d::MATRIX_STACK_TYPE arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_pushMatrix : Error processing arguments"); - cobj->pushMatrix(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_pushMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_setDefaultValues(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setDefaultValues : Invalid Native Object"); - if (argc == 0) { - cobj->setDefaultValues(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setDefaultValues : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_init(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setScheduler(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setScheduler : Invalid Native Object"); - if (argc == 1) { - cocos2d::Scheduler* 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::Scheduler*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setScheduler : Error processing arguments"); - cobj->setScheduler(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setScheduler : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_getMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getMatrix : Invalid Native Object"); - if (argc == 1) { - cocos2d::MATRIX_STACK_TYPE arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_getMatrix : Error processing arguments"); - const cocos2d::Mat4& ret = cobj->getMatrix(arg0); - jsval jsret = JSVAL_NULL; - jsret = matrix_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_startAnimation(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_startAnimation : Invalid Native Object"); - if (argc == 0) { - cobj->startAnimation(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_startAnimation : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getOpenGLView(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getOpenGLView : Invalid Native Object"); - if (argc == 0) { - cocos2d::GLView* ret = cobj->getOpenGLView(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::GLView*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getOpenGLView : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getRunningScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getRunningScene : Invalid Native Object"); - if (argc == 0) { - cocos2d::Scene* ret = cobj->getRunningScene(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Scene*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getRunningScene : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setViewport(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setViewport : Invalid Native Object"); - if (argc == 0) { - cobj->setViewport(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setViewport : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_stopAnimation(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_stopAnimation : Invalid Native Object"); - if (argc == 0) { - cobj->stopAnimation(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_stopAnimation : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_popToSceneStackLevel(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_popToSceneStackLevel : 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_Director_popToSceneStackLevel : Error processing arguments"); - cobj->popToSceneStackLevel(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_popToSceneStackLevel : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_resume(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_resume : Invalid Native Object"); - if (argc == 0) { - cobj->resume(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_resume : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_isNextDeltaTimeZero(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_isNextDeltaTimeZero : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isNextDeltaTimeZero(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_isNextDeltaTimeZero : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setClearColor(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setClearColor : Invalid Native Object"); - if (argc == 1) { - cocos2d::Color4F arg0; - ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setClearColor : Error processing arguments"); - cobj->setClearColor(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setClearColor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_setOpenGLView(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setOpenGLView : Invalid Native Object"); - if (argc == 1) { - cocos2d::GLView* 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::GLView*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setOpenGLView : Error processing arguments"); - cobj->setOpenGLView(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setOpenGLView : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_convertToGL(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_convertToGL : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= jsval_to_vector2(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_convertToGL : Error processing arguments"); - cocos2d::Vec2 ret = cobj->convertToGL(arg0); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_convertToGL : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_purgeCachedData(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_purgeCachedData : Invalid Native Object"); - if (argc == 0) { - cobj->purgeCachedData(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_purgeCachedData : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getTotalFrames(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getTotalFrames : Invalid Native Object"); - if (argc == 0) { - unsigned int ret = cobj->getTotalFrames(); - jsval jsret = JSVAL_NULL; - jsret = uint32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getTotalFrames : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_runWithScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_runWithScene : 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_Director_runWithScene : Error processing arguments"); - cobj->runWithScene(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_runWithScene : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_setNotificationNode(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setNotificationNode : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setNotificationNode : Error processing arguments"); - cobj->setNotificationNode(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setNotificationNode : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_drawScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_drawScene : Invalid Native Object"); - if (argc == 0) { - cobj->drawScene(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_drawScene : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_restart(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_restart : Invalid Native Object"); - if (argc == 0) { - cobj->restart(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_restart : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_popScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_popScene : Invalid Native Object"); - if (argc == 0) { - cobj->popScene(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_popScene : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_loadIdentityMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_loadIdentityMatrix : Invalid Native Object"); - if (argc == 1) { - cocos2d::MATRIX_STACK_TYPE arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_loadIdentityMatrix : Error processing arguments"); - cobj->loadIdentityMatrix(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_loadIdentityMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_isDisplayStats(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_isDisplayStats : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isDisplayStats(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_isDisplayStats : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setProjection(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setProjection : Invalid Native Object"); - if (argc == 1) { - cocos2d::Director::Projection arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setProjection : Error processing arguments"); - cobj->setProjection(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setProjection : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_multiplyMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_multiplyMatrix : Invalid Native Object"); - if (argc == 2) { - cocos2d::MATRIX_STACK_TYPE arg0; - cocos2d::Mat4 arg1; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - ok &= jsval_to_matrix(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_multiplyMatrix : Error processing arguments"); - cobj->multiplyMatrix(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_multiplyMatrix : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_Director_getZEye(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getZEye : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getZEye(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getZEye : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setNextDeltaTimeZero(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setNextDeltaTimeZero : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setNextDeltaTimeZero : Error processing arguments"); - cobj->setNextDeltaTimeZero(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setNextDeltaTimeZero : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_popMatrix(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_popMatrix : Invalid Native Object"); - if (argc == 1) { - cocos2d::MATRIX_STACK_TYPE arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_popMatrix : Error processing arguments"); - cobj->popMatrix(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_popMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_getVisibleSize(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getVisibleSize : Invalid Native Object"); - if (argc == 0) { - cocos2d::Size ret = cobj->getVisibleSize(); - jsval jsret = JSVAL_NULL; - jsret = ccsize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getVisibleSize : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getScheduler(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getScheduler : Invalid Native Object"); - if (argc == 0) { - cocos2d::Scheduler* ret = cobj->getScheduler(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Scheduler*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getScheduler : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_pushScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_pushScene : 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_Director_pushScene : Error processing arguments"); - cobj->pushScene(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_pushScene : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_getAnimationInterval(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getAnimationInterval : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getAnimationInterval(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getAnimationInterval : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_isPaused(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_isPaused : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isPaused(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_isPaused : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_setDisplayStats(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setDisplayStats : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Director_setDisplayStats : Error processing arguments"); - cobj->setDisplayStats(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setDisplayStats : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_getEventDispatcher(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getEventDispatcher : Invalid Native Object"); - if (argc == 0) { - cocos2d::EventDispatcher* ret = cobj->getEventDispatcher(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::EventDispatcher*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getEventDispatcher : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_replaceScene(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_replaceScene : 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_Director_replaceScene : Error processing arguments"); - cobj->replaceScene(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_replaceScene : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_setAnimationInterval(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_setAnimationInterval : 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_Director_setAnimationInterval : Error processing arguments"); - cobj->setAnimationInterval(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_setAnimationInterval : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Director_getActionManager(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::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_getActionManager : Invalid Native Object"); - if (argc == 0) { - cocos2d::ActionManager* ret = cobj->getActionManager(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ActionManager*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Director_getActionManager : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Director_getInstance(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::Director* ret = cocos2d::Director::getInstance(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Director*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Director_getInstance : wrong number of arguments"); - return false; -} - - - -void js_cocos2d_Director_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Director)", obj); -} - -void js_register_cocos2dx_Director(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Director_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Director_class->name = "Director"; - jsb_cocos2d_Director_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Director_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Director_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Director_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Director_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Director_class->resolve = JS_ResolveStub; - jsb_cocos2d_Director_class->convert = JS_ConvertStub; - jsb_cocos2d_Director_class->finalize = js_cocos2d_Director_finalize; - jsb_cocos2d_Director_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("pause", js_cocos2dx_Director_pause, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEventDispatcher", js_cocos2dx_Director_setEventDispatcher, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setContentScaleFactor", js_cocos2dx_Director_setContentScaleFactor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getContentScaleFactor", js_cocos2dx_Director_getContentScaleFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getWinSizeInPixels", js_cocos2dx_Director_getWinSizeInPixels, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDeltaTime", js_cocos2dx_Director_getDeltaTime, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setGLDefaultValues", js_cocos2dx_Director_setGLDefaultValues, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setActionManager", js_cocos2dx_Director_setActionManager, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setAlphaBlending", js_cocos2dx_Director_setAlphaBlending, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("popToRootScene", js_cocos2dx_Director_popToRootScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadMatrix", js_cocos2dx_Director_loadMatrix, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getNotificationNode", js_cocos2dx_Director_getNotificationNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getWinSize", js_cocos2dx_Director_getWinSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("end", js_cocos2dx_Director_end, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTextureCache", js_cocos2dx_Director_getTextureCache, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isSendCleanupToScene", js_cocos2dx_Director_isSendCleanupToScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVisibleOrigin", js_cocos2dx_Director_getVisibleOrigin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("mainLoop", js_cocos2dx_Director_mainLoop, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDepthTest", js_cocos2dx_Director_setDepthTest, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFrameRate", js_cocos2dx_Director_getFrameRate, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSecondsPerFrame", js_cocos2dx_Director_getSecondsPerFrame, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("resetMatrixStack", js_cocos2dx_Director_resetMatrixStack, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("convertToUI", js_cocos2dx_Director_convertToUI, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("pushMatrix", js_cocos2dx_Director_pushMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDefaultValues", js_cocos2dx_Director_setDefaultValues, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("init", js_cocos2dx_Director_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setScheduler", js_cocos2dx_Director_setScheduler, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMatrix", js_cocos2dx_Director_getMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("startAnimation", js_cocos2dx_Director_startAnimation, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getOpenGLView", js_cocos2dx_Director_getOpenGLView, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRunningScene", js_cocos2dx_Director_getRunningScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setViewport", js_cocos2dx_Director_setViewport, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("stopAnimation", js_cocos2dx_Director_stopAnimation, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("popToSceneStackLevel", js_cocos2dx_Director_popToSceneStackLevel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("resume", js_cocos2dx_Director_resume, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isNextDeltaTimeZero", js_cocos2dx_Director_isNextDeltaTimeZero, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setClearColor", js_cocos2dx_Director_setClearColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setOpenGLView", js_cocos2dx_Director_setOpenGLView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("convertToGL", js_cocos2dx_Director_convertToGL, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("purgeCachedData", js_cocos2dx_Director_purgeCachedData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTotalFrames", js_cocos2dx_Director_getTotalFrames, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("runWithScene", js_cocos2dx_Director_runWithScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setNotificationNode", js_cocos2dx_Director_setNotificationNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("drawScene", js_cocos2dx_Director_drawScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("restart", js_cocos2dx_Director_restart, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("popScene", js_cocos2dx_Director_popScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadIdentityMatrix", js_cocos2dx_Director_loadIdentityMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isDisplayStats", js_cocos2dx_Director_isDisplayStats, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setProjection", js_cocos2dx_Director_setProjection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("multiplyMatrix", js_cocos2dx_Director_multiplyMatrix, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getZEye", js_cocos2dx_Director_getZEye, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setNextDeltaTimeZero", js_cocos2dx_Director_setNextDeltaTimeZero, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("popMatrix", js_cocos2dx_Director_popMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVisibleSize", js_cocos2dx_Director_getVisibleSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getScheduler", js_cocos2dx_Director_getScheduler, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("pushScene", js_cocos2dx_Director_pushScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getAnimationInterval", js_cocos2dx_Director_getAnimationInterval, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isPaused", js_cocos2dx_Director_isPaused, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDisplayStats", js_cocos2dx_Director_setDisplayStats, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEventDispatcher", js_cocos2dx_Director_getEventDispatcher, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("replaceScene", js_cocos2dx_Director_replaceScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setAnimationInterval", js_cocos2dx_Director_setAnimationInterval, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getActionManager", js_cocos2dx_Director_getActionManager, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("getInstance", js_cocos2dx_Director_getInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_Director_prototype = JS_InitClass( - cx, global, - JS::NullPtr(), // parent proto - jsb_cocos2d_Director_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, "Director", 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_Director_class; - p->proto = jsb_cocos2d_Director_prototype; - p->parentProto = NULL; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Scheduler_class; -JSObject *jsb_cocos2d_Scheduler_prototype; - -bool js_cocos2dx_Scheduler_setTimeScale(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_setTimeScale : 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_Scheduler_setTimeScale : Error processing arguments"); - cobj->setTimeScale(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scheduler_setTimeScale : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Scheduler_unscheduleAllWithMinPriority(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_unscheduleAllWithMinPriority : 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_Scheduler_unscheduleAllWithMinPriority : Error processing arguments"); - cobj->unscheduleAllWithMinPriority(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scheduler_unscheduleAllWithMinPriority : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Scheduler_update(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_update : 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_Scheduler_update : Error processing arguments"); - cobj->update(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scheduler_update : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Scheduler_unscheduleScriptEntry(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_unscheduleScriptEntry : 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_Scheduler_unscheduleScriptEntry : Error processing arguments"); - cobj->unscheduleScriptEntry(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scheduler_unscheduleScriptEntry : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Scheduler_performFunctionInCocosThread(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_performFunctionInCocosThread : Invalid Native Object"); - if (argc == 1) { - std::function arg0; - do { - if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(0))); - auto lambda = [=]() -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - JS::RootedValue rval(cx); - bool ok = func->invoke(0, nullptr, &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg0 = lambda; - } - else - { - arg0 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scheduler_performFunctionInCocosThread : Error processing arguments"); - cobj->performFunctionInCocosThread(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scheduler_performFunctionInCocosThread : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Scheduler_unscheduleAll(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_unscheduleAll : Invalid Native Object"); - if (argc == 0) { - cobj->unscheduleAll(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scheduler_unscheduleAll : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Scheduler_getTimeScale(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::Scheduler* cobj = (cocos2d::Scheduler *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scheduler_getTimeScale : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getTimeScale(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Scheduler_getTimeScale : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Scheduler_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Scheduler* cobj = new (std::nothrow) cocos2d::Scheduler(); - 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::Scheduler"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - - -void js_cocos2d_Scheduler_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Scheduler)", obj); -} - -void js_register_cocos2dx_Scheduler(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Scheduler_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Scheduler_class->name = "Scheduler"; - jsb_cocos2d_Scheduler_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Scheduler_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Scheduler_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Scheduler_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Scheduler_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Scheduler_class->resolve = JS_ResolveStub; - jsb_cocos2d_Scheduler_class->convert = JS_ConvertStub; - jsb_cocos2d_Scheduler_class->finalize = js_cocos2d_Scheduler_finalize; - jsb_cocos2d_Scheduler_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("setTimeScale", js_cocos2dx_Scheduler_setTimeScale, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("unscheduleAllWithMinPriority", js_cocos2dx_Scheduler_unscheduleAllWithMinPriority, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("update", js_cocos2dx_Scheduler_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("unscheduleScriptEntry", js_cocos2dx_Scheduler_unscheduleScriptEntry, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("performFunctionInCocosThread", js_cocos2dx_Scheduler_performFunctionInCocosThread, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("unscheduleAll", js_cocos2dx_Scheduler_unscheduleAll, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTimeScale", js_cocos2dx_Scheduler_getTimeScale, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_Scheduler_prototype = JS_InitClass( - cx, global, - JS::NullPtr(), // parent proto - jsb_cocos2d_Scheduler_class, - js_cocos2dx_Scheduler_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, "Scheduler", 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_Scheduler_class; - p->proto = jsb_cocos2d_Scheduler_prototype; - p->parentProto = NULL; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - JSClass *jsb_cocos2d_FileUtils_class; JSObject *jsb_cocos2d_FileUtils_prototype; @@ -16365,6 +16644,213 @@ void js_register_cocos2dx_FileUtils(JSContext *cx, JS::HandleObject global) { } } +JSClass *jsb_cocos2d_EventAcceleration_class; +JSObject *jsb_cocos2d_EventAcceleration_prototype; + +bool js_cocos2dx_EventAcceleration_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Acceleration arg0; + ok &= jsval_to_ccacceleration(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventAcceleration_constructor : Error processing arguments"); + cocos2d::EventAcceleration* cobj = new (std::nothrow) cocos2d::EventAcceleration(arg0); + 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::EventAcceleration"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Event_prototype; + +void js_cocos2d_EventAcceleration_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (EventAcceleration)", obj); +} + +void js_register_cocos2dx_EventAcceleration(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_EventAcceleration_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_EventAcceleration_class->name = "EventAcceleration"; + jsb_cocos2d_EventAcceleration_class->addProperty = JS_PropertyStub; + jsb_cocos2d_EventAcceleration_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_EventAcceleration_class->getProperty = JS_PropertyStub; + jsb_cocos2d_EventAcceleration_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_EventAcceleration_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_EventAcceleration_class->resolve = JS_ResolveStub; + jsb_cocos2d_EventAcceleration_class->convert = JS_ConvertStub; + jsb_cocos2d_EventAcceleration_class->finalize = js_cocos2d_EventAcceleration_finalize; + jsb_cocos2d_EventAcceleration_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_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_EventAcceleration_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Event_prototype), + jsb_cocos2d_EventAcceleration_class, + js_cocos2dx_EventAcceleration_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, "EventAcceleration", 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_EventAcceleration_class; + p->proto = jsb_cocos2d_EventAcceleration_prototype; + p->parentProto = jsb_cocos2d_Event_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_EventCustom_class; +JSObject *jsb_cocos2d_EventCustom_prototype; + +bool js_cocos2dx_EventCustom_getEventName(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::EventCustom* cobj = (cocos2d::EventCustom *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventCustom_getEventName : Invalid Native Object"); + if (argc == 0) { + const std::string& ret = cobj->getEventName(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_EventCustom_getEventName : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_EventCustom_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventCustom_constructor : Error processing arguments"); + cocos2d::EventCustom* cobj = new (std::nothrow) cocos2d::EventCustom(arg0); + 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::EventCustom"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Event_prototype; + +void js_cocos2d_EventCustom_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (EventCustom)", obj); +} + +void js_register_cocos2dx_EventCustom(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_EventCustom_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_EventCustom_class->name = "EventCustom"; + jsb_cocos2d_EventCustom_class->addProperty = JS_PropertyStub; + jsb_cocos2d_EventCustom_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_EventCustom_class->getProperty = JS_PropertyStub; + jsb_cocos2d_EventCustom_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_EventCustom_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_EventCustom_class->resolve = JS_ResolveStub; + jsb_cocos2d_EventCustom_class->convert = JS_ConvertStub; + jsb_cocos2d_EventCustom_class->finalize = js_cocos2d_EventCustom_finalize; + jsb_cocos2d_EventCustom_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("getEventName", js_cocos2dx_EventCustom_getEventName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_EventCustom_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Event_prototype), + jsb_cocos2d_EventCustom_class, + js_cocos2dx_EventCustom_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, "EventCustom", 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_EventCustom_class; + p->proto = jsb_cocos2d_EventCustom_prototype; + p->parentProto = jsb_cocos2d_Event_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_EventListener_class; JSObject *jsb_cocos2d_EventListener_prototype; @@ -17046,75 +17532,38 @@ void js_register_cocos2dx_EventDispatcher(JSContext *cx, JS::HandleObject global } } -JSClass *jsb_cocos2d_EventListenerTouchOneByOne_class; -JSObject *jsb_cocos2d_EventListenerTouchOneByOne_prototype; +JSClass *jsb_cocos2d_EventFocus_class; +JSObject *jsb_cocos2d_EventFocus_prototype; -bool js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches(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::EventListenerTouchOneByOne* cobj = (cocos2d::EventListenerTouchOneByOne *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isSwallowTouches(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_EventFocus_constructor(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::EventListenerTouchOneByOne* cobj = (cocos2d::EventListenerTouchOneByOne *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches : Error processing arguments"); - cobj->setSwallowTouches(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_EventListenerTouchOneByOne_init(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::EventListenerTouchOneByOne* cobj = (cocos2d::EventListenerTouchOneByOne *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerTouchOneByOne_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_EventListenerTouchOneByOne_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_EventListenerTouchOneByOne_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::EventListenerTouchOneByOne* cobj = new (std::nothrow) cocos2d::EventListenerTouchOneByOne(); + cocos2d::ui::Widget* arg0; + cocos2d::ui::Widget* arg1; + 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::ui::Widget*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + 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::ui::Widget*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventFocus_constructor : Error processing arguments"); + cocos2d::EventFocus* cobj = new (std::nothrow) cocos2d::EventFocus(arg0, arg1); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -17128,7 +17577,203 @@ bool js_cocos2dx_EventListenerTouchOneByOne_constructor(JSContext *cx, uint32_t 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::EventListenerTouchOneByOne"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::EventFocus"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Event_prototype; + +void js_cocos2d_EventFocus_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (EventFocus)", obj); +} + +void js_register_cocos2dx_EventFocus(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_EventFocus_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_EventFocus_class->name = "EventFocus"; + jsb_cocos2d_EventFocus_class->addProperty = JS_PropertyStub; + jsb_cocos2d_EventFocus_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_EventFocus_class->getProperty = JS_PropertyStub; + jsb_cocos2d_EventFocus_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_EventFocus_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_EventFocus_class->resolve = JS_ResolveStub; + jsb_cocos2d_EventFocus_class->convert = JS_ConvertStub; + jsb_cocos2d_EventFocus_class->finalize = js_cocos2d_EventFocus_finalize; + jsb_cocos2d_EventFocus_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_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_EventFocus_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Event_prototype), + jsb_cocos2d_EventFocus_class, + js_cocos2dx_EventFocus_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, "EventFocus", 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_EventFocus_class; + p->proto = jsb_cocos2d_EventFocus_prototype; + p->parentProto = jsb_cocos2d_Event_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_EventListenerAcceleration_class; +JSObject *jsb_cocos2d_EventListenerAcceleration_prototype; + +bool js_cocos2dx_EventListenerAcceleration_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::EventListenerAcceleration* cobj = (cocos2d::EventListenerAcceleration *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerAcceleration_init : Invalid Native Object"); + if (argc == 1) { + std::function arg0; + do { + if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(0))); + auto lambda = [=](cocos2d::Acceleration* larg0, cocos2d::Event* larg1) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[2]; + largv[0] = ccacceleration_to_jsval(cx, *larg0); + do { + if (larg1) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Event*)larg1); + largv[1] = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + largv[1] = JSVAL_NULL; + } + } while (0); + JS::RootedValue rval(cx); + bool ok = func->invoke(2, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg0 = lambda; + } + else + { + arg0 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventListenerAcceleration_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_EventListenerAcceleration_init : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_EventListenerAcceleration_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + std::function arg0; + do { + if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(0))); + auto lambda = [=](cocos2d::Acceleration* larg0, cocos2d::Event* larg1) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[2]; + largv[0] = ccacceleration_to_jsval(cx, *larg0); + do { + if (larg1) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Event*)larg1); + largv[1] = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + largv[1] = JSVAL_NULL; + } + } while (0); + JS::RootedValue rval(cx); + bool ok = func->invoke(2, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg0 = lambda; + } + else + { + arg0 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventListenerAcceleration_create : Error processing arguments"); + cocos2d::EventListenerAcceleration* ret = cocos2d::EventListenerAcceleration::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::EventListenerAcceleration*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_EventListenerAcceleration_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_EventListenerAcceleration_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::EventListenerAcceleration* cobj = new (std::nothrow) cocos2d::EventListenerAcceleration(); + 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::EventListenerAcceleration"); if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); return true; @@ -17137,22 +17782,22 @@ bool js_cocos2dx_EventListenerTouchOneByOne_constructor(JSContext *cx, uint32_t extern JSObject *jsb_cocos2d_EventListener_prototype; -void js_cocos2d_EventListenerTouchOneByOne_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerTouchOneByOne)", obj); +void js_cocos2d_EventListenerAcceleration_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerAcceleration)", obj); } -void js_register_cocos2dx_EventListenerTouchOneByOne(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_EventListenerTouchOneByOne_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_EventListenerTouchOneByOne_class->name = "EventListenerTouchOneByOne"; - jsb_cocos2d_EventListenerTouchOneByOne_class->addProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerTouchOneByOne_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_EventListenerTouchOneByOne_class->getProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerTouchOneByOne_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_EventListenerTouchOneByOne_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_EventListenerTouchOneByOne_class->resolve = JS_ResolveStub; - jsb_cocos2d_EventListenerTouchOneByOne_class->convert = JS_ConvertStub; - jsb_cocos2d_EventListenerTouchOneByOne_class->finalize = js_cocos2d_EventListenerTouchOneByOne_finalize; - jsb_cocos2d_EventListenerTouchOneByOne_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_EventListenerAcceleration(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_EventListenerAcceleration_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_EventListenerAcceleration_class->name = "EventListenerAcceleration"; + jsb_cocos2d_EventListenerAcceleration_class->addProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerAcceleration_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_EventListenerAcceleration_class->getProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerAcceleration_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_EventListenerAcceleration_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_EventListenerAcceleration_class->resolve = JS_ResolveStub; + jsb_cocos2d_EventListenerAcceleration_class->convert = JS_ConvertStub; + jsb_cocos2d_EventListenerAcceleration_class->finalize = js_cocos2d_EventListenerAcceleration_finalize; + jsb_cocos2d_EventListenerAcceleration_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -17160,19 +17805,20 @@ void js_register_cocos2dx_EventListenerTouchOneByOne(JSContext *cx, JS::HandleOb }; static JSFunctionSpec funcs[] = { - JS_FN("isSwallowTouches", js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSwallowTouches", js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("init", js_cocos2dx_EventListenerTouchOneByOne_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("init", js_cocos2dx_EventListenerAcceleration_init, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - JSFunctionSpec *st_funcs = NULL; + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_EventListenerAcceleration_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; - jsb_cocos2d_EventListenerTouchOneByOne_prototype = JS_InitClass( + jsb_cocos2d_EventListenerAcceleration_prototype = JS_InitClass( cx, global, JS::RootedObject(cx, jsb_cocos2d_EventListener_prototype), - jsb_cocos2d_EventListenerTouchOneByOne_class, - js_cocos2dx_EventListenerTouchOneByOne_constructor, 0, // constructor + jsb_cocos2d_EventListenerAcceleration_class, + js_cocos2dx_EventListenerAcceleration_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -17180,53 +17826,90 @@ void js_register_cocos2dx_EventListenerTouchOneByOne(JSContext *cx, JS::HandleOb // make the class enumerable in the registered namespace // bool found; //FIXME: Removed in Firefox v27 -// JS_SetPropertyAttributes(cx, global, "EventListenerTouchOneByOne", JSPROP_ENUMERATE | JSPROP_READONLY, &found); +// JS_SetPropertyAttributes(cx, global, "EventListenerAcceleration", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + 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_EventListenerTouchOneByOne_class; - p->proto = jsb_cocos2d_EventListenerTouchOneByOne_prototype; + p->jsclass = jsb_cocos2d_EventListenerAcceleration_class; + p->proto = jsb_cocos2d_EventListenerAcceleration_prototype; p->parentProto = jsb_cocos2d_EventListener_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_EventListenerTouchAllAtOnce_class; -JSObject *jsb_cocos2d_EventListenerTouchAllAtOnce_prototype; +JSClass *jsb_cocos2d_EventListenerCustom_class; +JSObject *jsb_cocos2d_EventListenerCustom_prototype; -bool js_cocos2dx_EventListenerTouchAllAtOnce_init(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::EventListenerTouchAllAtOnce* cobj = (cocos2d::EventListenerTouchAllAtOnce *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerTouchAllAtOnce_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_EventListenerTouchAllAtOnce_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_EventListenerTouchAllAtOnce_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_EventListenerCustom_create(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - cocos2d::EventListenerTouchAllAtOnce* cobj = new (std::nothrow) cocos2d::EventListenerTouchAllAtOnce(); + if (argc == 2) { + std::string arg0; + std::function arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + do { + if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(1))); + auto lambda = [=](cocos2d::EventCustom* larg0) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[1]; + do { + if (larg0) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::EventCustom*)larg0); + largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + largv[0] = JSVAL_NULL; + } + } while (0); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg1 = lambda; + } + else + { + arg1 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventListenerCustom_create : Error processing arguments"); + cocos2d::EventListenerCustom* ret = cocos2d::EventListenerCustom::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::EventListenerCustom*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_EventListenerCustom_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_EventListenerCustom_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::EventListenerCustom* cobj = new (std::nothrow) cocos2d::EventListenerCustom(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -17240,7 +17923,7 @@ bool js_cocos2dx_EventListenerTouchAllAtOnce_constructor(JSContext *cx, uint32_t 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::EventListenerTouchAllAtOnce"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::EventListenerCustom"); if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); return true; @@ -17249,22 +17932,22 @@ bool js_cocos2dx_EventListenerTouchAllAtOnce_constructor(JSContext *cx, uint32_t extern JSObject *jsb_cocos2d_EventListener_prototype; -void js_cocos2d_EventListenerTouchAllAtOnce_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerTouchAllAtOnce)", obj); +void js_cocos2d_EventListenerCustom_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerCustom)", obj); } -void js_register_cocos2dx_EventListenerTouchAllAtOnce(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_EventListenerTouchAllAtOnce_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_EventListenerTouchAllAtOnce_class->name = "EventListenerTouchAllAtOnce"; - jsb_cocos2d_EventListenerTouchAllAtOnce_class->addProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerTouchAllAtOnce_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_EventListenerTouchAllAtOnce_class->getProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerTouchAllAtOnce_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_EventListenerTouchAllAtOnce_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_EventListenerTouchAllAtOnce_class->resolve = JS_ResolveStub; - jsb_cocos2d_EventListenerTouchAllAtOnce_class->convert = JS_ConvertStub; - jsb_cocos2d_EventListenerTouchAllAtOnce_class->finalize = js_cocos2d_EventListenerTouchAllAtOnce_finalize; - jsb_cocos2d_EventListenerTouchAllAtOnce_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_EventListenerCustom(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_EventListenerCustom_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_EventListenerCustom_class->name = "EventListenerCustom"; + jsb_cocos2d_EventListenerCustom_class->addProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerCustom_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_EventListenerCustom_class->getProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerCustom_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_EventListenerCustom_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_EventListenerCustom_class->resolve = JS_ResolveStub; + jsb_cocos2d_EventListenerCustom_class->convert = JS_ConvertStub; + jsb_cocos2d_EventListenerCustom_class->finalize = js_cocos2d_EventListenerCustom_finalize; + jsb_cocos2d_EventListenerCustom_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -17272,17 +17955,19 @@ void js_register_cocos2dx_EventListenerTouchAllAtOnce(JSContext *cx, JS::HandleO }; static JSFunctionSpec funcs[] = { - JS_FN("init", js_cocos2dx_EventListenerTouchAllAtOnce_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - JSFunctionSpec *st_funcs = NULL; + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_EventListenerCustom_create, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; - jsb_cocos2d_EventListenerTouchAllAtOnce_prototype = JS_InitClass( + jsb_cocos2d_EventListenerCustom_prototype = JS_InitClass( cx, global, JS::RootedObject(cx, jsb_cocos2d_EventListener_prototype), - jsb_cocos2d_EventListenerTouchAllAtOnce_class, - js_cocos2dx_EventListenerTouchAllAtOnce_constructor, 0, // constructor + jsb_cocos2d_EventListenerCustom_class, + js_cocos2dx_EventListenerCustom_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -17290,17 +17975,127 @@ void js_register_cocos2dx_EventListenerTouchAllAtOnce(JSContext *cx, JS::HandleO // make the class enumerable in the registered namespace // bool found; //FIXME: Removed in Firefox v27 -// JS_SetPropertyAttributes(cx, global, "EventListenerTouchAllAtOnce", JSPROP_ENUMERATE | JSPROP_READONLY, &found); +// JS_SetPropertyAttributes(cx, global, "EventListenerCustom", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + 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_EventListenerTouchAllAtOnce_class; - p->proto = jsb_cocos2d_EventListenerTouchAllAtOnce_prototype; + p->jsclass = jsb_cocos2d_EventListenerCustom_class; + p->proto = jsb_cocos2d_EventListenerCustom_prototype; + p->parentProto = jsb_cocos2d_EventListener_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_EventListenerFocus_class; +JSObject *jsb_cocos2d_EventListenerFocus_prototype; + +bool js_cocos2dx_EventListenerFocus_init(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::EventListenerFocus* cobj = (cocos2d::EventListenerFocus *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerFocus_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_EventListenerFocus_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_EventListenerFocus_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::EventListenerFocus* cobj = new (std::nothrow) cocos2d::EventListenerFocus(); + 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::EventListenerFocus"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_EventListener_prototype; + +void js_cocos2d_EventListenerFocus_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerFocus)", obj); +} + +void js_register_cocos2dx_EventListenerFocus(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_EventListenerFocus_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_EventListenerFocus_class->name = "EventListenerFocus"; + jsb_cocos2d_EventListenerFocus_class->addProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerFocus_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_EventListenerFocus_class->getProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerFocus_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_EventListenerFocus_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_EventListenerFocus_class->resolve = JS_ResolveStub; + jsb_cocos2d_EventListenerFocus_class->convert = JS_ConvertStub; + jsb_cocos2d_EventListenerFocus_class->finalize = js_cocos2d_EventListenerFocus_finalize; + jsb_cocos2d_EventListenerFocus_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("init", js_cocos2dx_EventListenerFocus_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_EventListenerFocus_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_EventListener_prototype), + jsb_cocos2d_EventListenerFocus_class, + js_cocos2dx_EventListenerFocus_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, "EventListenerFocus", 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_EventListenerFocus_class; + p->proto = jsb_cocos2d_EventListenerFocus_prototype; p->parentProto = jsb_cocos2d_EventListener_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } @@ -17915,682 +18710,54 @@ void js_register_cocos2dx_EventListenerMouse(JSContext *cx, JS::HandleObject glo } } -JSClass *jsb_cocos2d_EventAcceleration_class; -JSObject *jsb_cocos2d_EventAcceleration_prototype; +JSClass *jsb_cocos2d_EventListenerTouchOneByOne_class; +JSObject *jsb_cocos2d_EventListenerTouchOneByOne_prototype; -bool js_cocos2dx_EventAcceleration_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Acceleration arg0; - ok &= jsval_to_ccacceleration(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventAcceleration_constructor : Error processing arguments"); - cocos2d::EventAcceleration* cobj = new (std::nothrow) cocos2d::EventAcceleration(arg0); - 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::EventAcceleration"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Event_prototype; - -void js_cocos2d_EventAcceleration_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (EventAcceleration)", obj); -} - -void js_register_cocos2dx_EventAcceleration(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_EventAcceleration_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_EventAcceleration_class->name = "EventAcceleration"; - jsb_cocos2d_EventAcceleration_class->addProperty = JS_PropertyStub; - jsb_cocos2d_EventAcceleration_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_EventAcceleration_class->getProperty = JS_PropertyStub; - jsb_cocos2d_EventAcceleration_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_EventAcceleration_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_EventAcceleration_class->resolve = JS_ResolveStub; - jsb_cocos2d_EventAcceleration_class->convert = JS_ConvertStub; - jsb_cocos2d_EventAcceleration_class->finalize = js_cocos2d_EventAcceleration_finalize; - jsb_cocos2d_EventAcceleration_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_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_EventAcceleration_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Event_prototype), - jsb_cocos2d_EventAcceleration_class, - js_cocos2dx_EventAcceleration_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, "EventAcceleration", 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_EventAcceleration_class; - p->proto = jsb_cocos2d_EventAcceleration_prototype; - p->parentProto = jsb_cocos2d_Event_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_EventListenerAcceleration_class; -JSObject *jsb_cocos2d_EventListenerAcceleration_prototype; - -bool js_cocos2dx_EventListenerAcceleration_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::EventListenerAcceleration* cobj = (cocos2d::EventListenerAcceleration *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerAcceleration_init : Invalid Native Object"); - if (argc == 1) { - std::function arg0; - do { - if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(0))); - auto lambda = [=](cocos2d::Acceleration* larg0, cocos2d::Event* larg1) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[2]; - largv[0] = ccacceleration_to_jsval(cx, *larg0); - do { - if (larg1) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Event*)larg1); - largv[1] = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - largv[1] = JSVAL_NULL; - } - } while (0); - JS::RootedValue rval(cx); - bool ok = func->invoke(2, &largv[0], &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg0 = lambda; - } - else - { - arg0 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventListenerAcceleration_init : Error processing arguments"); - bool ret = cobj->init(arg0); + cocos2d::EventListenerTouchOneByOne* cobj = (cocos2d::EventListenerTouchOneByOne *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isSwallowTouches(); jsval jsret = JSVAL_NULL; jsret = BOOLEAN_TO_JSVAL(ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_EventListenerAcceleration_init : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_EventListenerAcceleration_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches(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::EventListenerTouchOneByOne* cobj = (cocos2d::EventListenerTouchOneByOne *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches : Invalid Native Object"); if (argc == 1) { - std::function arg0; - do { - if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(0))); - auto lambda = [=](cocos2d::Acceleration* larg0, cocos2d::Event* larg1) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[2]; - largv[0] = ccacceleration_to_jsval(cx, *larg0); - do { - if (larg1) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Event*)larg1); - largv[1] = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - largv[1] = JSVAL_NULL; - } - } while (0); - JS::RootedValue rval(cx); - bool ok = func->invoke(2, &largv[0], &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg0 = lambda; - } - else - { - arg0 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventListenerAcceleration_create : Error processing arguments"); - cocos2d::EventListenerAcceleration* ret = cocos2d::EventListenerAcceleration::create(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::EventListenerAcceleration*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches : Error processing arguments"); + cobj->setSwallowTouches(arg0); + args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_EventListenerAcceleration_create : wrong number of arguments"); + + JS_ReportError(cx, "js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } - -bool js_cocos2dx_EventListenerAcceleration_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::EventListenerAcceleration* cobj = new (std::nothrow) cocos2d::EventListenerAcceleration(); - 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::EventListenerAcceleration"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_EventListener_prototype; - -void js_cocos2d_EventListenerAcceleration_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerAcceleration)", obj); -} - -void js_register_cocos2dx_EventListenerAcceleration(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_EventListenerAcceleration_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_EventListenerAcceleration_class->name = "EventListenerAcceleration"; - jsb_cocos2d_EventListenerAcceleration_class->addProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerAcceleration_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_EventListenerAcceleration_class->getProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerAcceleration_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_EventListenerAcceleration_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_EventListenerAcceleration_class->resolve = JS_ResolveStub; - jsb_cocos2d_EventListenerAcceleration_class->convert = JS_ConvertStub; - jsb_cocos2d_EventListenerAcceleration_class->finalize = js_cocos2d_EventListenerAcceleration_finalize; - jsb_cocos2d_EventListenerAcceleration_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("init", js_cocos2dx_EventListenerAcceleration_init, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_EventListenerAcceleration_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_EventListenerAcceleration_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_EventListener_prototype), - jsb_cocos2d_EventListenerAcceleration_class, - js_cocos2dx_EventListenerAcceleration_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, "EventListenerAcceleration", 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_EventListenerAcceleration_class; - p->proto = jsb_cocos2d_EventListenerAcceleration_prototype; - p->parentProto = jsb_cocos2d_EventListener_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_EventCustom_class; -JSObject *jsb_cocos2d_EventCustom_prototype; - -bool js_cocos2dx_EventCustom_getEventName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_EventListenerTouchOneByOne_init(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::EventCustom* cobj = (cocos2d::EventCustom *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventCustom_getEventName : Invalid Native Object"); - if (argc == 0) { - const std::string& ret = cobj->getEventName(); - jsval jsret = JSVAL_NULL; - jsret = std_string_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_EventCustom_getEventName : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_EventCustom_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventCustom_constructor : Error processing arguments"); - cocos2d::EventCustom* cobj = new (std::nothrow) cocos2d::EventCustom(arg0); - 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::EventCustom"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Event_prototype; - -void js_cocos2d_EventCustom_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (EventCustom)", obj); -} - -void js_register_cocos2dx_EventCustom(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_EventCustom_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_EventCustom_class->name = "EventCustom"; - jsb_cocos2d_EventCustom_class->addProperty = JS_PropertyStub; - jsb_cocos2d_EventCustom_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_EventCustom_class->getProperty = JS_PropertyStub; - jsb_cocos2d_EventCustom_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_EventCustom_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_EventCustom_class->resolve = JS_ResolveStub; - jsb_cocos2d_EventCustom_class->convert = JS_ConvertStub; - jsb_cocos2d_EventCustom_class->finalize = js_cocos2d_EventCustom_finalize; - jsb_cocos2d_EventCustom_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("getEventName", js_cocos2dx_EventCustom_getEventName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_EventCustom_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Event_prototype), - jsb_cocos2d_EventCustom_class, - js_cocos2dx_EventCustom_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, "EventCustom", 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_EventCustom_class; - p->proto = jsb_cocos2d_EventCustom_prototype; - p->parentProto = jsb_cocos2d_Event_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_EventListenerCustom_class; -JSObject *jsb_cocos2d_EventListenerCustom_prototype; - -bool js_cocos2dx_EventListenerCustom_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 2) { - std::string arg0; - std::function arg1; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - do { - if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(1))); - auto lambda = [=](cocos2d::EventCustom* larg0) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[1]; - do { - if (larg0) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::EventCustom*)larg0); - largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - largv[0] = JSVAL_NULL; - } - } while (0); - JS::RootedValue rval(cx); - bool ok = func->invoke(1, &largv[0], &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg1 = lambda; - } - else - { - arg1 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventListenerCustom_create : Error processing arguments"); - cocos2d::EventListenerCustom* ret = cocos2d::EventListenerCustom::create(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::EventListenerCustom*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_EventListenerCustom_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_EventListenerCustom_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::EventListenerCustom* cobj = new (std::nothrow) cocos2d::EventListenerCustom(); - 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::EventListenerCustom"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_EventListener_prototype; - -void js_cocos2d_EventListenerCustom_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerCustom)", obj); -} - -void js_register_cocos2dx_EventListenerCustom(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_EventListenerCustom_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_EventListenerCustom_class->name = "EventListenerCustom"; - jsb_cocos2d_EventListenerCustom_class->addProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerCustom_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_EventListenerCustom_class->getProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerCustom_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_EventListenerCustom_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_EventListenerCustom_class->resolve = JS_ResolveStub; - jsb_cocos2d_EventListenerCustom_class->convert = JS_ConvertStub; - jsb_cocos2d_EventListenerCustom_class->finalize = js_cocos2d_EventListenerCustom_finalize; - jsb_cocos2d_EventListenerCustom_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_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_EventListenerCustom_create, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_EventListenerCustom_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_EventListener_prototype), - jsb_cocos2d_EventListenerCustom_class, - js_cocos2dx_EventListenerCustom_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, "EventListenerCustom", 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_EventListenerCustom_class; - p->proto = jsb_cocos2d_EventListenerCustom_prototype; - p->parentProto = jsb_cocos2d_EventListener_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_EventFocus_class; -JSObject *jsb_cocos2d_EventFocus_prototype; - -bool js_cocos2dx_EventFocus_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ui::Widget* arg0; - cocos2d::ui::Widget* arg1; - 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::ui::Widget*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - 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::ui::Widget*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_EventFocus_constructor : Error processing arguments"); - cocos2d::EventFocus* cobj = new (std::nothrow) cocos2d::EventFocus(arg0, arg1); - 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::EventFocus"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Event_prototype; - -void js_cocos2d_EventFocus_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (EventFocus)", obj); -} - -void js_register_cocos2dx_EventFocus(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_EventFocus_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_EventFocus_class->name = "EventFocus"; - jsb_cocos2d_EventFocus_class->addProperty = JS_PropertyStub; - jsb_cocos2d_EventFocus_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_EventFocus_class->getProperty = JS_PropertyStub; - jsb_cocos2d_EventFocus_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_EventFocus_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_EventFocus_class->resolve = JS_ResolveStub; - jsb_cocos2d_EventFocus_class->convert = JS_ConvertStub; - jsb_cocos2d_EventFocus_class->finalize = js_cocos2d_EventFocus_finalize; - jsb_cocos2d_EventFocus_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_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_EventFocus_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Event_prototype), - jsb_cocos2d_EventFocus_class, - js_cocos2dx_EventFocus_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, "EventFocus", 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_EventFocus_class; - p->proto = jsb_cocos2d_EventFocus_prototype; - p->parentProto = jsb_cocos2d_Event_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_EventListenerFocus_class; -JSObject *jsb_cocos2d_EventListenerFocus_prototype; - -bool js_cocos2dx_EventListenerFocus_init(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::EventListenerFocus* cobj = (cocos2d::EventListenerFocus *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerFocus_init : Invalid Native Object"); + cocos2d::EventListenerTouchOneByOne* cobj = (cocos2d::EventListenerTouchOneByOne *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerTouchOneByOne_init : Invalid Native Object"); if (argc == 0) { bool ret = cobj->init(); jsval jsret = JSVAL_NULL; @@ -18599,19 +18766,19 @@ bool js_cocos2dx_EventListenerFocus_init(JSContext *cx, uint32_t argc, jsval *vp return true; } - JS_ReportError(cx, "js_cocos2dx_EventListenerFocus_init : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_EventListenerTouchOneByOne_init : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_EventListenerFocus_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_EventListenerTouchOneByOne_constructor(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - cocos2d::EventListenerFocus* cobj = new (std::nothrow) cocos2d::EventListenerFocus(); + cocos2d::EventListenerTouchOneByOne* cobj = new (std::nothrow) cocos2d::EventListenerTouchOneByOne(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -18625,7 +18792,7 @@ bool js_cocos2dx_EventListenerFocus_constructor(JSContext *cx, uint32_t argc, js 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::EventListenerFocus"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::EventListenerTouchOneByOne"); if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); return true; @@ -18634,22 +18801,22 @@ bool js_cocos2dx_EventListenerFocus_constructor(JSContext *cx, uint32_t argc, js extern JSObject *jsb_cocos2d_EventListener_prototype; -void js_cocos2d_EventListenerFocus_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerFocus)", obj); +void js_cocos2d_EventListenerTouchOneByOne_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerTouchOneByOne)", obj); } -void js_register_cocos2dx_EventListenerFocus(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_EventListenerFocus_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_EventListenerFocus_class->name = "EventListenerFocus"; - jsb_cocos2d_EventListenerFocus_class->addProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerFocus_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_EventListenerFocus_class->getProperty = JS_PropertyStub; - jsb_cocos2d_EventListenerFocus_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_EventListenerFocus_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_EventListenerFocus_class->resolve = JS_ResolveStub; - jsb_cocos2d_EventListenerFocus_class->convert = JS_ConvertStub; - jsb_cocos2d_EventListenerFocus_class->finalize = js_cocos2d_EventListenerFocus_finalize; - jsb_cocos2d_EventListenerFocus_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_EventListenerTouchOneByOne(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_EventListenerTouchOneByOne_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_EventListenerTouchOneByOne_class->name = "EventListenerTouchOneByOne"; + jsb_cocos2d_EventListenerTouchOneByOne_class->addProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerTouchOneByOne_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_EventListenerTouchOneByOne_class->getProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerTouchOneByOne_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_EventListenerTouchOneByOne_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_EventListenerTouchOneByOne_class->resolve = JS_ResolveStub; + jsb_cocos2d_EventListenerTouchOneByOne_class->convert = JS_ConvertStub; + jsb_cocos2d_EventListenerTouchOneByOne_class->finalize = js_cocos2d_EventListenerTouchOneByOne_finalize; + jsb_cocos2d_EventListenerTouchOneByOne_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -18657,17 +18824,19 @@ void js_register_cocos2dx_EventListenerFocus(JSContext *cx, JS::HandleObject glo }; static JSFunctionSpec funcs[] = { - JS_FN("init", js_cocos2dx_EventListenerFocus_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isSwallowTouches", js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSwallowTouches", js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("init", js_cocos2dx_EventListenerTouchOneByOne_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; JSFunctionSpec *st_funcs = NULL; - jsb_cocos2d_EventListenerFocus_prototype = JS_InitClass( + jsb_cocos2d_EventListenerTouchOneByOne_prototype = JS_InitClass( cx, global, JS::RootedObject(cx, jsb_cocos2d_EventListener_prototype), - jsb_cocos2d_EventListenerFocus_class, - js_cocos2dx_EventListenerFocus_constructor, 0, // constructor + jsb_cocos2d_EventListenerTouchOneByOne_class, + js_cocos2dx_EventListenerTouchOneByOne_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -18675,17 +18844,127 @@ void js_register_cocos2dx_EventListenerFocus(JSContext *cx, JS::HandleObject glo // make the class enumerable in the registered namespace // bool found; //FIXME: Removed in Firefox v27 -// JS_SetPropertyAttributes(cx, global, "EventListenerFocus", JSPROP_ENUMERATE | JSPROP_READONLY, &found); +// JS_SetPropertyAttributes(cx, global, "EventListenerTouchOneByOne", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + 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_EventListenerFocus_class; - p->proto = jsb_cocos2d_EventListenerFocus_prototype; + p->jsclass = jsb_cocos2d_EventListenerTouchOneByOne_class; + p->proto = jsb_cocos2d_EventListenerTouchOneByOne_prototype; + p->parentProto = jsb_cocos2d_EventListener_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_EventListenerTouchAllAtOnce_class; +JSObject *jsb_cocos2d_EventListenerTouchAllAtOnce_prototype; + +bool js_cocos2dx_EventListenerTouchAllAtOnce_init(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::EventListenerTouchAllAtOnce* cobj = (cocos2d::EventListenerTouchAllAtOnce *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventListenerTouchAllAtOnce_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_EventListenerTouchAllAtOnce_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_EventListenerTouchAllAtOnce_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::EventListenerTouchAllAtOnce* cobj = new (std::nothrow) cocos2d::EventListenerTouchAllAtOnce(); + 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::EventListenerTouchAllAtOnce"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_EventListener_prototype; + +void js_cocos2d_EventListenerTouchAllAtOnce_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (EventListenerTouchAllAtOnce)", obj); +} + +void js_register_cocos2dx_EventListenerTouchAllAtOnce(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_EventListenerTouchAllAtOnce_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_EventListenerTouchAllAtOnce_class->name = "EventListenerTouchAllAtOnce"; + jsb_cocos2d_EventListenerTouchAllAtOnce_class->addProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerTouchAllAtOnce_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_EventListenerTouchAllAtOnce_class->getProperty = JS_PropertyStub; + jsb_cocos2d_EventListenerTouchAllAtOnce_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_EventListenerTouchAllAtOnce_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_EventListenerTouchAllAtOnce_class->resolve = JS_ResolveStub; + jsb_cocos2d_EventListenerTouchAllAtOnce_class->convert = JS_ConvertStub; + jsb_cocos2d_EventListenerTouchAllAtOnce_class->finalize = js_cocos2d_EventListenerTouchAllAtOnce_finalize; + jsb_cocos2d_EventListenerTouchAllAtOnce_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("init", js_cocos2dx_EventListenerTouchAllAtOnce_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_EventListenerTouchAllAtOnce_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_EventListener_prototype), + jsb_cocos2d_EventListenerTouchAllAtOnce_class, + js_cocos2dx_EventListenerTouchAllAtOnce_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, "EventListenerTouchAllAtOnce", 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_EventListenerTouchAllAtOnce_class; + p->proto = jsb_cocos2d_EventListenerTouchAllAtOnce_prototype; p->parentProto = jsb_cocos2d_EventListener_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } @@ -19135,35 +19414,22 @@ void js_register_cocos2dx_OrbitCamera(JSContext *cx, JS::HandleObject global) { } } -JSClass *jsb_cocos2d_ActionManager_class; -JSObject *jsb_cocos2d_ActionManager_prototype; +JSClass *jsb_cocos2d_CardinalSplineTo_class; +JSObject *jsb_cocos2d_CardinalSplineTo_prototype; -bool js_cocos2dx_ActionManager_getActionByTag(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_CardinalSplineTo_getPoints(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_getActionByTag : Invalid Native Object"); - if (argc == 2) { - int arg0; - const cocos2d::Node* arg1; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - 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 = (const cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_getActionByTag : Error processing arguments"); - cocos2d::Action* ret = cobj->getActionByTag(arg0, arg1); + cocos2d::CardinalSplineTo* cobj = (cocos2d::CardinalSplineTo *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_CardinalSplineTo_getPoints : Invalid Native Object"); + if (argc == 0) { + cocos2d::PointArray* ret = cobj->getPoints(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Action*)ret); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::PointArray*)ret); jsret = OBJECT_TO_JSVAL(jsProxy->obj); } else { jsret = JSVAL_NULL; @@ -19173,326 +19439,39 @@ bool js_cocos2dx_ActionManager_getActionByTag(JSContext *cx, uint32_t argc, jsva return true; } - JS_ReportError(cx, "js_cocos2dx_ActionManager_getActionByTag : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_CardinalSplineTo_getPoints : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_ActionManager_removeActionByTag(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_CardinalSplineTo_updatePosition(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeActionByTag : Invalid Native Object"); - if (argc == 2) { - int arg0; - cocos2d::Node* arg1; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_removeActionByTag : Error processing arguments"); - cobj->removeActionByTag(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_removeActionByTag : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_ActionManager_removeAllActions(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeAllActions : Invalid Native Object"); - if (argc == 0) { - cobj->removeAllActions(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_removeAllActions : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ActionManager_addAction(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_addAction : Invalid Native Object"); - if (argc == 3) { - cocos2d::Action* arg0; - cocos2d::Node* arg1; - bool arg2; - 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::Action*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); - arg2 = JS::ToBoolean(args.get(2)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_addAction : Error processing arguments"); - cobj->addAction(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_addAction : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} -bool js_cocos2dx_ActionManager_resumeTarget(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_resumeTarget : Invalid Native Object"); + cocos2d::CardinalSplineTo* cobj = (cocos2d::CardinalSplineTo *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_CardinalSplineTo_updatePosition : Invalid Native Object"); if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_resumeTarget : Error processing arguments"); - cobj->resumeTarget(arg0); + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_CardinalSplineTo_updatePosition : Error processing arguments"); + cobj->updatePosition(arg0); args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_ActionManager_resumeTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_CardinalSplineTo_updatePosition : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_ActionManager_update(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_CardinalSplineTo_constructor(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_update : 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_ActionManager_update : Error processing arguments"); - cobj->update(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_update : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ActionManager_pauseTarget(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_pauseTarget : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_pauseTarget : Error processing arguments"); - cobj->pauseTarget(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_pauseTarget : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget : Invalid Native Object"); - if (argc == 1) { - const cocos2d::Node* 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 = (const cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget : Error processing arguments"); - ssize_t ret = cobj->getNumberOfRunningActionsInTarget(arg0); - jsval jsret = JSVAL_NULL; - jsret = ssize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ActionManager_removeAllActionsFromTarget(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeAllActionsFromTarget : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_removeAllActionsFromTarget : Error processing arguments"); - cobj->removeAllActionsFromTarget(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_removeAllActionsFromTarget : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ActionManager_resumeTargets(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_resumeTargets : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vector arg0; - ok &= jsval_to_ccvector(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_resumeTargets : Error processing arguments"); - cobj->resumeTargets(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_resumeTargets : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ActionManager_removeAction(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeAction : Invalid Native Object"); - if (argc == 1) { - cocos2d::Action* 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::Action*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_removeAction : Error processing arguments"); - cobj->removeAction(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_removeAction : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ActionManager_removeAllActionsByTag(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeAllActionsByTag : Invalid Native Object"); - if (argc == 2) { - int arg0; - cocos2d::Node* arg1; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_removeAllActionsByTag : Error processing arguments"); - cobj->removeAllActionsByTag(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_removeAllActionsByTag : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_ActionManager_pauseAllRunningActions(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_pauseAllRunningActions : Invalid Native Object"); - if (argc == 0) { - cocos2d::Vector ret = cobj->pauseAllRunningActions(); - jsval jsret = JSVAL_NULL; - jsret = ccvector_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ActionManager_pauseAllRunningActions : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ActionManager_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ActionManager* cobj = new (std::nothrow) cocos2d::ActionManager(); + cocos2d::CardinalSplineTo* cobj = new (std::nothrow) cocos2d::CardinalSplineTo(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -19506,46 +19485,31 @@ bool js_cocos2dx_ActionManager_constructor(JSContext *cx, uint32_t argc, jsval * 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::ActionManager"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::CardinalSplineTo"); if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); return true; } +extern JSObject *jsb_cocos2d_ActionInterval_prototype; -void js_cocos2d_ActionManager_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ActionManager)", obj); +void js_cocos2d_CardinalSplineTo_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (CardinalSplineTo)", obj); } -static bool js_cocos2d_ActionManager_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::ActionManager *nobj = new (std::nothrow) cocos2d::ActionManager(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::ActionManager"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_ActionManager(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ActionManager_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ActionManager_class->name = "ActionManager"; - jsb_cocos2d_ActionManager_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ActionManager_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ActionManager_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ActionManager_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ActionManager_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ActionManager_class->resolve = JS_ResolveStub; - jsb_cocos2d_ActionManager_class->convert = JS_ConvertStub; - jsb_cocos2d_ActionManager_class->finalize = js_cocos2d_ActionManager_finalize; - jsb_cocos2d_ActionManager_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_CardinalSplineTo(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_CardinalSplineTo_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_CardinalSplineTo_class->name = "CardinalSplineTo"; + jsb_cocos2d_CardinalSplineTo_class->addProperty = JS_PropertyStub; + jsb_cocos2d_CardinalSplineTo_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_CardinalSplineTo_class->getProperty = JS_PropertyStub; + jsb_cocos2d_CardinalSplineTo_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_CardinalSplineTo_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_CardinalSplineTo_class->resolve = JS_ResolveStub; + jsb_cocos2d_CardinalSplineTo_class->convert = JS_ConvertStub; + jsb_cocos2d_CardinalSplineTo_class->finalize = js_cocos2d_CardinalSplineTo_finalize; + jsb_cocos2d_CardinalSplineTo_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -19553,30 +19517,18 @@ void js_register_cocos2dx_ActionManager(JSContext *cx, JS::HandleObject global) }; static JSFunctionSpec funcs[] = { - JS_FN("getActionByTag", js_cocos2dx_ActionManager_getActionByTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeActionByTag", js_cocos2dx_ActionManager_removeActionByTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllActions", js_cocos2dx_ActionManager_removeAllActions, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addAction", js_cocos2dx_ActionManager_addAction, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("resumeTarget", js_cocos2dx_ActionManager_resumeTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("update", js_cocos2dx_ActionManager_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("pauseTarget", js_cocos2dx_ActionManager_pauseTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getNumberOfRunningActionsInTarget", js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllActionsFromTarget", js_cocos2dx_ActionManager_removeAllActionsFromTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("resumeTargets", js_cocos2dx_ActionManager_resumeTargets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAction", js_cocos2dx_ActionManager_removeAction, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllActionsByTag", js_cocos2dx_ActionManager_removeAllActionsByTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("pauseAllRunningActions", js_cocos2dx_ActionManager_pauseAllRunningActions, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_ActionManager_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPoints", js_cocos2dx_CardinalSplineTo_getPoints, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("updatePosition", js_cocos2dx_CardinalSplineTo_updatePosition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; JSFunctionSpec *st_funcs = NULL; - jsb_cocos2d_ActionManager_prototype = JS_InitClass( + jsb_cocos2d_CardinalSplineTo_prototype = JS_InitClass( cx, global, - JS::NullPtr(), // parent proto - jsb_cocos2d_ActionManager_class, - js_cocos2dx_ActionManager_constructor, 0, // constructor + JS::RootedObject(cx, jsb_cocos2d_ActionInterval_prototype), + jsb_cocos2d_CardinalSplineTo_class, + js_cocos2dx_CardinalSplineTo_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -19584,18 +19536,233 @@ void js_register_cocos2dx_ActionManager(JSContext *cx, JS::HandleObject global) // make the class enumerable in the registered namespace // bool found; //FIXME: Removed in Firefox v27 -// JS_SetPropertyAttributes(cx, global, "ActionManager", JSPROP_ENUMERATE | JSPROP_READONLY, &found); +// JS_SetPropertyAttributes(cx, global, "CardinalSplineTo", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + 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_ActionManager_class; - p->proto = jsb_cocos2d_ActionManager_prototype; - p->parentProto = NULL; + p->jsclass = jsb_cocos2d_CardinalSplineTo_class; + p->proto = jsb_cocos2d_CardinalSplineTo_prototype; + p->parentProto = jsb_cocos2d_ActionInterval_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_CardinalSplineBy_class; +JSObject *jsb_cocos2d_CardinalSplineBy_prototype; + +bool js_cocos2dx_CardinalSplineBy_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::CardinalSplineBy* cobj = new (std::nothrow) cocos2d::CardinalSplineBy(); + 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::CardinalSplineBy"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_CardinalSplineTo_prototype; + +void js_cocos2d_CardinalSplineBy_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (CardinalSplineBy)", obj); +} + +void js_register_cocos2dx_CardinalSplineBy(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_CardinalSplineBy_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_CardinalSplineBy_class->name = "CardinalSplineBy"; + jsb_cocos2d_CardinalSplineBy_class->addProperty = JS_PropertyStub; + jsb_cocos2d_CardinalSplineBy_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_CardinalSplineBy_class->getProperty = JS_PropertyStub; + jsb_cocos2d_CardinalSplineBy_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_CardinalSplineBy_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_CardinalSplineBy_class->resolve = JS_ResolveStub; + jsb_cocos2d_CardinalSplineBy_class->convert = JS_ConvertStub; + jsb_cocos2d_CardinalSplineBy_class->finalize = js_cocos2d_CardinalSplineBy_finalize; + jsb_cocos2d_CardinalSplineBy_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_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_CardinalSplineBy_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_CardinalSplineTo_prototype), + jsb_cocos2d_CardinalSplineBy_class, + js_cocos2dx_CardinalSplineBy_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, "CardinalSplineBy", 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_CardinalSplineBy_class; + p->proto = jsb_cocos2d_CardinalSplineBy_prototype; + p->parentProto = jsb_cocos2d_CardinalSplineTo_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_CatmullRomTo_class; +JSObject *jsb_cocos2d_CatmullRomTo_prototype; + + +extern JSObject *jsb_cocos2d_CardinalSplineTo_prototype; + +void js_cocos2d_CatmullRomTo_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (CatmullRomTo)", obj); +} + +void js_register_cocos2dx_CatmullRomTo(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_CatmullRomTo_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_CatmullRomTo_class->name = "CatmullRomTo"; + jsb_cocos2d_CatmullRomTo_class->addProperty = JS_PropertyStub; + jsb_cocos2d_CatmullRomTo_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_CatmullRomTo_class->getProperty = JS_PropertyStub; + jsb_cocos2d_CatmullRomTo_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_CatmullRomTo_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_CatmullRomTo_class->resolve = JS_ResolveStub; + jsb_cocos2d_CatmullRomTo_class->convert = JS_ConvertStub; + jsb_cocos2d_CatmullRomTo_class->finalize = js_cocos2d_CatmullRomTo_finalize; + jsb_cocos2d_CatmullRomTo_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_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_CatmullRomTo_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_CardinalSplineTo_prototype), + jsb_cocos2d_CatmullRomTo_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, "CatmullRomTo", 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_CatmullRomTo_class; + p->proto = jsb_cocos2d_CatmullRomTo_prototype; + p->parentProto = jsb_cocos2d_CardinalSplineTo_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_CatmullRomBy_class; +JSObject *jsb_cocos2d_CatmullRomBy_prototype; + + +extern JSObject *jsb_cocos2d_CardinalSplineBy_prototype; + +void js_cocos2d_CatmullRomBy_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (CatmullRomBy)", obj); +} + +void js_register_cocos2dx_CatmullRomBy(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_CatmullRomBy_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_CatmullRomBy_class->name = "CatmullRomBy"; + jsb_cocos2d_CatmullRomBy_class->addProperty = JS_PropertyStub; + jsb_cocos2d_CatmullRomBy_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_CatmullRomBy_class->getProperty = JS_PropertyStub; + jsb_cocos2d_CatmullRomBy_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_CatmullRomBy_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_CatmullRomBy_class->resolve = JS_ResolveStub; + jsb_cocos2d_CatmullRomBy_class->convert = JS_ConvertStub; + jsb_cocos2d_CatmullRomBy_class->finalize = js_cocos2d_CatmullRomBy_finalize; + jsb_cocos2d_CatmullRomBy_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_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_CatmullRomBy_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_CardinalSplineBy_prototype), + jsb_cocos2d_CatmullRomBy_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, "CatmullRomBy", 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_CatmullRomBy_class; + p->proto = jsb_cocos2d_CatmullRomBy_prototype; + p->parentProto = jsb_cocos2d_CardinalSplineBy_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } @@ -28434,6 +28601,471 @@ void js_register_cocos2dx_Twirl(JSContext *cx, JS::HandleObject global) { } } +JSClass *jsb_cocos2d_ActionManager_class; +JSObject *jsb_cocos2d_ActionManager_prototype; + +bool js_cocos2dx_ActionManager_getActionByTag(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_getActionByTag : Invalid Native Object"); + if (argc == 2) { + int arg0; + const cocos2d::Node* arg1; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + 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 = (const cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_getActionByTag : Error processing arguments"); + cocos2d::Action* ret = cobj->getActionByTag(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Action*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_getActionByTag : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ActionManager_removeActionByTag(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeActionByTag : Invalid Native Object"); + if (argc == 2) { + int arg0; + cocos2d::Node* arg1; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_removeActionByTag : Error processing arguments"); + cobj->removeActionByTag(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_removeActionByTag : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ActionManager_removeAllActions(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeAllActions : Invalid Native Object"); + if (argc == 0) { + cobj->removeAllActions(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_removeAllActions : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ActionManager_addAction(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_addAction : Invalid Native Object"); + if (argc == 3) { + cocos2d::Action* arg0; + cocos2d::Node* arg1; + bool arg2; + 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::Action*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + arg2 = JS::ToBoolean(args.get(2)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_addAction : Error processing arguments"); + cobj->addAction(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_addAction : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_ActionManager_resumeTarget(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_resumeTarget : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_resumeTarget : Error processing arguments"); + cobj->resumeTarget(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_resumeTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ActionManager_update(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_update : 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_ActionManager_update : Error processing arguments"); + cobj->update(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_update : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ActionManager_pauseTarget(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_pauseTarget : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_pauseTarget : Error processing arguments"); + cobj->pauseTarget(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_pauseTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget : Invalid Native Object"); + if (argc == 1) { + const cocos2d::Node* 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 = (const cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget : Error processing arguments"); + ssize_t ret = cobj->getNumberOfRunningActionsInTarget(arg0); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ActionManager_removeAllActionsFromTarget(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeAllActionsFromTarget : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_removeAllActionsFromTarget : Error processing arguments"); + cobj->removeAllActionsFromTarget(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_removeAllActionsFromTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ActionManager_resumeTargets(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_resumeTargets : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vector arg0; + ok &= jsval_to_ccvector(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_resumeTargets : Error processing arguments"); + cobj->resumeTargets(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_resumeTargets : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ActionManager_removeAction(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeAction : Invalid Native Object"); + if (argc == 1) { + cocos2d::Action* 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::Action*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_removeAction : Error processing arguments"); + cobj->removeAction(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_removeAction : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ActionManager_removeAllActionsByTag(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_removeAllActionsByTag : Invalid Native Object"); + if (argc == 2) { + int arg0; + cocos2d::Node* arg1; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ActionManager_removeAllActionsByTag : Error processing arguments"); + cobj->removeAllActionsByTag(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_removeAllActionsByTag : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ActionManager_pauseAllRunningActions(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::ActionManager* cobj = (cocos2d::ActionManager *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionManager_pauseAllRunningActions : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vector ret = cobj->pauseAllRunningActions(); + jsval jsret = JSVAL_NULL; + jsret = ccvector_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ActionManager_pauseAllRunningActions : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ActionManager_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ActionManager* cobj = new (std::nothrow) cocos2d::ActionManager(); + 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::ActionManager"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + + +void js_cocos2d_ActionManager_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ActionManager)", obj); +} + +static bool js_cocos2d_ActionManager_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::ActionManager *nobj = new (std::nothrow) cocos2d::ActionManager(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::ActionManager"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_ActionManager(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ActionManager_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ActionManager_class->name = "ActionManager"; + jsb_cocos2d_ActionManager_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ActionManager_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ActionManager_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ActionManager_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ActionManager_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ActionManager_class->resolve = JS_ResolveStub; + jsb_cocos2d_ActionManager_class->convert = JS_ConvertStub; + jsb_cocos2d_ActionManager_class->finalize = js_cocos2d_ActionManager_finalize; + jsb_cocos2d_ActionManager_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("getActionByTag", js_cocos2dx_ActionManager_getActionByTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeActionByTag", js_cocos2dx_ActionManager_removeActionByTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllActions", js_cocos2dx_ActionManager_removeAllActions, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addAction", js_cocos2dx_ActionManager_addAction, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("resumeTarget", js_cocos2dx_ActionManager_resumeTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("update", js_cocos2dx_ActionManager_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("pauseTarget", js_cocos2dx_ActionManager_pauseTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getNumberOfRunningActionsInTarget", js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllActionsFromTarget", js_cocos2dx_ActionManager_removeAllActionsFromTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("resumeTargets", js_cocos2dx_ActionManager_resumeTargets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAction", js_cocos2dx_ActionManager_removeAction, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllActionsByTag", js_cocos2dx_ActionManager_removeAllActionsByTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("pauseAllRunningActions", js_cocos2dx_ActionManager_pauseAllRunningActions, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_ActionManager_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_ActionManager_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_ActionManager_class, + js_cocos2dx_ActionManager_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, "ActionManager", 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_ActionManager_class; + p->proto = jsb_cocos2d_ActionManager_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_PageTurn3D_class; JSObject *jsb_cocos2d_PageTurn3D_prototype; @@ -31070,777 +31702,6 @@ void js_register_cocos2dx_ActionTween(JSContext *cx, JS::HandleObject global) { } } -JSClass *jsb_cocos2d_CardinalSplineTo_class; -JSObject *jsb_cocos2d_CardinalSplineTo_prototype; - -bool js_cocos2dx_CardinalSplineTo_getPoints(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::CardinalSplineTo* cobj = (cocos2d::CardinalSplineTo *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_CardinalSplineTo_getPoints : Invalid Native Object"); - if (argc == 0) { - cocos2d::PointArray* ret = cobj->getPoints(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::PointArray*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_CardinalSplineTo_getPoints : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_CardinalSplineTo_updatePosition(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::CardinalSplineTo* cobj = (cocos2d::CardinalSplineTo *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_CardinalSplineTo_updatePosition : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= jsval_to_vector2(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_CardinalSplineTo_updatePosition : Error processing arguments"); - cobj->updatePosition(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_CardinalSplineTo_updatePosition : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_CardinalSplineTo_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::CardinalSplineTo* cobj = new (std::nothrow) cocos2d::CardinalSplineTo(); - 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::CardinalSplineTo"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ActionInterval_prototype; - -void js_cocos2d_CardinalSplineTo_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (CardinalSplineTo)", obj); -} - -void js_register_cocos2dx_CardinalSplineTo(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_CardinalSplineTo_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_CardinalSplineTo_class->name = "CardinalSplineTo"; - jsb_cocos2d_CardinalSplineTo_class->addProperty = JS_PropertyStub; - jsb_cocos2d_CardinalSplineTo_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_CardinalSplineTo_class->getProperty = JS_PropertyStub; - jsb_cocos2d_CardinalSplineTo_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_CardinalSplineTo_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_CardinalSplineTo_class->resolve = JS_ResolveStub; - jsb_cocos2d_CardinalSplineTo_class->convert = JS_ConvertStub; - jsb_cocos2d_CardinalSplineTo_class->finalize = js_cocos2d_CardinalSplineTo_finalize; - jsb_cocos2d_CardinalSplineTo_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("getPoints", js_cocos2dx_CardinalSplineTo_getPoints, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("updatePosition", js_cocos2dx_CardinalSplineTo_updatePosition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_CardinalSplineTo_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ActionInterval_prototype), - jsb_cocos2d_CardinalSplineTo_class, - js_cocos2dx_CardinalSplineTo_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, "CardinalSplineTo", 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_CardinalSplineTo_class; - p->proto = jsb_cocos2d_CardinalSplineTo_prototype; - p->parentProto = jsb_cocos2d_ActionInterval_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_CardinalSplineBy_class; -JSObject *jsb_cocos2d_CardinalSplineBy_prototype; - -bool js_cocos2dx_CardinalSplineBy_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::CardinalSplineBy* cobj = new (std::nothrow) cocos2d::CardinalSplineBy(); - 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::CardinalSplineBy"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_CardinalSplineTo_prototype; - -void js_cocos2d_CardinalSplineBy_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (CardinalSplineBy)", obj); -} - -void js_register_cocos2dx_CardinalSplineBy(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_CardinalSplineBy_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_CardinalSplineBy_class->name = "CardinalSplineBy"; - jsb_cocos2d_CardinalSplineBy_class->addProperty = JS_PropertyStub; - jsb_cocos2d_CardinalSplineBy_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_CardinalSplineBy_class->getProperty = JS_PropertyStub; - jsb_cocos2d_CardinalSplineBy_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_CardinalSplineBy_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_CardinalSplineBy_class->resolve = JS_ResolveStub; - jsb_cocos2d_CardinalSplineBy_class->convert = JS_ConvertStub; - jsb_cocos2d_CardinalSplineBy_class->finalize = js_cocos2d_CardinalSplineBy_finalize; - jsb_cocos2d_CardinalSplineBy_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_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_CardinalSplineBy_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_CardinalSplineTo_prototype), - jsb_cocos2d_CardinalSplineBy_class, - js_cocos2dx_CardinalSplineBy_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, "CardinalSplineBy", 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_CardinalSplineBy_class; - p->proto = jsb_cocos2d_CardinalSplineBy_prototype; - p->parentProto = jsb_cocos2d_CardinalSplineTo_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_CatmullRomTo_class; -JSObject *jsb_cocos2d_CatmullRomTo_prototype; - - -extern JSObject *jsb_cocos2d_CardinalSplineTo_prototype; - -void js_cocos2d_CatmullRomTo_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (CatmullRomTo)", obj); -} - -void js_register_cocos2dx_CatmullRomTo(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_CatmullRomTo_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_CatmullRomTo_class->name = "CatmullRomTo"; - jsb_cocos2d_CatmullRomTo_class->addProperty = JS_PropertyStub; - jsb_cocos2d_CatmullRomTo_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_CatmullRomTo_class->getProperty = JS_PropertyStub; - jsb_cocos2d_CatmullRomTo_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_CatmullRomTo_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_CatmullRomTo_class->resolve = JS_ResolveStub; - jsb_cocos2d_CatmullRomTo_class->convert = JS_ConvertStub; - jsb_cocos2d_CatmullRomTo_class->finalize = js_cocos2d_CatmullRomTo_finalize; - jsb_cocos2d_CatmullRomTo_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_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_CatmullRomTo_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_CardinalSplineTo_prototype), - jsb_cocos2d_CatmullRomTo_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, "CatmullRomTo", 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_CatmullRomTo_class; - p->proto = jsb_cocos2d_CatmullRomTo_prototype; - p->parentProto = jsb_cocos2d_CardinalSplineTo_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_CatmullRomBy_class; -JSObject *jsb_cocos2d_CatmullRomBy_prototype; - - -extern JSObject *jsb_cocos2d_CardinalSplineBy_prototype; - -void js_cocos2d_CatmullRomBy_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (CatmullRomBy)", obj); -} - -void js_register_cocos2dx_CatmullRomBy(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_CatmullRomBy_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_CatmullRomBy_class->name = "CatmullRomBy"; - jsb_cocos2d_CatmullRomBy_class->addProperty = JS_PropertyStub; - jsb_cocos2d_CatmullRomBy_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_CatmullRomBy_class->getProperty = JS_PropertyStub; - jsb_cocos2d_CatmullRomBy_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_CatmullRomBy_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_CatmullRomBy_class->resolve = JS_ResolveStub; - jsb_cocos2d_CatmullRomBy_class->convert = JS_ConvertStub; - jsb_cocos2d_CatmullRomBy_class->finalize = js_cocos2d_CatmullRomBy_finalize; - jsb_cocos2d_CatmullRomBy_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_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_CatmullRomBy_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_CardinalSplineBy_prototype), - jsb_cocos2d_CatmullRomBy_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, "CatmullRomBy", 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_CatmullRomBy_class; - p->proto = jsb_cocos2d_CatmullRomBy_prototype; - p->parentProto = jsb_cocos2d_CardinalSplineBy_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ProtectedNode_class; -JSObject *jsb_cocos2d_ProtectedNode_prototype; - -bool js_cocos2dx_ProtectedNode_addProtectedChild(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::ProtectedNode* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_addProtectedChild : Invalid Native Object"); - do { - if (argc == 2) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - int arg1; - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - if (!ok) { ok = true; break; } - cobj->addProtectedChild(arg0, arg1); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cobj->addProtectedChild(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 3) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - int arg1; - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - if (!ok) { ok = true; break; } - int arg2; - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - if (!ok) { ok = true; break; } - cobj->addProtectedChild(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_addProtectedChild : wrong number of arguments"); - return false; -} -bool js_cocos2dx_ProtectedNode_disableCascadeColor(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_disableCascadeColor : Invalid Native Object"); - if (argc == 0) { - cobj->disableCascadeColor(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_disableCascadeColor : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProtectedNode_removeProtectedChildByTag(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_removeProtectedChildByTag : 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_ProtectedNode_removeProtectedChildByTag : Error processing arguments"); - cobj->removeProtectedChildByTag(arg0); - args.rval().setUndefined(); - return true; - } - if (argc == 2) { - int arg0; - bool arg1; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - arg1 = JS::ToBoolean(args.get(1)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProtectedNode_removeProtectedChildByTag : Error processing arguments"); - cobj->removeProtectedChildByTag(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_removeProtectedChildByTag : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProtectedNode_reorderProtectedChild(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_reorderProtectedChild : Invalid Native Object"); - if (argc == 2) { - cocos2d::Node* arg0; - int arg1; - 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::Node*)(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_ProtectedNode_reorderProtectedChild : Error processing arguments"); - cobj->reorderProtectedChild(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_reorderProtectedChild : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup : Error processing arguments"); - cobj->removeAllProtectedChildrenWithCleanup(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProtectedNode_disableCascadeOpacity(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_disableCascadeOpacity : Invalid Native Object"); - if (argc == 0) { - cobj->disableCascadeOpacity(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_disableCascadeOpacity : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProtectedNode_sortAllProtectedChildren(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_sortAllProtectedChildren : Invalid Native Object"); - if (argc == 0) { - cobj->sortAllProtectedChildren(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_sortAllProtectedChildren : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProtectedNode_getProtectedChildByTag(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_getProtectedChildByTag : 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_ProtectedNode_getProtectedChildByTag : Error processing arguments"); - cocos2d::Node* ret = cobj->getProtectedChildByTag(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_getProtectedChildByTag : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProtectedNode_removeProtectedChild(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_removeProtectedChild : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProtectedNode_removeProtectedChild : Error processing arguments"); - cobj->removeProtectedChild(arg0); - args.rval().setUndefined(); - return true; - } - if (argc == 2) { - cocos2d::Node* arg0; - bool arg1; - 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::Node*)(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_ProtectedNode_removeProtectedChild : Error processing arguments"); - cobj->removeProtectedChild(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_removeProtectedChild : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProtectedNode_removeAllProtectedChildren(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_removeAllProtectedChildren : Invalid Native Object"); - if (argc == 0) { - cobj->removeAllProtectedChildren(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_removeAllProtectedChildren : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProtectedNode_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ProtectedNode* ret = cocos2d::ProtectedNode::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ProtectedNode*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ProtectedNode_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ProtectedNode_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ProtectedNode* cobj = new (std::nothrow) cocos2d::ProtectedNode(); - 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::ProtectedNode"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_ProtectedNode_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ProtectedNode)", obj); -} - -void js_register_cocos2dx_ProtectedNode(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ProtectedNode_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ProtectedNode_class->name = "ProtectedNode"; - jsb_cocos2d_ProtectedNode_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ProtectedNode_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ProtectedNode_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ProtectedNode_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ProtectedNode_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ProtectedNode_class->resolve = JS_ResolveStub; - jsb_cocos2d_ProtectedNode_class->convert = JS_ConvertStub; - jsb_cocos2d_ProtectedNode_class->finalize = js_cocos2d_ProtectedNode_finalize; - jsb_cocos2d_ProtectedNode_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("addProtectedChild", js_cocos2dx_ProtectedNode_addProtectedChild, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("disableCascadeColor", js_cocos2dx_ProtectedNode_disableCascadeColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeProtectedChildByTag", js_cocos2dx_ProtectedNode_removeProtectedChildByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("reorderProtectedChild", js_cocos2dx_ProtectedNode_reorderProtectedChild, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllProtectedChildrenWithCleanup", js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("disableCascadeOpacity", js_cocos2dx_ProtectedNode_disableCascadeOpacity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("sortAllProtectedChildren", js_cocos2dx_ProtectedNode_sortAllProtectedChildren, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getProtectedChildByTag", js_cocos2dx_ProtectedNode_getProtectedChildByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeProtectedChild", js_cocos2dx_ProtectedNode_removeProtectedChild, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllProtectedChildren", js_cocos2dx_ProtectedNode_removeAllProtectedChildren, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ProtectedNode_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ProtectedNode_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_ProtectedNode_class, - js_cocos2dx_ProtectedNode_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, "ProtectedNode", 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_ProtectedNode_class; - p->proto = jsb_cocos2d_ProtectedNode_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - JSClass *jsb_cocos2d_GLProgramState_class; JSObject *jsb_cocos2d_GLProgramState_prototype; @@ -32208,18 +32069,18 @@ bool js_cocos2dx_GLProgramState_setUniformVec2v(JSContext *cx, uint32_t argc, js int arg0; ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); if (!ok) { ok = true; break; } - const cocos2d::Vec2* arg1; - 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 = (const cocos2d::Vec2*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); + ssize_t arg1; + ok &= jsval_to_ssize(cx, args.get(1), &arg1); if (!ok) { ok = true; break; } - ssize_t arg2; - ok &= jsval_to_ssize(cx, args.get(2), &arg2); + const cocos2d::Vec2* arg2; + do { + if (!args.get(2).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(2).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg2 = (const cocos2d::Vec2*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg2, cx, false, "Invalid Native Object"); + } while (0); if (!ok) { ok = true; break; } cobj->setUniformVec2v(arg0, arg1, arg2); args.rval().setUndefined(); @@ -32232,18 +32093,18 @@ bool js_cocos2dx_GLProgramState_setUniformVec2v(JSContext *cx, uint32_t argc, js std::string arg0; ok &= jsval_to_std_string(cx, args.get(0), &arg0); if (!ok) { ok = true; break; } - const cocos2d::Vec2* arg1; - 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 = (const cocos2d::Vec2*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); + ssize_t arg1; + ok &= jsval_to_ssize(cx, args.get(1), &arg1); if (!ok) { ok = true; break; } - ssize_t arg2; - ok &= jsval_to_ssize(cx, args.get(2), &arg2); + const cocos2d::Vec2* arg2; + do { + if (!args.get(2).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(2).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg2 = (const cocos2d::Vec2*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg2, cx, false, "Invalid Native Object"); + } while (0); if (!ok) { ok = true; break; } cobj->setUniformVec2v(arg0, arg1, arg2); args.rval().setUndefined(); @@ -32365,13 +32226,13 @@ bool js_cocos2dx_GLProgramState_setUniformFloatv(JSContext *cx, uint32_t argc, j int arg0; ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); if (!ok) { ok = true; break; } - const float* arg1; + ssize_t arg1; + ok &= jsval_to_ssize(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + const float* arg2; #pragma warning NO CONVERSION TO NATIVE FOR float* ok = false; if (!ok) { ok = true; break; } - ssize_t arg2; - ok &= jsval_to_ssize(cx, args.get(2), &arg2); - if (!ok) { ok = true; break; } cobj->setUniformFloatv(arg0, arg1, arg2); args.rval().setUndefined(); return true; @@ -32383,13 +32244,13 @@ bool js_cocos2dx_GLProgramState_setUniformFloatv(JSContext *cx, uint32_t argc, j std::string arg0; ok &= jsval_to_std_string(cx, args.get(0), &arg0); if (!ok) { ok = true; break; } - const float* arg1; + ssize_t arg1; + ok &= jsval_to_ssize(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + const float* arg2; #pragma warning NO CONVERSION TO NATIVE FOR float* ok = false; if (!ok) { ok = true; break; } - ssize_t arg2; - ok &= jsval_to_ssize(cx, args.get(2), &arg2); - if (!ok) { ok = true; break; } cobj->setUniformFloatv(arg0, arg1, arg2); args.rval().setUndefined(); return true; @@ -32624,18 +32485,18 @@ bool js_cocos2dx_GLProgramState_setUniformVec3v(JSContext *cx, uint32_t argc, js int arg0; ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); if (!ok) { ok = true; break; } - const cocos2d::Vec3* arg1; - 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 = (const cocos2d::Vec3*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); + ssize_t arg1; + ok &= jsval_to_ssize(cx, args.get(1), &arg1); if (!ok) { ok = true; break; } - ssize_t arg2; - ok &= jsval_to_ssize(cx, args.get(2), &arg2); + const cocos2d::Vec3* arg2; + do { + if (!args.get(2).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(2).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg2 = (const cocos2d::Vec3*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg2, cx, false, "Invalid Native Object"); + } while (0); if (!ok) { ok = true; break; } cobj->setUniformVec3v(arg0, arg1, arg2); args.rval().setUndefined(); @@ -32648,18 +32509,18 @@ bool js_cocos2dx_GLProgramState_setUniformVec3v(JSContext *cx, uint32_t argc, js std::string arg0; ok &= jsval_to_std_string(cx, args.get(0), &arg0); if (!ok) { ok = true; break; } - const cocos2d::Vec3* arg1; - 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 = (const cocos2d::Vec3*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); + ssize_t arg1; + ok &= jsval_to_ssize(cx, args.get(1), &arg1); if (!ok) { ok = true; break; } - ssize_t arg2; - ok &= jsval_to_ssize(cx, args.get(2), &arg2); + const cocos2d::Vec3* arg2; + do { + if (!args.get(2).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(2).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg2 = (const cocos2d::Vec3*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg2, cx, false, "Invalid Native Object"); + } while (0); if (!ok) { ok = true; break; } cobj->setUniformVec3v(arg0, arg1, arg2); args.rval().setUndefined(); @@ -33286,6 +33147,304 @@ void js_register_cocos2dx_AtlasNode(JSContext *cx, JS::HandleObject global) { } } +JSClass *jsb_cocos2d_ClippingNode_class; +JSObject *jsb_cocos2d_ClippingNode_prototype; + +bool js_cocos2dx_ClippingNode_hasContent(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_hasContent : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->hasContent(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ClippingNode_hasContent : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ClippingNode_setInverted(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_setInverted : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ClippingNode_setInverted : Error processing arguments"); + cobj->setInverted(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ClippingNode_setInverted : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ClippingNode_setStencil(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_setStencil : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ClippingNode_setStencil : Error processing arguments"); + cobj->setStencil(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ClippingNode_setStencil : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ClippingNode_getAlphaThreshold(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_getAlphaThreshold : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getAlphaThreshold(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ClippingNode_getAlphaThreshold : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ClippingNode_getStencil(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_getStencil : Invalid Native Object"); + if (argc == 0) { + cocos2d::Node* ret = cobj->getStencil(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ClippingNode_getStencil : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ClippingNode_setAlphaThreshold(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_setAlphaThreshold : 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_ClippingNode_setAlphaThreshold : Error processing arguments"); + cobj->setAlphaThreshold(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ClippingNode_setAlphaThreshold : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ClippingNode_isInverted(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_isInverted : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isInverted(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ClippingNode_isInverted : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ClippingNode_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::ClippingNode* ret = cocos2d::ClippingNode::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ClippingNode*)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::ClippingNode* ret = cocos2d::ClippingNode::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ClippingNode*)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_ClippingNode_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_ClippingNode_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ClippingNode* cobj = new (std::nothrow) cocos2d::ClippingNode(); + 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::ClippingNode"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_ClippingNode_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ClippingNode)", obj); +} + +void js_register_cocos2dx_ClippingNode(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ClippingNode_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ClippingNode_class->name = "ClippingNode"; + jsb_cocos2d_ClippingNode_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ClippingNode_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ClippingNode_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ClippingNode_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ClippingNode_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ClippingNode_class->resolve = JS_ResolveStub; + jsb_cocos2d_ClippingNode_class->convert = JS_ConvertStub; + jsb_cocos2d_ClippingNode_class->finalize = js_cocos2d_ClippingNode_finalize; + jsb_cocos2d_ClippingNode_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("hasContent", js_cocos2dx_ClippingNode_hasContent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setInverted", js_cocos2dx_ClippingNode_setInverted, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStencil", js_cocos2dx_ClippingNode_setStencil, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAlphaThreshold", js_cocos2dx_ClippingNode_getAlphaThreshold, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStencil", js_cocos2dx_ClippingNode_getStencil, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAlphaThreshold", js_cocos2dx_ClippingNode_setAlphaThreshold, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isInverted", js_cocos2dx_ClippingNode_isInverted, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ClippingNode_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ClippingNode_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_ClippingNode_class, + js_cocos2dx_ClippingNode_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, "ClippingNode", 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_ClippingNode_class; + p->proto = jsb_cocos2d_ClippingNode_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_DrawNode_class; JSObject *jsb_cocos2d_DrawNode_prototype; @@ -34149,1231 +34308,6 @@ void js_register_cocos2dx_DrawNode(JSContext *cx, JS::HandleObject global) { } } -JSClass *jsb_cocos2d_LabelAtlas_class; -JSObject *jsb_cocos2d_LabelAtlas_prototype; - -bool js_cocos2dx_LabelAtlas_setString(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::LabelAtlas* cobj = (cocos2d::LabelAtlas *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelAtlas_setString : 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_LabelAtlas_setString : Error processing arguments"); - cobj->setString(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelAtlas_setString : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelAtlas_initWithString(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::LabelAtlas* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::LabelAtlas *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelAtlas_initWithString : Invalid Native Object"); - do { - if (argc == 2) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithString(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - do { - if (argc == 5) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - int arg2; - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - if (!ok) { ok = true; break; } - int arg3; - ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); - if (!ok) { ok = true; break; } - int arg4; - ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - do { - if (argc == 5) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cocos2d::Texture2D* arg1; - 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - int arg2; - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - if (!ok) { ok = true; break; } - int arg3; - ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); - if (!ok) { ok = true; break; } - int arg4; - ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_LabelAtlas_initWithString : wrong number of arguments"); - return false; -} -bool js_cocos2dx_LabelAtlas_getString(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::LabelAtlas* cobj = (cocos2d::LabelAtlas *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelAtlas_getString : Invalid Native Object"); - if (argc == 0) { - const std::string& ret = cobj->getString(); - jsval jsret = JSVAL_NULL; - jsret = std_string_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelAtlas_getString : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelAtlas_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - do { - if (argc == 5) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - int arg2; - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - if (!ok) { ok = true; break; } - int arg3; - ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); - if (!ok) { ok = true; break; } - int arg4; - ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); - if (!ok) { ok = true; break; } - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelAtlas*)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::LabelAtlas* ret = cocos2d::LabelAtlas::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelAtlas*)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) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelAtlas*)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_LabelAtlas_create : wrong number of arguments"); - return false; -} -bool js_cocos2dx_LabelAtlas_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::LabelAtlas* cobj = new (std::nothrow) cocos2d::LabelAtlas(); - 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::LabelAtlas"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_AtlasNode_prototype; - -void js_cocos2d_LabelAtlas_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (LabelAtlas)", obj); -} - -static bool js_cocos2d_LabelAtlas_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::LabelAtlas *nobj = new (std::nothrow) cocos2d::LabelAtlas(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::LabelAtlas"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_LabelAtlas(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_LabelAtlas_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_LabelAtlas_class->name = "LabelAtlas"; - jsb_cocos2d_LabelAtlas_class->addProperty = JS_PropertyStub; - jsb_cocos2d_LabelAtlas_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_LabelAtlas_class->getProperty = JS_PropertyStub; - jsb_cocos2d_LabelAtlas_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_LabelAtlas_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_LabelAtlas_class->resolve = JS_ResolveStub; - jsb_cocos2d_LabelAtlas_class->convert = JS_ConvertStub; - jsb_cocos2d_LabelAtlas_class->finalize = js_cocos2d_LabelAtlas_finalize; - jsb_cocos2d_LabelAtlas_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("setString", js_cocos2dx_LabelAtlas_setString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithString", js_cocos2dx_LabelAtlas_initWithString, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getString", js_cocos2dx_LabelAtlas_getString, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_LabelAtlas_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("_create", js_cocos2dx_LabelAtlas_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_LabelAtlas_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_AtlasNode_prototype), - jsb_cocos2d_LabelAtlas_class, - js_cocos2dx_LabelAtlas_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, "LabelAtlas", 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_LabelAtlas_class; - p->proto = jsb_cocos2d_LabelAtlas_prototype; - p->parentProto = jsb_cocos2d_AtlasNode_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_LabelTTF_class; -JSObject *jsb_cocos2d_LabelTTF_prototype; - -bool js_cocos2dx_LabelTTF_enableShadow(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_enableShadow : Invalid Native Object"); - if (argc == 3) { - cocos2d::Size arg0; - double arg1; - double arg2; - ok &= jsval_to_ccsize(cx, args.get(0), &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_LabelTTF_enableShadow : Error processing arguments"); - cobj->enableShadow(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - if (argc == 4) { - cocos2d::Size arg0; - double arg1; - double arg2; - bool arg3; - ok &= jsval_to_ccsize(cx, args.get(0), &arg0); - ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - arg3 = JS::ToBoolean(args.get(3)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_enableShadow : Error processing arguments"); - cobj->enableShadow(arg0, arg1, arg2, arg3); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_enableShadow : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} -bool js_cocos2dx_LabelTTF_setDimensions(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setDimensions : Invalid Native Object"); - if (argc == 1) { - cocos2d::Size arg0; - ok &= jsval_to_ccsize(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setDimensions : Error processing arguments"); - cobj->setDimensions(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setDimensions : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_getFontSize(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getFontSize : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getFontSize(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_getFontSize : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_getString(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getString : Invalid Native Object"); - if (argc == 0) { - const std::string& ret = cobj->getString(); - jsval jsret = JSVAL_NULL; - jsret = std_string_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_getString : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_setFlippedY(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFlippedY : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setFlippedY : Error processing arguments"); - cobj->setFlippedY(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFlippedY : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_setFlippedX(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFlippedX : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setFlippedX : Error processing arguments"); - cobj->setFlippedX(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFlippedX : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_setTextDefinition(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setTextDefinition : Invalid Native Object"); - if (argc == 1) { - cocos2d::FontDefinition arg0; - ok &= jsval_to_FontDefinition(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setTextDefinition : Error processing arguments"); - cobj->setTextDefinition(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setTextDefinition : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_setFontName(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFontName : 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_LabelTTF_setFontName : Error processing arguments"); - cobj->setFontName(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFontName : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_getHorizontalAlignment(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getHorizontalAlignment : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getHorizontalAlignment(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_getHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_initWithStringAndTextDefinition(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_initWithStringAndTextDefinition : Invalid Native Object"); - if (argc == 2) { - std::string arg0; - cocos2d::FontDefinition arg1; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_FontDefinition(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithStringAndTextDefinition : Error processing arguments"); - bool ret = cobj->initWithStringAndTextDefinition(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_initWithStringAndTextDefinition : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_LabelTTF_setString(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setString : 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_LabelTTF_setString : Error processing arguments"); - cobj->setString(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setString : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_initWithString(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_initWithString : Invalid Native Object"); - if (argc == 3) { - std::string arg0; - std::string arg1; - double arg2; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithString : Error processing arguments"); - bool ret = cobj->initWithString(arg0, arg1, arg2); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - if (argc == 4) { - std::string arg0; - std::string arg1; - double arg2; - cocos2d::Size arg3; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - ok &= jsval_to_ccsize(cx, args.get(3), &arg3); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithString : Error processing arguments"); - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - if (argc == 5) { - std::string arg0; - std::string arg1; - double arg2; - cocos2d::Size arg3; - cocos2d::TextHAlignment arg4; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - ok &= jsval_to_ccsize(cx, args.get(3), &arg3); - ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithString : Error processing arguments"); - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - if (argc == 6) { - std::string arg0; - std::string arg1; - double arg2; - cocos2d::Size arg3; - cocos2d::TextHAlignment arg4; - cocos2d::TextVAlignment arg5; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - ok &= jsval_to_ccsize(cx, args.get(3), &arg3); - ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); - ok &= jsval_to_int32(cx, args.get(5), (int32_t *)&arg5); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithString : Error processing arguments"); - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4, arg5); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_initWithString : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} -bool js_cocos2dx_LabelTTF_setFontFillColor(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFontFillColor : Invalid Native Object"); - if (argc == 1) { - cocos2d::Color3B arg0; - ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setFontFillColor : Error processing arguments"); - cobj->setFontFillColor(arg0); - args.rval().setUndefined(); - return true; - } - if (argc == 2) { - cocos2d::Color3B arg0; - bool arg1; - ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); - arg1 = JS::ToBoolean(args.get(1)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setFontFillColor : Error processing arguments"); - cobj->setFontFillColor(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFontFillColor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_getBlendFunc(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getBlendFunc : Invalid Native Object"); - if (argc == 0) { - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - jsval jsret = JSVAL_NULL; - jsret = blendfunc_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_enableStroke(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_enableStroke : Invalid Native Object"); - if (argc == 2) { - cocos2d::Color3B arg0; - double arg1; - ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); - ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_enableStroke : Error processing arguments"); - cobj->enableStroke(arg0, arg1); - args.rval().setUndefined(); - return true; - } - if (argc == 3) { - cocos2d::Color3B arg0; - double arg1; - bool arg2; - ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); - ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); - arg2 = JS::ToBoolean(args.get(2)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_enableStroke : Error processing arguments"); - cobj->enableStroke(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_enableStroke : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_LabelTTF_getDimensions(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getDimensions : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Size& ret = cobj->getDimensions(); - jsval jsret = JSVAL_NULL; - jsret = ccsize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_getDimensions : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_setVerticalAlignment(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setVerticalAlignment : Invalid Native Object"); - if (argc == 1) { - cocos2d::TextVAlignment arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setVerticalAlignment : Error processing arguments"); - cobj->setVerticalAlignment(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setVerticalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_setFontSize(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFontSize : 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_LabelTTF_setFontSize : Error processing arguments"); - cobj->setFontSize(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFontSize : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_getVerticalAlignment(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getVerticalAlignment : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getVerticalAlignment(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_getVerticalAlignment : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_getTextDefinition(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getTextDefinition : Invalid Native Object"); - if (argc == 0) { - const cocos2d::FontDefinition& ret = cobj->getTextDefinition(); - jsval jsret = JSVAL_NULL; - jsret = FontDefinition_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_getTextDefinition : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_setBlendFunc(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setBlendFunc : Invalid Native Object"); - if (argc == 1) { - cocos2d::BlendFunc arg0; - ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setBlendFunc : Error processing arguments"); - cobj->setBlendFunc(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_getFontName(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getFontName : Invalid Native Object"); - if (argc == 0) { - const std::string& ret = cobj->getFontName(); - jsval jsret = JSVAL_NULL; - jsret = std_string_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_getFontName : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_setHorizontalAlignment(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setHorizontalAlignment : Invalid Native Object"); - if (argc == 1) { - cocos2d::TextHAlignment arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setHorizontalAlignment : Error processing arguments"); - cobj->setHorizontalAlignment(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_setHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_LabelTTF_disableShadow(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_disableShadow : Invalid Native Object"); - if (argc == 0) { - cobj->disableShadow(); - args.rval().setUndefined(); - return true; - } - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_disableShadow : Error processing arguments"); - cobj->disableShadow(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_disableShadow : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_disableStroke(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_disableStroke : Invalid Native Object"); - if (argc == 0) { - cobj->disableStroke(); - args.rval().setUndefined(); - return true; - } - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_disableStroke : Error processing arguments"); - cobj->disableStroke(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_LabelTTF_disableStroke : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_LabelTTF_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - do { - if (argc == 0) { - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)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) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)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) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - cocos2d::Size arg3; - ok &= jsval_to_ccsize(cx, args.get(3), &arg3); - if (!ok) { ok = true; break; } - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)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) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - cocos2d::Size arg3; - ok &= jsval_to_ccsize(cx, args.get(3), &arg3); - if (!ok) { ok = true; break; } - cocos2d::TextHAlignment arg4; - ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); - if (!ok) { ok = true; break; } - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)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) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - cocos2d::Size arg3; - ok &= jsval_to_ccsize(cx, args.get(3), &arg3); - if (!ok) { ok = true; break; } - cocos2d::TextHAlignment arg4; - ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); - if (!ok) { ok = true; break; } - cocos2d::TextVAlignment arg5; - ok &= jsval_to_int32(cx, args.get(5), (int32_t *)&arg5); - if (!ok) { ok = true; break; } - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::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::LabelTTF*)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_LabelTTF_create : wrong number of arguments"); - return false; -} -bool js_cocos2dx_LabelTTF_createWithFontDefinition(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 2) { - std::string arg0; - cocos2d::FontDefinition arg1; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_FontDefinition(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_createWithFontDefinition : Error processing arguments"); - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::createWithFontDefinition(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_LabelTTF_createWithFontDefinition : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_LabelTTF_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::LabelTTF* cobj = new (std::nothrow) cocos2d::LabelTTF(); - 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::LabelTTF"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_LabelTTF_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (LabelTTF)", obj); -} - -static bool js_cocos2d_LabelTTF_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::LabelTTF *nobj = new (std::nothrow) cocos2d::LabelTTF(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::LabelTTF"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_LabelTTF(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_LabelTTF_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_LabelTTF_class->name = "LabelTTF"; - jsb_cocos2d_LabelTTF_class->addProperty = JS_PropertyStub; - jsb_cocos2d_LabelTTF_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_LabelTTF_class->getProperty = JS_PropertyStub; - jsb_cocos2d_LabelTTF_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_LabelTTF_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_LabelTTF_class->resolve = JS_ResolveStub; - jsb_cocos2d_LabelTTF_class->convert = JS_ConvertStub; - jsb_cocos2d_LabelTTF_class->finalize = js_cocos2d_LabelTTF_finalize; - jsb_cocos2d_LabelTTF_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("enableShadow", js_cocos2dx_LabelTTF_enableShadow, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDimensions", js_cocos2dx_LabelTTF_setDimensions, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFontSize", js_cocos2dx_LabelTTF_getFontSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getString", js_cocos2dx_LabelTTF_getString, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFlippedY", js_cocos2dx_LabelTTF_setFlippedY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFlippedX", js_cocos2dx_LabelTTF_setFlippedX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTextDefinition", js_cocos2dx_LabelTTF_setTextDefinition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFontName", js_cocos2dx_LabelTTF_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getHorizontalAlignment", js_cocos2dx_LabelTTF_getHorizontalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithStringAndTextDefinition", js_cocos2dx_LabelTTF_initWithStringAndTextDefinition, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setString", js_cocos2dx_LabelTTF_setString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithString", js_cocos2dx_LabelTTF_initWithString, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFontFillColor", js_cocos2dx_LabelTTF_setFontFillColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBlendFunc", js_cocos2dx_LabelTTF_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("enableStroke", js_cocos2dx_LabelTTF_enableStroke, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDimensions", js_cocos2dx_LabelTTF_getDimensions, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setVerticalAlignment", js_cocos2dx_LabelTTF_setVerticalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFontSize", js_cocos2dx_LabelTTF_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVerticalAlignment", js_cocos2dx_LabelTTF_getVerticalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTextDefinition", js_cocos2dx_LabelTTF_getTextDefinition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBlendFunc", js_cocos2dx_LabelTTF_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFontName", js_cocos2dx_LabelTTF_getFontName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setHorizontalAlignment", js_cocos2dx_LabelTTF_setHorizontalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("disableShadow", js_cocos2dx_LabelTTF_disableShadow, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("disableStroke", js_cocos2dx_LabelTTF_disableStroke, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_LabelTTF_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_LabelTTF_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithFontDefinition", js_cocos2dx_LabelTTF_createWithFontDefinition, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_LabelTTF_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_LabelTTF_class, - js_cocos2dx_LabelTTF_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, "LabelTTF", 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_LabelTTF_class; - p->proto = jsb_cocos2d_LabelTTF_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - JSClass *jsb_cocos2d_SpriteBatchNode_class; JSObject *jsb_cocos2d_SpriteBatchNode_prototype; @@ -37549,6 +36483,324 @@ void js_register_cocos2dx_Label(JSContext *cx, JS::HandleObject global) { } } +JSClass *jsb_cocos2d_LabelAtlas_class; +JSObject *jsb_cocos2d_LabelAtlas_prototype; + +bool js_cocos2dx_LabelAtlas_setString(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::LabelAtlas* cobj = (cocos2d::LabelAtlas *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelAtlas_setString : 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_LabelAtlas_setString : Error processing arguments"); + cobj->setString(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelAtlas_setString : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelAtlas_initWithString(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::LabelAtlas* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::LabelAtlas *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelAtlas_initWithString : Invalid Native Object"); + do { + if (argc == 2) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithString(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 5) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + int arg2; + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + if (!ok) { ok = true; break; } + int arg3; + ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); + if (!ok) { ok = true; break; } + int arg4; + ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 5) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cocos2d::Texture2D* arg1; + 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + int arg2; + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + if (!ok) { ok = true; break; } + int arg3; + ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); + if (!ok) { ok = true; break; } + int arg4; + ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_LabelAtlas_initWithString : wrong number of arguments"); + return false; +} +bool js_cocos2dx_LabelAtlas_getString(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::LabelAtlas* cobj = (cocos2d::LabelAtlas *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelAtlas_getString : Invalid Native Object"); + if (argc == 0) { + const std::string& ret = cobj->getString(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelAtlas_getString : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelAtlas_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 5) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + int arg2; + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + if (!ok) { ok = true; break; } + int arg3; + ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); + if (!ok) { ok = true; break; } + int arg4; + ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); + if (!ok) { ok = true; break; } + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelAtlas*)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::LabelAtlas* ret = cocos2d::LabelAtlas::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelAtlas*)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) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelAtlas*)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_LabelAtlas_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_LabelAtlas_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::LabelAtlas* cobj = new (std::nothrow) cocos2d::LabelAtlas(); + 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::LabelAtlas"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_AtlasNode_prototype; + +void js_cocos2d_LabelAtlas_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (LabelAtlas)", obj); +} + +static bool js_cocos2d_LabelAtlas_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::LabelAtlas *nobj = new (std::nothrow) cocos2d::LabelAtlas(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::LabelAtlas"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_LabelAtlas(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_LabelAtlas_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_LabelAtlas_class->name = "LabelAtlas"; + jsb_cocos2d_LabelAtlas_class->addProperty = JS_PropertyStub; + jsb_cocos2d_LabelAtlas_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_LabelAtlas_class->getProperty = JS_PropertyStub; + jsb_cocos2d_LabelAtlas_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_LabelAtlas_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_LabelAtlas_class->resolve = JS_ResolveStub; + jsb_cocos2d_LabelAtlas_class->convert = JS_ConvertStub; + jsb_cocos2d_LabelAtlas_class->finalize = js_cocos2d_LabelAtlas_finalize; + jsb_cocos2d_LabelAtlas_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("setString", js_cocos2dx_LabelAtlas_setString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithString", js_cocos2dx_LabelAtlas_initWithString, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getString", js_cocos2dx_LabelAtlas_getString, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_LabelAtlas_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("_create", js_cocos2dx_LabelAtlas_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_LabelAtlas_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_AtlasNode_prototype), + jsb_cocos2d_LabelAtlas_class, + js_cocos2dx_LabelAtlas_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, "LabelAtlas", 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_LabelAtlas_class; + p->proto = jsb_cocos2d_LabelAtlas_prototype; + p->parentProto = jsb_cocos2d_AtlasNode_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_LabelBMFont_class; JSObject *jsb_cocos2d_LabelBMFont_prototype; @@ -38087,6 +37339,913 @@ void js_register_cocos2dx_LabelBMFont(JSContext *cx, JS::HandleObject global) { } } +JSClass *jsb_cocos2d_LabelTTF_class; +JSObject *jsb_cocos2d_LabelTTF_prototype; + +bool js_cocos2dx_LabelTTF_enableShadow(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_enableShadow : Invalid Native Object"); + if (argc == 3) { + cocos2d::Size arg0; + double arg1; + double arg2; + ok &= jsval_to_ccsize(cx, args.get(0), &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_LabelTTF_enableShadow : Error processing arguments"); + cobj->enableShadow(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + if (argc == 4) { + cocos2d::Size arg0; + double arg1; + double arg2; + bool arg3; + ok &= jsval_to_ccsize(cx, args.get(0), &arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + arg3 = JS::ToBoolean(args.get(3)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_enableShadow : Error processing arguments"); + cobj->enableShadow(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_enableShadow : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_LabelTTF_setDimensions(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setDimensions : Invalid Native Object"); + if (argc == 1) { + cocos2d::Size arg0; + ok &= jsval_to_ccsize(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setDimensions : Error processing arguments"); + cobj->setDimensions(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setDimensions : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_getFontSize(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getFontSize : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getFontSize(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_getFontSize : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_getString(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getString : Invalid Native Object"); + if (argc == 0) { + const std::string& ret = cobj->getString(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_getString : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_setFlippedY(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFlippedY : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setFlippedY : Error processing arguments"); + cobj->setFlippedY(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFlippedY : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_setFlippedX(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFlippedX : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setFlippedX : Error processing arguments"); + cobj->setFlippedX(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFlippedX : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_setTextDefinition(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setTextDefinition : Invalid Native Object"); + if (argc == 1) { + cocos2d::FontDefinition arg0; + ok &= jsval_to_FontDefinition(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setTextDefinition : Error processing arguments"); + cobj->setTextDefinition(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setTextDefinition : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_setFontName(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFontName : 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_LabelTTF_setFontName : Error processing arguments"); + cobj->setFontName(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFontName : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_getHorizontalAlignment(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getHorizontalAlignment : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getHorizontalAlignment(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_getHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_initWithStringAndTextDefinition(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_initWithStringAndTextDefinition : Invalid Native Object"); + if (argc == 2) { + std::string arg0; + cocos2d::FontDefinition arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_FontDefinition(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithStringAndTextDefinition : Error processing arguments"); + bool ret = cobj->initWithStringAndTextDefinition(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_initWithStringAndTextDefinition : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_LabelTTF_setString(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setString : 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_LabelTTF_setString : Error processing arguments"); + cobj->setString(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setString : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_initWithString(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_initWithString : Invalid Native Object"); + if (argc == 3) { + std::string arg0; + std::string arg1; + double arg2; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithString : Error processing arguments"); + bool ret = cobj->initWithString(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + if (argc == 4) { + std::string arg0; + std::string arg1; + double arg2; + cocos2d::Size arg3; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + ok &= jsval_to_ccsize(cx, args.get(3), &arg3); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithString : Error processing arguments"); + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + if (argc == 5) { + std::string arg0; + std::string arg1; + double arg2; + cocos2d::Size arg3; + cocos2d::TextHAlignment arg4; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + ok &= jsval_to_ccsize(cx, args.get(3), &arg3); + ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithString : Error processing arguments"); + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + if (argc == 6) { + std::string arg0; + std::string arg1; + double arg2; + cocos2d::Size arg3; + cocos2d::TextHAlignment arg4; + cocos2d::TextVAlignment arg5; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + ok &= jsval_to_ccsize(cx, args.get(3), &arg3); + ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); + ok &= jsval_to_int32(cx, args.get(5), (int32_t *)&arg5); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_initWithString : Error processing arguments"); + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4, arg5); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_initWithString : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_LabelTTF_setFontFillColor(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFontFillColor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color3B arg0; + ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setFontFillColor : Error processing arguments"); + cobj->setFontFillColor(arg0); + args.rval().setUndefined(); + return true; + } + if (argc == 2) { + cocos2d::Color3B arg0; + bool arg1; + ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); + arg1 = JS::ToBoolean(args.get(1)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setFontFillColor : Error processing arguments"); + cobj->setFontFillColor(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFontFillColor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_getBlendFunc(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getBlendFunc : Invalid Native Object"); + if (argc == 0) { + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + jsval jsret = JSVAL_NULL; + jsret = blendfunc_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_enableStroke(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_enableStroke : Invalid Native Object"); + if (argc == 2) { + cocos2d::Color3B arg0; + double arg1; + ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_enableStroke : Error processing arguments"); + cobj->enableStroke(arg0, arg1); + args.rval().setUndefined(); + return true; + } + if (argc == 3) { + cocos2d::Color3B arg0; + double arg1; + bool arg2; + ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + arg2 = JS::ToBoolean(args.get(2)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_enableStroke : Error processing arguments"); + cobj->enableStroke(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_enableStroke : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_LabelTTF_getDimensions(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getDimensions : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Size& ret = cobj->getDimensions(); + jsval jsret = JSVAL_NULL; + jsret = ccsize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_getDimensions : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_setVerticalAlignment(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setVerticalAlignment : Invalid Native Object"); + if (argc == 1) { + cocos2d::TextVAlignment arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setVerticalAlignment : Error processing arguments"); + cobj->setVerticalAlignment(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setVerticalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_setFontSize(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setFontSize : 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_LabelTTF_setFontSize : Error processing arguments"); + cobj->setFontSize(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setFontSize : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_getVerticalAlignment(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getVerticalAlignment : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getVerticalAlignment(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_getVerticalAlignment : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_getTextDefinition(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getTextDefinition : Invalid Native Object"); + if (argc == 0) { + const cocos2d::FontDefinition& ret = cobj->getTextDefinition(); + jsval jsret = JSVAL_NULL; + jsret = FontDefinition_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_getTextDefinition : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_setBlendFunc(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setBlendFunc : Invalid Native Object"); + if (argc == 1) { + cocos2d::BlendFunc arg0; + ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setBlendFunc : Error processing arguments"); + cobj->setBlendFunc(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_getFontName(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_getFontName : Invalid Native Object"); + if (argc == 0) { + const std::string& ret = cobj->getFontName(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_getFontName : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_setHorizontalAlignment(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_setHorizontalAlignment : Invalid Native Object"); + if (argc == 1) { + cocos2d::TextHAlignment arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_setHorizontalAlignment : Error processing arguments"); + cobj->setHorizontalAlignment(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_setHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_LabelTTF_disableShadow(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_disableShadow : Invalid Native Object"); + if (argc == 0) { + cobj->disableShadow(); + args.rval().setUndefined(); + return true; + } + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_disableShadow : Error processing arguments"); + cobj->disableShadow(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_disableShadow : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_disableStroke(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::LabelTTF* cobj = (cocos2d::LabelTTF *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelTTF_disableStroke : Invalid Native Object"); + if (argc == 0) { + cobj->disableStroke(); + args.rval().setUndefined(); + return true; + } + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_disableStroke : Error processing arguments"); + cobj->disableStroke(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_LabelTTF_disableStroke : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_LabelTTF_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 0) { + cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)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) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)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) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + cocos2d::Size arg3; + ok &= jsval_to_ccsize(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)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) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + cocos2d::Size arg3; + ok &= jsval_to_ccsize(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::TextHAlignment arg4; + ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); + if (!ok) { ok = true; break; } + cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)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) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + cocos2d::Size arg3; + ok &= jsval_to_ccsize(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::TextHAlignment arg4; + ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); + if (!ok) { ok = true; break; } + cocos2d::TextVAlignment arg5; + ok &= jsval_to_int32(cx, args.get(5), (int32_t *)&arg5); + if (!ok) { ok = true; break; } + cocos2d::LabelTTF* ret = cocos2d::LabelTTF::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::LabelTTF*)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_LabelTTF_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_LabelTTF_createWithFontDefinition(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 2) { + std::string arg0; + cocos2d::FontDefinition arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_FontDefinition(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_LabelTTF_createWithFontDefinition : Error processing arguments"); + cocos2d::LabelTTF* ret = cocos2d::LabelTTF::createWithFontDefinition(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::LabelTTF*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_LabelTTF_createWithFontDefinition : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_LabelTTF_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::LabelTTF* cobj = new (std::nothrow) cocos2d::LabelTTF(); + 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::LabelTTF"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_LabelTTF_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (LabelTTF)", obj); +} + +static bool js_cocos2d_LabelTTF_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::LabelTTF *nobj = new (std::nothrow) cocos2d::LabelTTF(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::LabelTTF"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_LabelTTF(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_LabelTTF_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_LabelTTF_class->name = "LabelTTF"; + jsb_cocos2d_LabelTTF_class->addProperty = JS_PropertyStub; + jsb_cocos2d_LabelTTF_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_LabelTTF_class->getProperty = JS_PropertyStub; + jsb_cocos2d_LabelTTF_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_LabelTTF_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_LabelTTF_class->resolve = JS_ResolveStub; + jsb_cocos2d_LabelTTF_class->convert = JS_ConvertStub; + jsb_cocos2d_LabelTTF_class->finalize = js_cocos2d_LabelTTF_finalize; + jsb_cocos2d_LabelTTF_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("enableShadow", js_cocos2dx_LabelTTF_enableShadow, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDimensions", js_cocos2dx_LabelTTF_setDimensions, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFontSize", js_cocos2dx_LabelTTF_getFontSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getString", js_cocos2dx_LabelTTF_getString, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFlippedY", js_cocos2dx_LabelTTF_setFlippedY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFlippedX", js_cocos2dx_LabelTTF_setFlippedX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTextDefinition", js_cocos2dx_LabelTTF_setTextDefinition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFontName", js_cocos2dx_LabelTTF_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getHorizontalAlignment", js_cocos2dx_LabelTTF_getHorizontalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithStringAndTextDefinition", js_cocos2dx_LabelTTF_initWithStringAndTextDefinition, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setString", js_cocos2dx_LabelTTF_setString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithString", js_cocos2dx_LabelTTF_initWithString, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFontFillColor", js_cocos2dx_LabelTTF_setFontFillColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBlendFunc", js_cocos2dx_LabelTTF_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("enableStroke", js_cocos2dx_LabelTTF_enableStroke, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDimensions", js_cocos2dx_LabelTTF_getDimensions, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setVerticalAlignment", js_cocos2dx_LabelTTF_setVerticalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFontSize", js_cocos2dx_LabelTTF_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVerticalAlignment", js_cocos2dx_LabelTTF_getVerticalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTextDefinition", js_cocos2dx_LabelTTF_getTextDefinition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBlendFunc", js_cocos2dx_LabelTTF_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFontName", js_cocos2dx_LabelTTF_getFontName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setHorizontalAlignment", js_cocos2dx_LabelTTF_setHorizontalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("disableShadow", js_cocos2dx_LabelTTF_disableShadow, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("disableStroke", js_cocos2dx_LabelTTF_disableStroke, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_LabelTTF_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_LabelTTF_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithFontDefinition", js_cocos2dx_LabelTTF_createWithFontDefinition, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_LabelTTF_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_LabelTTF_class, + js_cocos2dx_LabelTTF_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, "LabelTTF", 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_LabelTTF_class; + p->proto = jsb_cocos2d_LabelTTF_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_Layer_class; JSObject *jsb_cocos2d_Layer_prototype; @@ -39342,6 +39501,11179 @@ void js_register_cocos2dx_LayerMultiplex(JSContext *cx, JS::HandleObject global) } } +JSClass *jsb_cocos2d_MenuItem_class; +JSObject *jsb_cocos2d_MenuItem_prototype; + +bool js_cocos2dx_MenuItem_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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_setEnabled : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItem_setEnabled : Error processing arguments"); + cobj->setEnabled(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItem_setEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItem_activate(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_activate : Invalid Native Object"); + if (argc == 0) { + cobj->activate(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItem_activate : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItem_initWithCallback(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_initWithCallback : Invalid Native Object"); + if (argc == 1) { + std::function arg0; + do { + if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(0))); + auto lambda = [=](cocos2d::Ref* larg0) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[1]; + do { + if (larg0) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); + largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + largv[0] = JSVAL_NULL; + } + } while (0); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg0 = lambda; + } + else + { + arg0 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItem_initWithCallback : Error processing arguments"); + bool ret = cobj->initWithCallback(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItem_initWithCallback : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItem_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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_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_MenuItem_isEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItem_selected(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_selected : Invalid Native Object"); + if (argc == 0) { + cobj->selected(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItem_selected : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItem_isSelected(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_isSelected : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isSelected(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItem_isSelected : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItem_unselected(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_unselected : Invalid Native Object"); + if (argc == 0) { + cobj->unselected(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItem_unselected : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItem_rect(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_rect : Invalid Native Object"); + if (argc == 0) { + cocos2d::Rect ret = cobj->rect(); + jsval jsret = JSVAL_NULL; + jsret = ccrect_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItem_rect : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItem_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::MenuItem* cobj = new (std::nothrow) cocos2d::MenuItem(); + 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::MenuItem"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_MenuItem_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (MenuItem)", obj); +} + +static bool js_cocos2d_MenuItem_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::MenuItem *nobj = new (std::nothrow) cocos2d::MenuItem(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItem"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_MenuItem(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_MenuItem_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_MenuItem_class->name = "MenuItem"; + jsb_cocos2d_MenuItem_class->addProperty = JS_PropertyStub; + jsb_cocos2d_MenuItem_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_MenuItem_class->getProperty = JS_PropertyStub; + jsb_cocos2d_MenuItem_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_MenuItem_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_MenuItem_class->resolve = JS_ResolveStub; + jsb_cocos2d_MenuItem_class->convert = JS_ConvertStub; + jsb_cocos2d_MenuItem_class->finalize = js_cocos2d_MenuItem_finalize; + jsb_cocos2d_MenuItem_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_MenuItem_setEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("activate", js_cocos2dx_MenuItem_activate, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithCallback", js_cocos2dx_MenuItem_initWithCallback, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isEnabled", js_cocos2dx_MenuItem_isEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("selected", js_cocos2dx_MenuItem_selected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isSelected", js_cocos2dx_MenuItem_isSelected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("unselected", js_cocos2dx_MenuItem_unselected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("rect", js_cocos2dx_MenuItem_rect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_MenuItem_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_MenuItem_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_MenuItem_class, + js_cocos2dx_MenuItem_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, "MenuItem", 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_MenuItem_class; + p->proto = jsb_cocos2d_MenuItem_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_MenuItemLabel_class; +JSObject *jsb_cocos2d_MenuItemLabel_prototype; + +bool js_cocos2dx_MenuItemLabel_setLabel(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_setLabel : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemLabel_setLabel : Error processing arguments"); + cobj->setLabel(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_setLabel : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemLabel_getDisabledColor(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_getDisabledColor : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Color3B& ret = cobj->getDisabledColor(); + jsval jsret = JSVAL_NULL; + jsret = cccolor3b_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_getDisabledColor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemLabel_setString(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_setString : 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_MenuItemLabel_setString : Error processing arguments"); + cobj->setString(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_setString : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemLabel_initWithLabel(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_initWithLabel : Invalid Native Object"); + if (argc == 2) { + cocos2d::Node* arg0; + std::function arg1; + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + do { + if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(1))); + auto lambda = [=](cocos2d::Ref* larg0) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[1]; + do { + if (larg0) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); + largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + largv[0] = JSVAL_NULL; + } + } while (0); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg1 = lambda; + } + else + { + arg1 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemLabel_initWithLabel : Error processing arguments"); + bool ret = cobj->initWithLabel(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_initWithLabel : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_MenuItemLabel_setDisabledColor(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_setDisabledColor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color3B arg0; + ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemLabel_setDisabledColor : Error processing arguments"); + cobj->setDisabledColor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_setDisabledColor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemLabel_getLabel(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_getLabel : Invalid Native Object"); + if (argc == 0) { + cocos2d::Node* ret = cobj->getLabel(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_getLabel : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemLabel_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::MenuItemLabel* cobj = new (std::nothrow) cocos2d::MenuItemLabel(); + 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::MenuItemLabel"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_MenuItem_prototype; + +void js_cocos2d_MenuItemLabel_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemLabel)", obj); +} + +static bool js_cocos2d_MenuItemLabel_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::MenuItemLabel *nobj = new (std::nothrow) cocos2d::MenuItemLabel(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemLabel"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_MenuItemLabel(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_MenuItemLabel_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_MenuItemLabel_class->name = "MenuItemLabel"; + jsb_cocos2d_MenuItemLabel_class->addProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemLabel_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_MenuItemLabel_class->getProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemLabel_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_MenuItemLabel_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_MenuItemLabel_class->resolve = JS_ResolveStub; + jsb_cocos2d_MenuItemLabel_class->convert = JS_ConvertStub; + jsb_cocos2d_MenuItemLabel_class->finalize = js_cocos2d_MenuItemLabel_finalize; + jsb_cocos2d_MenuItemLabel_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("setLabel", js_cocos2dx_MenuItemLabel_setLabel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDisabledColor", js_cocos2dx_MenuItemLabel_getDisabledColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setString", js_cocos2dx_MenuItemLabel_setString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithLabel", js_cocos2dx_MenuItemLabel_initWithLabel, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDisabledColor", js_cocos2dx_MenuItemLabel_setDisabledColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLabel", js_cocos2dx_MenuItemLabel_getLabel, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_MenuItemLabel_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_MenuItemLabel_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_MenuItem_prototype), + jsb_cocos2d_MenuItemLabel_class, + js_cocos2dx_MenuItemLabel_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, "MenuItemLabel", 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_MenuItemLabel_class; + p->proto = jsb_cocos2d_MenuItemLabel_prototype; + p->parentProto = jsb_cocos2d_MenuItem_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_MenuItemAtlasFont_class; +JSObject *jsb_cocos2d_MenuItemAtlasFont_prototype; + +bool js_cocos2dx_MenuItemAtlasFont_initWithString(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::MenuItemAtlasFont* cobj = (cocos2d::MenuItemAtlasFont *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemAtlasFont_initWithString : Invalid Native Object"); + if (argc == 6) { + std::string arg0; + std::string arg1; + int arg2; + int arg3; + int32_t arg4; + std::function arg5; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); + ok &= jsval_to_int32(cx, args.get(4), &arg4); + do { + if(JS_TypeOfValue(cx, args.get(5)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(5))); + auto lambda = [=](cocos2d::Ref* larg0) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[1]; + do { + if (larg0) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); + largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + largv[0] = JSVAL_NULL; + } + } while (0); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg5 = lambda; + } + else + { + arg5 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemAtlasFont_initWithString : Error processing arguments"); + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4, arg5); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemAtlasFont_initWithString : wrong number of arguments: %d, was expecting %d", argc, 6); + return false; +} +bool js_cocos2dx_MenuItemAtlasFont_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::MenuItemAtlasFont* cobj = new (std::nothrow) cocos2d::MenuItemAtlasFont(); + 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::MenuItemAtlasFont"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_MenuItemLabel_prototype; + +void js_cocos2d_MenuItemAtlasFont_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemAtlasFont)", obj); +} + +static bool js_cocos2d_MenuItemAtlasFont_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::MenuItemAtlasFont *nobj = new (std::nothrow) cocos2d::MenuItemAtlasFont(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemAtlasFont"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_MenuItemAtlasFont(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_MenuItemAtlasFont_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_MenuItemAtlasFont_class->name = "MenuItemAtlasFont"; + jsb_cocos2d_MenuItemAtlasFont_class->addProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemAtlasFont_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_MenuItemAtlasFont_class->getProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemAtlasFont_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_MenuItemAtlasFont_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_MenuItemAtlasFont_class->resolve = JS_ResolveStub; + jsb_cocos2d_MenuItemAtlasFont_class->convert = JS_ConvertStub; + jsb_cocos2d_MenuItemAtlasFont_class->finalize = js_cocos2d_MenuItemAtlasFont_finalize; + jsb_cocos2d_MenuItemAtlasFont_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("initWithString", js_cocos2dx_MenuItemAtlasFont_initWithString, 6, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_MenuItemAtlasFont_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_MenuItemAtlasFont_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_MenuItemLabel_prototype), + jsb_cocos2d_MenuItemAtlasFont_class, + js_cocos2dx_MenuItemAtlasFont_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, "MenuItemAtlasFont", 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_MenuItemAtlasFont_class; + p->proto = jsb_cocos2d_MenuItemAtlasFont_prototype; + p->parentProto = jsb_cocos2d_MenuItemLabel_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_MenuItemFont_class; +JSObject *jsb_cocos2d_MenuItemFont_prototype; + +bool js_cocos2dx_MenuItemFont_setFontNameObj(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_setFontNameObj : 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_MenuItemFont_setFontNameObj : Error processing arguments"); + cobj->setFontNameObj(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemFont_setFontNameObj : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemFont_getFontSizeObj(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_getFontSizeObj : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getFontSizeObj(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemFont_getFontSizeObj : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemFont_setFontSizeObj(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_setFontSizeObj : 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_MenuItemFont_setFontSizeObj : Error processing arguments"); + cobj->setFontSizeObj(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemFont_setFontSizeObj : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemFont_initWithString(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_initWithString : Invalid Native Object"); + if (argc == 2) { + std::string arg0; + std::function arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + do { + if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(1))); + auto lambda = [=](cocos2d::Ref* larg0) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[1]; + do { + if (larg0) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); + largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + largv[0] = JSVAL_NULL; + } + } while (0); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg1 = lambda; + } + else + { + arg1 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemFont_initWithString : Error processing arguments"); + bool ret = cobj->initWithString(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemFont_initWithString : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_MenuItemFont_getFontNameObj(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_getFontNameObj : Invalid Native Object"); + if (argc == 0) { + const std::string& ret = cobj->getFontNameObj(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemFont_getFontNameObj : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemFont_setFontName(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_MenuItemFont_setFontName : Error processing arguments"); + cocos2d::MenuItemFont::setFontName(arg0); + args.rval().setUndefined(); + return true; + } + JS_ReportError(cx, "js_cocos2dx_MenuItemFont_setFontName : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_MenuItemFont_getFontSize(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + int ret = cocos2d::MenuItemFont::getFontSize(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_MenuItemFont_getFontSize : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_MenuItemFont_getFontName(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + const std::string& ret = cocos2d::MenuItemFont::getFontName(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_MenuItemFont_getFontName : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_MenuItemFont_setFontSize(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemFont_setFontSize : Error processing arguments"); + cocos2d::MenuItemFont::setFontSize(arg0); + args.rval().setUndefined(); + return true; + } + JS_ReportError(cx, "js_cocos2dx_MenuItemFont_setFontSize : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_MenuItemFont_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::MenuItemFont* cobj = new (std::nothrow) cocos2d::MenuItemFont(); + 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::MenuItemFont"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_MenuItemLabel_prototype; + +void js_cocos2d_MenuItemFont_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemFont)", obj); +} + +static bool js_cocos2d_MenuItemFont_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::MenuItemFont *nobj = new (std::nothrow) cocos2d::MenuItemFont(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemFont"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_MenuItemFont(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_MenuItemFont_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_MenuItemFont_class->name = "MenuItemFont"; + jsb_cocos2d_MenuItemFont_class->addProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemFont_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_MenuItemFont_class->getProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemFont_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_MenuItemFont_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_MenuItemFont_class->resolve = JS_ResolveStub; + jsb_cocos2d_MenuItemFont_class->convert = JS_ConvertStub; + jsb_cocos2d_MenuItemFont_class->finalize = js_cocos2d_MenuItemFont_finalize; + jsb_cocos2d_MenuItemFont_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("setFontName", js_cocos2dx_MenuItemFont_setFontNameObj, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFontSize", js_cocos2dx_MenuItemFont_getFontSizeObj, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFontSize", js_cocos2dx_MenuItemFont_setFontSizeObj, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithString", js_cocos2dx_MenuItemFont_initWithString, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFontName", js_cocos2dx_MenuItemFont_getFontNameObj, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_MenuItemFont_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("setFontName", js_cocos2dx_MenuItemFont_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFontSize", js_cocos2dx_MenuItemFont_getFontSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFontName", js_cocos2dx_MenuItemFont_getFontName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFontSize", js_cocos2dx_MenuItemFont_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_MenuItemFont_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_MenuItemLabel_prototype), + jsb_cocos2d_MenuItemFont_class, + js_cocos2dx_MenuItemFont_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, "MenuItemFont", 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_MenuItemFont_class; + p->proto = jsb_cocos2d_MenuItemFont_prototype; + p->parentProto = jsb_cocos2d_MenuItemLabel_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_MenuItemSprite_class; +JSObject *jsb_cocos2d_MenuItemSprite_prototype; + +bool js_cocos2dx_MenuItemSprite_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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_setEnabled : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_setEnabled : Error processing arguments"); + cobj->setEnabled(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_setEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemSprite_selected(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_selected : Invalid Native Object"); + if (argc == 0) { + cobj->selected(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_selected : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemSprite_setNormalImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_setNormalImage : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_setNormalImage : Error processing arguments"); + cobj->setNormalImage(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_setNormalImage : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemSprite_setDisabledImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_setDisabledImage : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_setDisabledImage : Error processing arguments"); + cobj->setDisabledImage(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_setDisabledImage : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemSprite_initWithNormalSprite(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_initWithNormalSprite : Invalid Native Object"); + if (argc == 4) { + cocos2d::Node* arg0; + cocos2d::Node* arg1; + cocos2d::Node* arg2; + std::function arg3; + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + do { + if (!args.get(2).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(2).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg2 = (cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg2, cx, false, "Invalid Native Object"); + } while (0); + do { + if(JS_TypeOfValue(cx, args.get(3)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(3))); + auto lambda = [=](cocos2d::Ref* larg0) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[1]; + do { + if (larg0) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); + largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + largv[0] = JSVAL_NULL; + } + } while (0); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg3 = lambda; + } + else + { + arg3 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_initWithNormalSprite : Error processing arguments"); + bool ret = cobj->initWithNormalSprite(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_initWithNormalSprite : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_MenuItemSprite_setSelectedImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_setSelectedImage : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_setSelectedImage : Error processing arguments"); + cobj->setSelectedImage(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_setSelectedImage : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemSprite_getDisabledImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_getDisabledImage : Invalid Native Object"); + if (argc == 0) { + cocos2d::Node* ret = cobj->getDisabledImage(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_getDisabledImage : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemSprite_getSelectedImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_getSelectedImage : Invalid Native Object"); + if (argc == 0) { + cocos2d::Node* ret = cobj->getSelectedImage(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_getSelectedImage : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemSprite_getNormalImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_getNormalImage : Invalid Native Object"); + if (argc == 0) { + cocos2d::Node* ret = cobj->getNormalImage(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_getNormalImage : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemSprite_unselected(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_unselected : Invalid Native Object"); + if (argc == 0) { + cobj->unselected(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_unselected : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemSprite_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::MenuItemSprite* cobj = new (std::nothrow) cocos2d::MenuItemSprite(); + 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::MenuItemSprite"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_MenuItem_prototype; + +void js_cocos2d_MenuItemSprite_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemSprite)", obj); +} + +static bool js_cocos2d_MenuItemSprite_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::MenuItemSprite *nobj = new (std::nothrow) cocos2d::MenuItemSprite(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemSprite"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_MenuItemSprite(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_MenuItemSprite_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_MenuItemSprite_class->name = "MenuItemSprite"; + jsb_cocos2d_MenuItemSprite_class->addProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemSprite_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_MenuItemSprite_class->getProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemSprite_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_MenuItemSprite_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_MenuItemSprite_class->resolve = JS_ResolveStub; + jsb_cocos2d_MenuItemSprite_class->convert = JS_ConvertStub; + jsb_cocos2d_MenuItemSprite_class->finalize = js_cocos2d_MenuItemSprite_finalize; + jsb_cocos2d_MenuItemSprite_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_MenuItemSprite_setEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("selected", js_cocos2dx_MenuItemSprite_selected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setNormalImage", js_cocos2dx_MenuItemSprite_setNormalImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDisabledImage", js_cocos2dx_MenuItemSprite_setDisabledImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithNormalSprite", js_cocos2dx_MenuItemSprite_initWithNormalSprite, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSelectedImage", js_cocos2dx_MenuItemSprite_setSelectedImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDisabledImage", js_cocos2dx_MenuItemSprite_getDisabledImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSelectedImage", js_cocos2dx_MenuItemSprite_getSelectedImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getNormalImage", js_cocos2dx_MenuItemSprite_getNormalImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("unselected", js_cocos2dx_MenuItemSprite_unselected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_MenuItemSprite_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_MenuItemSprite_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_MenuItem_prototype), + jsb_cocos2d_MenuItemSprite_class, + js_cocos2dx_MenuItemSprite_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, "MenuItemSprite", 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_MenuItemSprite_class; + p->proto = jsb_cocos2d_MenuItemSprite_prototype; + p->parentProto = jsb_cocos2d_MenuItem_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_MenuItemImage_class; +JSObject *jsb_cocos2d_MenuItemImage_prototype; + +bool js_cocos2dx_MenuItemImage_setDisabledSpriteFrame(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_setDisabledSpriteFrame : Invalid Native Object"); + if (argc == 1) { + cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemImage_setDisabledSpriteFrame : Error processing arguments"); + cobj->setDisabledSpriteFrame(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemImage_setDisabledSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemImage_setSelectedSpriteFrame(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_setSelectedSpriteFrame : Invalid Native Object"); + if (argc == 1) { + cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemImage_setSelectedSpriteFrame : Error processing arguments"); + cobj->setSelectedSpriteFrame(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemImage_setSelectedSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemImage_setNormalSpriteFrame(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_setNormalSpriteFrame : Invalid Native Object"); + if (argc == 1) { + cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemImage_setNormalSpriteFrame : Error processing arguments"); + cobj->setNormalSpriteFrame(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemImage_setNormalSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemImage_init(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemImage_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemImage_initWithNormalImage(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_initWithNormalImage : Invalid Native Object"); + if (argc == 4) { + std::string arg0; + std::string arg1; + std::string arg2; + std::function arg3; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + ok &= jsval_to_std_string(cx, args.get(2), &arg2); + do { + if(JS_TypeOfValue(cx, args.get(3)) == JSTYPE_FUNCTION) + { + std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(3))); + auto lambda = [=](cocos2d::Ref* larg0) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[1]; + do { + if (larg0) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); + largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + largv[0] = JSVAL_NULL; + } + } while (0); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &largv[0], &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg3 = lambda; + } + else + { + arg3 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemImage_initWithNormalImage : Error processing arguments"); + bool ret = cobj->initWithNormalImage(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemImage_initWithNormalImage : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_MenuItemImage_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::MenuItemImage* cobj = new (std::nothrow) cocos2d::MenuItemImage(); + 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::MenuItemImage"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_MenuItemSprite_prototype; + +void js_cocos2d_MenuItemImage_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemImage)", obj); +} + +static bool js_cocos2d_MenuItemImage_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::MenuItemImage *nobj = new (std::nothrow) cocos2d::MenuItemImage(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemImage"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_MenuItemImage(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_MenuItemImage_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_MenuItemImage_class->name = "MenuItemImage"; + jsb_cocos2d_MenuItemImage_class->addProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemImage_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_MenuItemImage_class->getProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemImage_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_MenuItemImage_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_MenuItemImage_class->resolve = JS_ResolveStub; + jsb_cocos2d_MenuItemImage_class->convert = JS_ConvertStub; + jsb_cocos2d_MenuItemImage_class->finalize = js_cocos2d_MenuItemImage_finalize; + jsb_cocos2d_MenuItemImage_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("setDisabledSpriteFrame", js_cocos2dx_MenuItemImage_setDisabledSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSelectedSpriteFrame", js_cocos2dx_MenuItemImage_setSelectedSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setNormalSpriteFrame", js_cocos2dx_MenuItemImage_setNormalSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("init", js_cocos2dx_MenuItemImage_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithNormalImage", js_cocos2dx_MenuItemImage_initWithNormalImage, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_MenuItemImage_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_MenuItemImage_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_MenuItemSprite_prototype), + jsb_cocos2d_MenuItemImage_class, + js_cocos2dx_MenuItemImage_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, "MenuItemImage", 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_MenuItemImage_class; + p->proto = jsb_cocos2d_MenuItemImage_prototype; + p->parentProto = jsb_cocos2d_MenuItemSprite_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_MenuItemToggle_class; +JSObject *jsb_cocos2d_MenuItemToggle_prototype; + +bool js_cocos2dx_MenuItemToggle_setSubItems(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_setSubItems : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vector arg0; + ok &= jsval_to_ccvector(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemToggle_setSubItems : Error processing arguments"); + cobj->setSubItems(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_setSubItems : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemToggle_initWithItem(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_initWithItem : Invalid Native Object"); + if (argc == 1) { + cocos2d::MenuItem* 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::MenuItem*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemToggle_initWithItem : Error processing arguments"); + bool ret = cobj->initWithItem(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_initWithItem : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemToggle_getSelectedIndex(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_getSelectedIndex : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getSelectedIndex(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_getSelectedIndex : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemToggle_addSubItem(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_addSubItem : Invalid Native Object"); + if (argc == 1) { + cocos2d::MenuItem* 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::MenuItem*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemToggle_addSubItem : Error processing arguments"); + cobj->addSubItem(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_addSubItem : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemToggle_getSelectedItem(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_getSelectedItem : Invalid Native Object"); + if (argc == 0) { + cocos2d::MenuItem* ret = cobj->getSelectedItem(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MenuItem*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_getSelectedItem : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MenuItemToggle_setSelectedIndex(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_setSelectedIndex : 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_MenuItemToggle_setSelectedIndex : Error processing arguments"); + cobj->setSelectedIndex(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_setSelectedIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MenuItemToggle_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::MenuItemToggle* cobj = new (std::nothrow) cocos2d::MenuItemToggle(); + 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::MenuItemToggle"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_MenuItem_prototype; + +void js_cocos2d_MenuItemToggle_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemToggle)", obj); +} + +static bool js_cocos2d_MenuItemToggle_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::MenuItemToggle *nobj = new (std::nothrow) cocos2d::MenuItemToggle(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemToggle"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_MenuItemToggle(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_MenuItemToggle_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_MenuItemToggle_class->name = "MenuItemToggle"; + jsb_cocos2d_MenuItemToggle_class->addProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemToggle_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_MenuItemToggle_class->getProperty = JS_PropertyStub; + jsb_cocos2d_MenuItemToggle_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_MenuItemToggle_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_MenuItemToggle_class->resolve = JS_ResolveStub; + jsb_cocos2d_MenuItemToggle_class->convert = JS_ConvertStub; + jsb_cocos2d_MenuItemToggle_class->finalize = js_cocos2d_MenuItemToggle_finalize; + jsb_cocos2d_MenuItemToggle_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("setSubItems", js_cocos2dx_MenuItemToggle_setSubItems, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithItem", js_cocos2dx_MenuItemToggle_initWithItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSelectedIndex", js_cocos2dx_MenuItemToggle_getSelectedIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addSubItem", js_cocos2dx_MenuItemToggle_addSubItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSelectedItem", js_cocos2dx_MenuItemToggle_getSelectedItem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSelectedIndex", js_cocos2dx_MenuItemToggle_setSelectedIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_MenuItemToggle_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_MenuItemToggle_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_MenuItem_prototype), + jsb_cocos2d_MenuItemToggle_class, + js_cocos2dx_MenuItemToggle_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, "MenuItemToggle", 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_MenuItemToggle_class; + p->proto = jsb_cocos2d_MenuItemToggle_prototype; + p->parentProto = jsb_cocos2d_MenuItem_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Menu_class; +JSObject *jsb_cocos2d_Menu_prototype; + +bool js_cocos2dx_Menu_initWithArray(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_initWithArray : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vector arg0; + ok &= jsval_to_ccvector(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Menu_initWithArray : Error processing arguments"); + bool ret = cobj->initWithArray(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Menu_initWithArray : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Menu_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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_setEnabled : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Menu_setEnabled : Error processing arguments"); + cobj->setEnabled(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Menu_setEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Menu_alignItemsVertically(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_alignItemsVertically : Invalid Native Object"); + if (argc == 0) { + cobj->alignItemsVertically(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Menu_alignItemsVertically : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Menu_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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_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_Menu_isEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Menu_alignItemsHorizontallyWithPadding(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_alignItemsHorizontallyWithPadding : 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_Menu_alignItemsHorizontallyWithPadding : Error processing arguments"); + cobj->alignItemsHorizontallyWithPadding(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Menu_alignItemsHorizontallyWithPadding : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Menu_alignItemsVerticallyWithPadding(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_alignItemsVerticallyWithPadding : 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_Menu_alignItemsVerticallyWithPadding : Error processing arguments"); + cobj->alignItemsVerticallyWithPadding(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Menu_alignItemsVerticallyWithPadding : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Menu_alignItemsHorizontally(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_alignItemsHorizontally : Invalid Native Object"); + if (argc == 0) { + cobj->alignItemsHorizontally(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Menu_alignItemsHorizontally : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Menu_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Menu* cobj = new (std::nothrow) cocos2d::Menu(); + 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::Menu"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Layer_prototype; + +void js_cocos2d_Menu_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Menu)", obj); +} + +static bool js_cocos2d_Menu_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::Menu *nobj = new (std::nothrow) cocos2d::Menu(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Menu"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_Menu(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Menu_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Menu_class->name = "Menu"; + jsb_cocos2d_Menu_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Menu_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Menu_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Menu_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Menu_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Menu_class->resolve = JS_ResolveStub; + jsb_cocos2d_Menu_class->convert = JS_ConvertStub; + jsb_cocos2d_Menu_class->finalize = js_cocos2d_Menu_finalize; + jsb_cocos2d_Menu_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("initWithArray", js_cocos2dx_Menu_initWithArray, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEnabled", js_cocos2dx_Menu_setEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("alignItemsVertically", js_cocos2dx_Menu_alignItemsVertically, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isEnabled", js_cocos2dx_Menu_isEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("alignItemsHorizontallyWithPadding", js_cocos2dx_Menu_alignItemsHorizontallyWithPadding, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("alignItemsVerticallyWithPadding", js_cocos2dx_Menu_alignItemsVerticallyWithPadding, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("alignItemsHorizontally", js_cocos2dx_Menu_alignItemsHorizontally, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_Menu_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_Menu_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Layer_prototype), + jsb_cocos2d_Menu_class, + js_cocos2dx_Menu_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, "Menu", 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_Menu_class; + p->proto = jsb_cocos2d_Menu_prototype; + p->parentProto = jsb_cocos2d_Layer_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_MotionStreak_class; +JSObject *jsb_cocos2d_MotionStreak_prototype; + +bool js_cocos2dx_MotionStreak_reset(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_reset : Invalid Native Object"); + if (argc == 0) { + cobj->reset(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_reset : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MotionStreak_setTexture(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setTexture : Invalid Native Object"); + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_setTexture : Error processing arguments"); + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_setTexture : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MotionStreak_getTexture(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_getTexture : Invalid Native Object"); + if (argc == 0) { + cocos2d::Texture2D* ret = cobj->getTexture(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MotionStreak_tintWithColor(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_tintWithColor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color3B arg0; + ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_tintWithColor : Error processing arguments"); + cobj->tintWithColor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_tintWithColor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MotionStreak_setBlendFunc(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setBlendFunc : Invalid Native Object"); + if (argc == 1) { + cocos2d::BlendFunc arg0; + ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_setBlendFunc : Error processing arguments"); + cobj->setBlendFunc(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MotionStreak_setStartingPositionInitialized(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setStartingPositionInitialized : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_setStartingPositionInitialized : Error processing arguments"); + cobj->setStartingPositionInitialized(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_setStartingPositionInitialized : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MotionStreak_getBlendFunc(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_getBlendFunc : Invalid Native Object"); + if (argc == 0) { + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + jsval jsret = JSVAL_NULL; + jsret = blendfunc_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MotionStreak_isStartingPositionInitialized(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_isStartingPositionInitialized : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isStartingPositionInitialized(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_isStartingPositionInitialized : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MotionStreak_isFastMode(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_isFastMode : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isFastMode(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_isFastMode : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MotionStreak_getStroke(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_getStroke : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getStroke(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_getStroke : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_MotionStreak_initWithFade(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::MotionStreak* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_initWithFade : Invalid Native Object"); + do { + if (argc == 5) { + 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; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + cocos2d::Color3B arg3; + ok &= jsval_to_cccolor3b(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::Texture2D* arg4; + do { + if (!args.get(4).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(4).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg4 = (cocos2d::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg4, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithFade(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 5) { + 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; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + cocos2d::Color3B arg3; + ok &= jsval_to_cccolor3b(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + std::string arg4; + ok &= jsval_to_std_string(cx, args.get(4), &arg4); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithFade(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_initWithFade : wrong number of arguments"); + return false; +} +bool js_cocos2dx_MotionStreak_setFastMode(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setFastMode : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_setFastMode : Error processing arguments"); + cobj->setFastMode(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_setFastMode : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MotionStreak_setStroke(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setStroke : 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_MotionStreak_setStroke : Error processing arguments"); + cobj->setStroke(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_MotionStreak_setStroke : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_MotionStreak_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 5) { + 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; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + cocos2d::Color3B arg3; + ok &= jsval_to_cccolor3b(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::Texture2D* arg4; + do { + if (!args.get(4).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(4).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg4 = (cocos2d::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg4, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::MotionStreak* ret = cocos2d::MotionStreak::create(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MotionStreak*)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) { + 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; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + cocos2d::Color3B arg3; + ok &= jsval_to_cccolor3b(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + std::string arg4; + ok &= jsval_to_std_string(cx, args.get(4), &arg4); + if (!ok) { ok = true; break; } + cocos2d::MotionStreak* ret = cocos2d::MotionStreak::create(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MotionStreak*)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_MotionStreak_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_MotionStreak_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::MotionStreak* cobj = new (std::nothrow) cocos2d::MotionStreak(); + 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::MotionStreak"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_MotionStreak_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (MotionStreak)", obj); +} + +static bool js_cocos2d_MotionStreak_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::MotionStreak *nobj = new (std::nothrow) cocos2d::MotionStreak(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::MotionStreak"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_MotionStreak(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_MotionStreak_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_MotionStreak_class->name = "MotionStreak"; + jsb_cocos2d_MotionStreak_class->addProperty = JS_PropertyStub; + jsb_cocos2d_MotionStreak_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_MotionStreak_class->getProperty = JS_PropertyStub; + jsb_cocos2d_MotionStreak_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_MotionStreak_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_MotionStreak_class->resolve = JS_ResolveStub; + jsb_cocos2d_MotionStreak_class->convert = JS_ConvertStub; + jsb_cocos2d_MotionStreak_class->finalize = js_cocos2d_MotionStreak_finalize; + jsb_cocos2d_MotionStreak_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("reset", js_cocos2dx_MotionStreak_reset, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTexture", js_cocos2dx_MotionStreak_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTexture", js_cocos2dx_MotionStreak_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("tintWithColor", js_cocos2dx_MotionStreak_tintWithColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBlendFunc", js_cocos2dx_MotionStreak_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStartingPositionInitialized", js_cocos2dx_MotionStreak_setStartingPositionInitialized, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBlendFunc", js_cocos2dx_MotionStreak_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isStartingPositionInitialized", js_cocos2dx_MotionStreak_isStartingPositionInitialized, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isFastMode", js_cocos2dx_MotionStreak_isFastMode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStroke", js_cocos2dx_MotionStreak_getStroke, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithFade", js_cocos2dx_MotionStreak_initWithFade, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFastMode", js_cocos2dx_MotionStreak_setFastMode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStroke", js_cocos2dx_MotionStreak_setStroke, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_MotionStreak_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_MotionStreak_create, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_MotionStreak_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_MotionStreak_class, + js_cocos2dx_MotionStreak_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, "MotionStreak", 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_MotionStreak_class; + p->proto = jsb_cocos2d_MotionStreak_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_NodeGrid_class; +JSObject *jsb_cocos2d_NodeGrid_prototype; + +bool js_cocos2dx_NodeGrid_setTarget(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::NodeGrid* cobj = (cocos2d::NodeGrid *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_NodeGrid_setTarget : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_NodeGrid_setTarget : Error processing arguments"); + cobj->setTarget(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_NodeGrid_setTarget : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_NodeGrid_getGrid(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::NodeGrid* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::NodeGrid *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_NodeGrid_getGrid : Invalid Native Object"); + do { + if (argc == 0) { + const cocos2d::GridBase* ret = cobj->getGrid(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::GridBase*)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::GridBase* ret = cobj->getGrid(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::GridBase*)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_NodeGrid_getGrid : wrong number of arguments"); + return false; +} +bool js_cocos2dx_NodeGrid_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::NodeGrid* ret = cocos2d::NodeGrid::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::NodeGrid*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_NodeGrid_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_NodeGrid_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::NodeGrid* cobj = new (std::nothrow) cocos2d::NodeGrid(); + 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::NodeGrid"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_NodeGrid_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (NodeGrid)", obj); +} + +void js_register_cocos2dx_NodeGrid(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_NodeGrid_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_NodeGrid_class->name = "NodeGrid"; + jsb_cocos2d_NodeGrid_class->addProperty = JS_PropertyStub; + jsb_cocos2d_NodeGrid_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_NodeGrid_class->getProperty = JS_PropertyStub; + jsb_cocos2d_NodeGrid_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_NodeGrid_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_NodeGrid_class->resolve = JS_ResolveStub; + jsb_cocos2d_NodeGrid_class->convert = JS_ConvertStub; + jsb_cocos2d_NodeGrid_class->finalize = js_cocos2d_NodeGrid_finalize; + jsb_cocos2d_NodeGrid_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("setTarget", js_cocos2dx_NodeGrid_setTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getGrid", js_cocos2dx_NodeGrid_getGrid, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_NodeGrid_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_NodeGrid_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_NodeGrid_class, + js_cocos2dx_NodeGrid_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, "NodeGrid", 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_NodeGrid_class; + p->proto = jsb_cocos2d_NodeGrid_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleBatchNode_class; +JSObject *jsb_cocos2d_ParticleBatchNode_prototype; + +bool js_cocos2dx_ParticleBatchNode_setTexture(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_setTexture : Invalid Native Object"); + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_setTexture : Error processing arguments"); + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_setTexture : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleBatchNode_initWithTexture(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_initWithTexture : Invalid Native Object"); + if (argc == 2) { + cocos2d::Texture2D* arg0; + int arg1; + 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::Texture2D*)(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_ParticleBatchNode_initWithTexture : Error processing arguments"); + bool ret = cobj->initWithTexture(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_initWithTexture : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ParticleBatchNode_disableParticle(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_disableParticle : 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_ParticleBatchNode_disableParticle : Error processing arguments"); + cobj->disableParticle(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_disableParticle : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleBatchNode_getTexture(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_getTexture : Invalid Native Object"); + if (argc == 0) { + cocos2d::Texture2D* ret = cobj->getTexture(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleBatchNode_setTextureAtlas(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_setTextureAtlas : Invalid Native Object"); + if (argc == 1) { + cocos2d::TextureAtlas* 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::TextureAtlas*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_setTextureAtlas : Error processing arguments"); + cobj->setTextureAtlas(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_setTextureAtlas : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleBatchNode_initWithFile(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_initWithFile : Invalid Native Object"); + if (argc == 2) { + std::string arg0; + int arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_initWithFile : Error processing arguments"); + bool ret = cobj->initWithFile(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_initWithFile : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ParticleBatchNode_setBlendFunc(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_setBlendFunc : Invalid Native Object"); + if (argc == 1) { + cocos2d::BlendFunc arg0; + ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_setBlendFunc : Error processing arguments"); + cobj->setBlendFunc(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup : Error processing arguments"); + cobj->removeAllChildrenWithCleanup(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleBatchNode_getTextureAtlas(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_getTextureAtlas : Invalid Native Object"); + if (argc == 0) { + cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TextureAtlas*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_getTextureAtlas : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleBatchNode_getBlendFunc(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_getBlendFunc : Invalid Native Object"); + if (argc == 0) { + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + jsval jsret = JSVAL_NULL; + jsret = blendfunc_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleBatchNode_insertChild(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_insertChild : Invalid Native Object"); + if (argc == 2) { + cocos2d::ParticleSystem* arg0; + int arg1; + 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::ParticleSystem*)(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_ParticleBatchNode_insertChild : Error processing arguments"); + cobj->insertChild(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_insertChild : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ParticleBatchNode_removeChildAtIndex(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_removeChildAtIndex : Invalid Native Object"); + if (argc == 2) { + int arg0; + bool arg1; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + arg1 = JS::ToBoolean(args.get(1)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_removeChildAtIndex : Error processing arguments"); + cobj->removeChildAtIndex(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_removeChildAtIndex : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ParticleBatchNode_create(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_ParticleBatchNode_create : Error processing arguments"); + cocos2d::ParticleBatchNode* ret = cocos2d::ParticleBatchNode::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + if (argc == 2) { + std::string arg0; + int arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_create : Error processing arguments"); + cocos2d::ParticleBatchNode* ret = cocos2d::ParticleBatchNode::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleBatchNode_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_createWithTexture : Error processing arguments"); + cocos2d::ParticleBatchNode* ret = cocos2d::ParticleBatchNode::createWithTexture(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + if (argc == 2) { + cocos2d::Texture2D* arg0; + int arg1; + 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::Texture2D*)(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_ParticleBatchNode_createWithTexture : Error processing arguments"); + cocos2d::ParticleBatchNode* ret = cocos2d::ParticleBatchNode::createWithTexture(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_createWithTexture : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleBatchNode_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleBatchNode* cobj = new (std::nothrow) cocos2d::ParticleBatchNode(); + 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::ParticleBatchNode"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_ParticleBatchNode_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleBatchNode)", obj); +} + +static bool js_cocos2d_ParticleBatchNode_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::ParticleBatchNode *nobj = new (std::nothrow) cocos2d::ParticleBatchNode(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::ParticleBatchNode"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_ParticleBatchNode(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleBatchNode_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleBatchNode_class->name = "ParticleBatchNode"; + jsb_cocos2d_ParticleBatchNode_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleBatchNode_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleBatchNode_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleBatchNode_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleBatchNode_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleBatchNode_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleBatchNode_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleBatchNode_class->finalize = js_cocos2d_ParticleBatchNode_finalize; + jsb_cocos2d_ParticleBatchNode_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("setTexture", js_cocos2dx_ParticleBatchNode_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTexture", js_cocos2dx_ParticleBatchNode_initWithTexture, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("disableParticle", js_cocos2dx_ParticleBatchNode_disableParticle, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTexture", js_cocos2dx_ParticleBatchNode_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTextureAtlas", js_cocos2dx_ParticleBatchNode_setTextureAtlas, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithFile", js_cocos2dx_ParticleBatchNode_initWithFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBlendFunc", js_cocos2dx_ParticleBatchNode_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllChildrenWithCleanup", js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTextureAtlas", js_cocos2dx_ParticleBatchNode_getTextureAtlas, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBlendFunc", js_cocos2dx_ParticleBatchNode_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("insertChild", js_cocos2dx_ParticleBatchNode_insertChild, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeChildAtIndex", js_cocos2dx_ParticleBatchNode_removeChildAtIndex, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_ParticleBatchNode_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleBatchNode_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTexture", js_cocos2dx_ParticleBatchNode_createWithTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleBatchNode_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_ParticleBatchNode_class, + js_cocos2dx_ParticleBatchNode_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, "ParticleBatchNode", 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_ParticleBatchNode_class; + p->proto = jsb_cocos2d_ParticleBatchNode_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleSystem_class; +JSObject *jsb_cocos2d_ParticleSystem_prototype; + +bool js_cocos2dx_ParticleSystem_getStartSizeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartSizeVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getStartSizeVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartSizeVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getTexture(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getTexture : Invalid Native Object"); + if (argc == 0) { + cocos2d::Texture2D* ret = cobj->getTexture(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_isFull(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_isFull : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isFull(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_isFull : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getBatchNode(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getBatchNode : Invalid Native Object"); + if (argc == 0) { + cocos2d::ParticleBatchNode* ret = cobj->getBatchNode(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getBatchNode : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getStartColor(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartColor : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Color4F& ret = cobj->getStartColor(); + jsval jsret = JSVAL_NULL; + jsret = cccolor4f_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartColor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getPositionType(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getPositionType : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getPositionType(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getPositionType : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setPosVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setPosVar : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setPosVar : Error processing arguments"); + cobj->setPosVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setPosVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getEndSpin(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndSpin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getEndSpin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndSpin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setRotatePerSecondVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRotatePerSecondVar : 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_ParticleSystem_setRotatePerSecondVar : Error processing arguments"); + cobj->setRotatePerSecondVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRotatePerSecondVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getStartSpinVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartSpinVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getStartSpinVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartSpinVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getRadialAccelVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRadialAccelVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRadialAccelVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRadialAccelVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getEndSizeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndSizeVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getEndSizeVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndSizeVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setTangentialAccel(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setTangentialAccel : 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_ParticleSystem_setTangentialAccel : Error processing arguments"); + cobj->setTangentialAccel(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setTangentialAccel : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getRadialAccel(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRadialAccel : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRadialAccel(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRadialAccel : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setStartRadius(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartRadius : 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_ParticleSystem_setStartRadius : Error processing arguments"); + cobj->setStartRadius(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartRadius : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setRotatePerSecond(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRotatePerSecond : 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_ParticleSystem_setRotatePerSecond : Error processing arguments"); + cobj->setRotatePerSecond(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRotatePerSecond : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setEndSize(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndSize : 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_ParticleSystem_setEndSize : Error processing arguments"); + cobj->setEndSize(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndSize : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getGravity : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Vec2& ret = cobj->getGravity(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getGravity : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getTangentialAccel(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getTangentialAccel : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getTangentialAccel(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getTangentialAccel : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setEndRadius(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndRadius : 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_ParticleSystem_setEndRadius : Error processing arguments"); + cobj->setEndRadius(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndRadius : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getSpeed(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getSpeed : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSpeed(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getSpeed : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getAngle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getAngle : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getAngle(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getAngle : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setEndColor(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndColor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color4F arg0; + ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setEndColor : Error processing arguments"); + cobj->setEndColor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndColor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setStartSpin(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartSpin : 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_ParticleSystem_setStartSpin : Error processing arguments"); + cobj->setStartSpin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartSpin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setDuration(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setDuration : 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_ParticleSystem_setDuration : Error processing arguments"); + cobj->setDuration(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setDuration : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_initWithTotalParticles(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_initWithTotalParticles : 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_ParticleSystem_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setTexture(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setTexture : Invalid Native Object"); + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setTexture : Error processing arguments"); + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setTexture : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getPosVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getPosVar : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Vec2& ret = cobj->getPosVar(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getPosVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_updateWithNoTime(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_updateWithNoTime : Invalid Native Object"); + if (argc == 0) { + cobj->updateWithNoTime(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_updateWithNoTime : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_isBlendAdditive(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_isBlendAdditive : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isBlendAdditive(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_isBlendAdditive : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getSpeedVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getSpeedVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSpeedVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getSpeedVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setPositionType(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setPositionType : Invalid Native Object"); + if (argc == 1) { + cocos2d::ParticleSystem::PositionType arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setPositionType : Error processing arguments"); + cobj->setPositionType(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setPositionType : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_stopSystem(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_stopSystem : Invalid Native Object"); + if (argc == 0) { + cobj->stopSystem(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_stopSystem : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getSourcePosition(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getSourcePosition : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Vec2& ret = cobj->getSourcePosition(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getSourcePosition : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setLifeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setLifeVar : 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_ParticleSystem_setLifeVar : Error processing arguments"); + cobj->setLifeVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setLifeVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setTotalParticles(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setTotalParticles : 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_ParticleSystem_setTotalParticles : Error processing arguments"); + cobj->setTotalParticles(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setEndColorVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndColorVar : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color4F arg0; + ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setEndColorVar : Error processing arguments"); + cobj->setEndColorVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndColorVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_updateQuadWithParticle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_updateQuadWithParticle : Invalid Native Object"); + if (argc == 2) { + cocos2d::sParticle* arg0; + cocos2d::Vec2 arg1; + #pragma warning NO CONVERSION TO NATIVE FOR sParticle* + ok = false; + ok &= jsval_to_vector2(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_updateQuadWithParticle : Error processing arguments"); + cobj->updateQuadWithParticle(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_updateQuadWithParticle : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ParticleSystem_getAtlasIndex(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getAtlasIndex : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getAtlasIndex(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getAtlasIndex : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getStartSize(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartSize : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getStartSize(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartSize : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setStartSpinVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartSpinVar : 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_ParticleSystem_setStartSpinVar : Error processing arguments"); + cobj->setStartSpinVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartSpinVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_resetSystem(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_resetSystem : Invalid Native Object"); + if (argc == 0) { + cobj->resetSystem(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_resetSystem : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setAtlasIndex(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setAtlasIndex : 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_ParticleSystem_setAtlasIndex : Error processing arguments"); + cobj->setAtlasIndex(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setAtlasIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setTangentialAccelVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setTangentialAccelVar : 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_ParticleSystem_setTangentialAccelVar : Error processing arguments"); + cobj->setTangentialAccelVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setTangentialAccelVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setEndRadiusVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndRadiusVar : 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_ParticleSystem_setEndRadiusVar : Error processing arguments"); + cobj->setEndRadiusVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndRadiusVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getEndRadius(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndRadius : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getEndRadius(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndRadius : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_isActive(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_isActive : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isActive(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_isActive : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setRadialAccelVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRadialAccelVar : 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_ParticleSystem_setRadialAccelVar : Error processing arguments"); + cobj->setRadialAccelVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRadialAccelVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setStartSize(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartSize : 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_ParticleSystem_setStartSize : Error processing arguments"); + cobj->setStartSize(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartSize : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setSpeed(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setSpeed : 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_ParticleSystem_setSpeed : Error processing arguments"); + cobj->setSpeed(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setSpeed : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getStartSpin(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartSpin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getStartSpin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartSpin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getRotatePerSecond(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRotatePerSecond : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRotatePerSecond(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRotatePerSecond : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_initParticle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_initParticle : Invalid Native Object"); + if (argc == 1) { + cocos2d::sParticle* arg0; + #pragma warning NO CONVERSION TO NATIVE FOR sParticle* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_initParticle : Error processing arguments"); + cobj->initParticle(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_initParticle : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setEmitterMode(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEmitterMode : Invalid Native Object"); + if (argc == 1) { + cocos2d::ParticleSystem::Mode arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setEmitterMode : Error processing arguments"); + cobj->setEmitterMode(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEmitterMode : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getDuration(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getDuration : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getDuration(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getDuration : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setSourcePosition(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setSourcePosition : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setSourcePosition : Error processing arguments"); + cobj->setSourcePosition(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setSourcePosition : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getEndSpinVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndSpinVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getEndSpinVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndSpinVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setBlendAdditive(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setBlendAdditive : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setBlendAdditive : Error processing arguments"); + cobj->setBlendAdditive(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setBlendAdditive : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setLife(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setLife : 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_ParticleSystem_setLife : Error processing arguments"); + cobj->setLife(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setLife : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setAngleVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setAngleVar : 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_ParticleSystem_setAngleVar : Error processing arguments"); + cobj->setAngleVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setAngleVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setRotationIsDir(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRotationIsDir : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setRotationIsDir : Error processing arguments"); + cobj->setRotationIsDir(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRotationIsDir : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setEndSizeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndSizeVar : 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_ParticleSystem_setEndSizeVar : Error processing arguments"); + cobj->setEndSizeVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndSizeVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setAngle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setAngle : 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_ParticleSystem_setAngle : Error processing arguments"); + cobj->setAngle(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setAngle : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setBatchNode(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setBatchNode : Invalid Native Object"); + if (argc == 1) { + cocos2d::ParticleBatchNode* 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::ParticleBatchNode*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setBatchNode : Error processing arguments"); + cobj->setBatchNode(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setBatchNode : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getTangentialAccelVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getTangentialAccelVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getTangentialAccelVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getTangentialAccelVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getEmitterMode(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEmitterMode : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getEmitterMode(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEmitterMode : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setEndSpinVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndSpinVar : 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_ParticleSystem_setEndSpinVar : Error processing arguments"); + cobj->setEndSpinVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndSpinVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_initWithFile(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_initWithFile : 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_ParticleSystem_initWithFile : Error processing arguments"); + bool ret = cobj->initWithFile(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_initWithFile : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getAngleVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getAngleVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getAngleVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getAngleVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setStartColor(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartColor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color4F arg0; + ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setStartColor : Error processing arguments"); + cobj->setStartColor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartColor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getRotatePerSecondVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRotatePerSecondVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRotatePerSecondVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRotatePerSecondVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getEndSize(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndSize : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getEndSize(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndSize : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getLife(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getLife : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getLife(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getLife : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setSpeedVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setSpeedVar : 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_ParticleSystem_setSpeedVar : Error processing arguments"); + cobj->setSpeedVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setSpeedVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish : Error processing arguments"); + cobj->setAutoRemoveOnFinish(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setGravity : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setGravity : Error processing arguments"); + cobj->setGravity(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setGravity : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_postStep(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_postStep : Invalid Native Object"); + if (argc == 0) { + cobj->postStep(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_postStep : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setEmissionRate(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEmissionRate : 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_ParticleSystem_setEmissionRate : Error processing arguments"); + cobj->setEmissionRate(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEmissionRate : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getEndColorVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndColorVar : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Color4F& ret = cobj->getEndColorVar(); + jsval jsret = JSVAL_NULL; + jsret = cccolor4f_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndColorVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getRotationIsDir(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRotationIsDir : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getRotationIsDir(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRotationIsDir : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getEmissionRate(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEmissionRate : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getEmissionRate(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEmissionRate : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getEndColor(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndColor : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Color4F& ret = cobj->getEndColor(); + jsval jsret = JSVAL_NULL; + jsret = cccolor4f_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndColor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getLifeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getLifeVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getLifeVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getLifeVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setStartSizeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartSizeVar : 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_ParticleSystem_setStartSizeVar : Error processing arguments"); + cobj->setStartSizeVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartSizeVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_addParticle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_addParticle : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->addParticle(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_addParticle : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getStartRadius(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartRadius : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getStartRadius(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartRadius : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getParticleCount(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getParticleCount : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getParticleCount(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getParticleCount : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getStartRadiusVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartRadiusVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getStartRadiusVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartRadiusVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getBlendFunc(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getBlendFunc : Invalid Native Object"); + if (argc == 0) { + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + jsval jsret = JSVAL_NULL; + jsret = blendfunc_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setStartColorVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartColorVar : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color4F arg0; + ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setStartColorVar : Error processing arguments"); + cobj->setStartColorVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartColorVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setEndSpin(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndSpin : 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_ParticleSystem_setEndSpin : Error processing arguments"); + cobj->setEndSpin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndSpin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setRadialAccel(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRadialAccel : 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_ParticleSystem_setRadialAccel : Error processing arguments"); + cobj->setRadialAccel(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRadialAccel : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_initWithDictionary(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::ParticleSystem* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_initWithDictionary : Invalid Native Object"); + do { + if (argc == 2) { + cocos2d::ValueMap arg0; + ok &= jsval_to_ccvaluemap(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithDictionary(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 1) { + cocos2d::ValueMap arg0; + ok &= jsval_to_ccvaluemap(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithDictionary(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_initWithDictionary : wrong number of arguments"); + return false; +} +bool js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isAutoRemoveOnFinish(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getTotalParticles(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getTotalParticles : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getTotalParticles(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_setStartRadiusVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartRadiusVar : 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_ParticleSystem_setStartRadiusVar : Error processing arguments"); + cobj->setStartRadiusVar(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartRadiusVar : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_setBlendFunc(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setBlendFunc : Invalid Native Object"); + if (argc == 1) { + cocos2d::BlendFunc arg0; + ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setBlendFunc : Error processing arguments"); + cobj->setBlendFunc(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystem_getEndRadiusVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndRadiusVar : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getEndRadiusVar(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndRadiusVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_getStartColorVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartColorVar : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Color4F& ret = cobj->getStartColorVar(); + jsval jsret = JSVAL_NULL; + jsret = cccolor4f_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartColorVar : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSystem_create(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_ParticleSystem_create : Error processing arguments"); + cocos2d::ParticleSystem* ret = cocos2d::ParticleSystem::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystem*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSystem_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleSystem* ret = cocos2d::ParticleSystem::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystem*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSystem_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSystem_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleSystem* cobj = new (std::nothrow) cocos2d::ParticleSystem(); + 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::ParticleSystem"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_ParticleSystem_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSystem)", obj); +} + +static bool js_cocos2d_ParticleSystem_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::ParticleSystem *nobj = new (std::nothrow) cocos2d::ParticleSystem(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::ParticleSystem"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_ParticleSystem(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleSystem_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleSystem_class->name = "ParticleSystem"; + jsb_cocos2d_ParticleSystem_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSystem_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleSystem_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSystem_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleSystem_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleSystem_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleSystem_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleSystem_class->finalize = js_cocos2d_ParticleSystem_finalize; + jsb_cocos2d_ParticleSystem_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("getStartSizeVar", js_cocos2dx_ParticleSystem_getStartSizeVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTexture", js_cocos2dx_ParticleSystem_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isFull", js_cocos2dx_ParticleSystem_isFull, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBatchNode", js_cocos2dx_ParticleSystem_getBatchNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStartColor", js_cocos2dx_ParticleSystem_getStartColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPositionType", js_cocos2dx_ParticleSystem_getPositionType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPosVar", js_cocos2dx_ParticleSystem_setPosVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEndSpin", js_cocos2dx_ParticleSystem_getEndSpin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRotatePerSecondVar", js_cocos2dx_ParticleSystem_setRotatePerSecondVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStartSpinVar", js_cocos2dx_ParticleSystem_getStartSpinVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRadialAccelVar", js_cocos2dx_ParticleSystem_getRadialAccelVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEndSizeVar", js_cocos2dx_ParticleSystem_getEndSizeVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTangentialAccel", js_cocos2dx_ParticleSystem_setTangentialAccel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRadialAccel", js_cocos2dx_ParticleSystem_getRadialAccel, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStartRadius", js_cocos2dx_ParticleSystem_setStartRadius, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRotatePerSecond", js_cocos2dx_ParticleSystem_setRotatePerSecond, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEndSize", js_cocos2dx_ParticleSystem_setEndSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getGravity", js_cocos2dx_ParticleSystem_getGravity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTangentialAccel", js_cocos2dx_ParticleSystem_getTangentialAccel, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEndRadius", js_cocos2dx_ParticleSystem_setEndRadius, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSpeed", js_cocos2dx_ParticleSystem_getSpeed, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAngle", js_cocos2dx_ParticleSystem_getAngle, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEndColor", js_cocos2dx_ParticleSystem_setEndColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStartSpin", js_cocos2dx_ParticleSystem_setStartSpin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDuration", js_cocos2dx_ParticleSystem_setDuration, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSystem_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTexture", js_cocos2dx_ParticleSystem_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPosVar", js_cocos2dx_ParticleSystem_getPosVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("updateWithNoTime", js_cocos2dx_ParticleSystem_updateWithNoTime, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isBlendAdditive", js_cocos2dx_ParticleSystem_isBlendAdditive, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSpeedVar", js_cocos2dx_ParticleSystem_getSpeedVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPositionType", js_cocos2dx_ParticleSystem_setPositionType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("stopSystem", js_cocos2dx_ParticleSystem_stopSystem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSourcePosition", js_cocos2dx_ParticleSystem_getSourcePosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLifeVar", js_cocos2dx_ParticleSystem_setLifeVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTotalParticles", js_cocos2dx_ParticleSystem_setTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEndColorVar", js_cocos2dx_ParticleSystem_setEndColorVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("updateQuadWithParticle", js_cocos2dx_ParticleSystem_updateQuadWithParticle, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAtlasIndex", js_cocos2dx_ParticleSystem_getAtlasIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStartSize", js_cocos2dx_ParticleSystem_getStartSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStartSpinVar", js_cocos2dx_ParticleSystem_setStartSpinVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("resetSystem", js_cocos2dx_ParticleSystem_resetSystem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAtlasIndex", js_cocos2dx_ParticleSystem_setAtlasIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTangentialAccelVar", js_cocos2dx_ParticleSystem_setTangentialAccelVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEndRadiusVar", js_cocos2dx_ParticleSystem_setEndRadiusVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEndRadius", js_cocos2dx_ParticleSystem_getEndRadius, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isActive", js_cocos2dx_ParticleSystem_isActive, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRadialAccelVar", js_cocos2dx_ParticleSystem_setRadialAccelVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStartSize", js_cocos2dx_ParticleSystem_setStartSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSpeed", js_cocos2dx_ParticleSystem_setSpeed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStartSpin", js_cocos2dx_ParticleSystem_getStartSpin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRotatePerSecond", js_cocos2dx_ParticleSystem_getRotatePerSecond, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initParticle", js_cocos2dx_ParticleSystem_initParticle, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEmitterMode", js_cocos2dx_ParticleSystem_setEmitterMode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDuration", js_cocos2dx_ParticleSystem_getDuration, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSourcePosition", js_cocos2dx_ParticleSystem_setSourcePosition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEndSpinVar", js_cocos2dx_ParticleSystem_getEndSpinVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBlendAdditive", js_cocos2dx_ParticleSystem_setBlendAdditive, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLife", js_cocos2dx_ParticleSystem_setLife, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAngleVar", js_cocos2dx_ParticleSystem_setAngleVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRotationIsDir", js_cocos2dx_ParticleSystem_setRotationIsDir, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEndSizeVar", js_cocos2dx_ParticleSystem_setEndSizeVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAngle", js_cocos2dx_ParticleSystem_setAngle, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBatchNode", js_cocos2dx_ParticleSystem_setBatchNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTangentialAccelVar", js_cocos2dx_ParticleSystem_getTangentialAccelVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEmitterMode", js_cocos2dx_ParticleSystem_getEmitterMode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEndSpinVar", js_cocos2dx_ParticleSystem_setEndSpinVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithFile", js_cocos2dx_ParticleSystem_initWithFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAngleVar", js_cocos2dx_ParticleSystem_getAngleVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStartColor", js_cocos2dx_ParticleSystem_setStartColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRotatePerSecondVar", js_cocos2dx_ParticleSystem_getRotatePerSecondVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEndSize", js_cocos2dx_ParticleSystem_getEndSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLife", js_cocos2dx_ParticleSystem_getLife, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSpeedVar", js_cocos2dx_ParticleSystem_setSpeedVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAutoRemoveOnFinish", js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setGravity", js_cocos2dx_ParticleSystem_setGravity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("postStep", js_cocos2dx_ParticleSystem_postStep, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEmissionRate", js_cocos2dx_ParticleSystem_setEmissionRate, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEndColorVar", js_cocos2dx_ParticleSystem_getEndColorVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRotationIsDir", js_cocos2dx_ParticleSystem_getRotationIsDir, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEmissionRate", js_cocos2dx_ParticleSystem_getEmissionRate, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEndColor", js_cocos2dx_ParticleSystem_getEndColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLifeVar", js_cocos2dx_ParticleSystem_getLifeVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStartSizeVar", js_cocos2dx_ParticleSystem_setStartSizeVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addParticle", js_cocos2dx_ParticleSystem_addParticle, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStartRadius", js_cocos2dx_ParticleSystem_getStartRadius, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getParticleCount", js_cocos2dx_ParticleSystem_getParticleCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStartRadiusVar", js_cocos2dx_ParticleSystem_getStartRadiusVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBlendFunc", js_cocos2dx_ParticleSystem_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStartColorVar", js_cocos2dx_ParticleSystem_setStartColorVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEndSpin", js_cocos2dx_ParticleSystem_setEndSpin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRadialAccel", js_cocos2dx_ParticleSystem_setRadialAccel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithDictionary", js_cocos2dx_ParticleSystem_initWithDictionary, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isAutoRemoveOnFinish", js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTotalParticles", js_cocos2dx_ParticleSystem_getTotalParticles, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStartRadiusVar", js_cocos2dx_ParticleSystem_setStartRadiusVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBlendFunc", js_cocos2dx_ParticleSystem_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEndRadiusVar", js_cocos2dx_ParticleSystem_getEndRadiusVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStartColorVar", js_cocos2dx_ParticleSystem_getStartColorVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_ParticleSystem_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleSystem_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSystem_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleSystem_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_ParticleSystem_class, + js_cocos2dx_ParticleSystem_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, "ParticleSystem", 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_ParticleSystem_class; + p->proto = jsb_cocos2d_ParticleSystem_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleSystemQuad_class; +JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +bool js_cocos2dx_ParticleSystemQuad_setDisplayFrame(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::ParticleSystemQuad* cobj = (cocos2d::ParticleSystemQuad *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystemQuad_setDisplayFrame : Invalid Native Object"); + if (argc == 1) { + cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystemQuad_setDisplayFrame : Error processing arguments"); + cobj->setDisplayFrame(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystemQuad_setDisplayFrame : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystemQuad_setTextureWithRect(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::ParticleSystemQuad* cobj = (cocos2d::ParticleSystemQuad *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystemQuad_setTextureWithRect : Invalid Native Object"); + if (argc == 2) { + cocos2d::Texture2D* arg0; + cocos2d::Rect arg1; + 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystemQuad_setTextureWithRect : Error processing arguments"); + cobj->setTextureWithRect(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystemQuad_setTextureWithRect : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ParticleSystemQuad_listenRendererRecreated(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::ParticleSystemQuad* cobj = (cocos2d::ParticleSystemQuad *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystemQuad_listenRendererRecreated : Invalid Native Object"); + if (argc == 1) { + cocos2d::EventCustom* 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::EventCustom*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystemQuad_listenRendererRecreated : Error processing arguments"); + cobj->listenRendererRecreated(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSystemQuad_listenRendererRecreated : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSystemQuad_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cocos2d::ParticleSystemQuad* ret = cocos2d::ParticleSystemQuad::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystemQuad*)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::ParticleSystemQuad* ret = cocos2d::ParticleSystemQuad::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystemQuad*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 1) { + cocos2d::ValueMap arg0; + ok &= jsval_to_ccvaluemap(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cocos2d::ParticleSystemQuad* ret = cocos2d::ParticleSystemQuad::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystemQuad*)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_ParticleSystemQuad_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_ParticleSystemQuad_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystemQuad_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleSystemQuad* ret = cocos2d::ParticleSystemQuad::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystemQuad*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSystemQuad_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSystemQuad_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleSystemQuad* cobj = new (std::nothrow) cocos2d::ParticleSystemQuad(); + 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::ParticleSystemQuad"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystem_prototype; + +void js_cocos2d_ParticleSystemQuad_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSystemQuad)", obj); +} + +void js_register_cocos2dx_ParticleSystemQuad(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleSystemQuad_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleSystemQuad_class->name = "ParticleSystem"; + jsb_cocos2d_ParticleSystemQuad_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSystemQuad_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleSystemQuad_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSystemQuad_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleSystemQuad_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleSystemQuad_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleSystemQuad_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleSystemQuad_class->finalize = js_cocos2d_ParticleSystemQuad_finalize; + jsb_cocos2d_ParticleSystemQuad_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("setDisplayFrame", js_cocos2dx_ParticleSystemQuad_setDisplayFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTextureWithRect", js_cocos2dx_ParticleSystemQuad_setTextureWithRect, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("listenRendererRecreated", js_cocos2dx_ParticleSystemQuad_listenRendererRecreated, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleSystemQuad_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSystemQuad_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleSystemQuad_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystem_prototype), + jsb_cocos2d_ParticleSystemQuad_class, + js_cocos2dx_ParticleSystemQuad_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, "ParticleSystem", 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_ParticleSystemQuad_class; + p->proto = jsb_cocos2d_ParticleSystemQuad_prototype; + p->parentProto = jsb_cocos2d_ParticleSystem_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleFire_class; +JSObject *jsb_cocos2d_ParticleFire_prototype; + +bool js_cocos2dx_ParticleFire_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleFire* ret = cocos2d::ParticleFire::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFire*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleFire_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleFire_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleFire_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleFire* ret = cocos2d::ParticleFire::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFire*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleFire_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleFire_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleFire* cobj = new (std::nothrow) cocos2d::ParticleFire(); + 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::ParticleFire"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleFire_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleFire)", obj); +} + +void js_register_cocos2dx_ParticleFire(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleFire_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleFire_class->name = "ParticleFire"; + jsb_cocos2d_ParticleFire_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleFire_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleFire_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleFire_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleFire_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleFire_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleFire_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleFire_class->finalize = js_cocos2d_ParticleFire_finalize; + jsb_cocos2d_ParticleFire_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_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleFire_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleFire_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleFire_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleFire_class, + js_cocos2dx_ParticleFire_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, "ParticleFire", 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_ParticleFire_class; + p->proto = jsb_cocos2d_ParticleFire_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleFireworks_class; +JSObject *jsb_cocos2d_ParticleFireworks_prototype; + +bool js_cocos2dx_ParticleFireworks_init(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::ParticleFireworks* cobj = (cocos2d::ParticleFireworks *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleFireworks_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleFireworks_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleFireworks_initWithTotalParticles(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::ParticleFireworks* cobj = (cocos2d::ParticleFireworks *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleFireworks_initWithTotalParticles : 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_ParticleFireworks_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleFireworks_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleFireworks_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleFireworks* ret = cocos2d::ParticleFireworks::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFireworks*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleFireworks_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleFireworks_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleFireworks_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleFireworks* ret = cocos2d::ParticleFireworks::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFireworks*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleFireworks_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleFireworks_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleFireworks* cobj = new (std::nothrow) cocos2d::ParticleFireworks(); + 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::ParticleFireworks"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleFireworks_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleFireworks)", obj); +} + +void js_register_cocos2dx_ParticleFireworks(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleFireworks_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleFireworks_class->name = "ParticleFireworks"; + jsb_cocos2d_ParticleFireworks_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleFireworks_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleFireworks_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleFireworks_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleFireworks_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleFireworks_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleFireworks_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleFireworks_class->finalize = js_cocos2d_ParticleFireworks_finalize; + jsb_cocos2d_ParticleFireworks_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("init", js_cocos2dx_ParticleFireworks_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleFireworks_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleFireworks_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleFireworks_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleFireworks_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleFireworks_class, + js_cocos2dx_ParticleFireworks_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, "ParticleFireworks", 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_ParticleFireworks_class; + p->proto = jsb_cocos2d_ParticleFireworks_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleSun_class; +JSObject *jsb_cocos2d_ParticleSun_prototype; + +bool js_cocos2dx_ParticleSun_init(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::ParticleSun* cobj = (cocos2d::ParticleSun *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSun_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSun_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSun_initWithTotalParticles(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::ParticleSun* cobj = (cocos2d::ParticleSun *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSun_initWithTotalParticles : 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_ParticleSun_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSun_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSun_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleSun* ret = cocos2d::ParticleSun::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSun*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSun_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSun_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSun_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleSun* ret = cocos2d::ParticleSun::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSun*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSun_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSun_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleSun* cobj = new (std::nothrow) cocos2d::ParticleSun(); + 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::ParticleSun"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleSun_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSun)", obj); +} + +void js_register_cocos2dx_ParticleSun(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleSun_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleSun_class->name = "ParticleSun"; + jsb_cocos2d_ParticleSun_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSun_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleSun_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSun_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleSun_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleSun_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleSun_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleSun_class->finalize = js_cocos2d_ParticleSun_finalize; + jsb_cocos2d_ParticleSun_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("init", js_cocos2dx_ParticleSun_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSun_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleSun_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSun_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleSun_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleSun_class, + js_cocos2dx_ParticleSun_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, "ParticleSun", 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_ParticleSun_class; + p->proto = jsb_cocos2d_ParticleSun_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleGalaxy_class; +JSObject *jsb_cocos2d_ParticleGalaxy_prototype; + +bool js_cocos2dx_ParticleGalaxy_init(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::ParticleGalaxy* cobj = (cocos2d::ParticleGalaxy *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleGalaxy_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleGalaxy_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleGalaxy_initWithTotalParticles(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::ParticleGalaxy* cobj = (cocos2d::ParticleGalaxy *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleGalaxy_initWithTotalParticles : 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_ParticleGalaxy_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleGalaxy_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleGalaxy_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleGalaxy* ret = cocos2d::ParticleGalaxy::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleGalaxy*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleGalaxy_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleGalaxy_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleGalaxy_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleGalaxy* ret = cocos2d::ParticleGalaxy::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleGalaxy*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleGalaxy_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleGalaxy_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleGalaxy* cobj = new (std::nothrow) cocos2d::ParticleGalaxy(); + 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::ParticleGalaxy"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleGalaxy_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleGalaxy)", obj); +} + +void js_register_cocos2dx_ParticleGalaxy(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleGalaxy_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleGalaxy_class->name = "ParticleGalaxy"; + jsb_cocos2d_ParticleGalaxy_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleGalaxy_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleGalaxy_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleGalaxy_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleGalaxy_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleGalaxy_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleGalaxy_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleGalaxy_class->finalize = js_cocos2d_ParticleGalaxy_finalize; + jsb_cocos2d_ParticleGalaxy_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("init", js_cocos2dx_ParticleGalaxy_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleGalaxy_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleGalaxy_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleGalaxy_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleGalaxy_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleGalaxy_class, + js_cocos2dx_ParticleGalaxy_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, "ParticleGalaxy", 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_ParticleGalaxy_class; + p->proto = jsb_cocos2d_ParticleGalaxy_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleFlower_class; +JSObject *jsb_cocos2d_ParticleFlower_prototype; + +bool js_cocos2dx_ParticleFlower_init(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::ParticleFlower* cobj = (cocos2d::ParticleFlower *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleFlower_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleFlower_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleFlower_initWithTotalParticles(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::ParticleFlower* cobj = (cocos2d::ParticleFlower *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleFlower_initWithTotalParticles : 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_ParticleFlower_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleFlower_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleFlower_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleFlower* ret = cocos2d::ParticleFlower::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFlower*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleFlower_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleFlower_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleFlower_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleFlower* ret = cocos2d::ParticleFlower::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFlower*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleFlower_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleFlower_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleFlower* cobj = new (std::nothrow) cocos2d::ParticleFlower(); + 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::ParticleFlower"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleFlower_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleFlower)", obj); +} + +void js_register_cocos2dx_ParticleFlower(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleFlower_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleFlower_class->name = "ParticleFlower"; + jsb_cocos2d_ParticleFlower_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleFlower_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleFlower_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleFlower_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleFlower_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleFlower_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleFlower_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleFlower_class->finalize = js_cocos2d_ParticleFlower_finalize; + jsb_cocos2d_ParticleFlower_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("init", js_cocos2dx_ParticleFlower_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleFlower_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleFlower_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleFlower_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleFlower_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleFlower_class, + js_cocos2dx_ParticleFlower_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, "ParticleFlower", 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_ParticleFlower_class; + p->proto = jsb_cocos2d_ParticleFlower_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleMeteor_class; +JSObject *jsb_cocos2d_ParticleMeteor_prototype; + +bool js_cocos2dx_ParticleMeteor_init(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::ParticleMeteor* cobj = (cocos2d::ParticleMeteor *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleMeteor_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleMeteor_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleMeteor_initWithTotalParticles(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::ParticleMeteor* cobj = (cocos2d::ParticleMeteor *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleMeteor_initWithTotalParticles : 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_ParticleMeteor_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleMeteor_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleMeteor_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleMeteor* ret = cocos2d::ParticleMeteor::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleMeteor*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleMeteor_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleMeteor_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleMeteor_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleMeteor* ret = cocos2d::ParticleMeteor::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleMeteor*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleMeteor_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleMeteor_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleMeteor* cobj = new (std::nothrow) cocos2d::ParticleMeteor(); + 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::ParticleMeteor"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleMeteor_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleMeteor)", obj); +} + +void js_register_cocos2dx_ParticleMeteor(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleMeteor_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleMeteor_class->name = "ParticleMeteor"; + jsb_cocos2d_ParticleMeteor_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleMeteor_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleMeteor_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleMeteor_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleMeteor_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleMeteor_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleMeteor_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleMeteor_class->finalize = js_cocos2d_ParticleMeteor_finalize; + jsb_cocos2d_ParticleMeteor_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("init", js_cocos2dx_ParticleMeteor_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleMeteor_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleMeteor_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleMeteor_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleMeteor_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleMeteor_class, + js_cocos2dx_ParticleMeteor_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, "ParticleMeteor", 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_ParticleMeteor_class; + p->proto = jsb_cocos2d_ParticleMeteor_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleSpiral_class; +JSObject *jsb_cocos2d_ParticleSpiral_prototype; + +bool js_cocos2dx_ParticleSpiral_init(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::ParticleSpiral* cobj = (cocos2d::ParticleSpiral *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSpiral_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSpiral_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSpiral_initWithTotalParticles(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::ParticleSpiral* cobj = (cocos2d::ParticleSpiral *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSpiral_initWithTotalParticles : 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_ParticleSpiral_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSpiral_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSpiral_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleSpiral* ret = cocos2d::ParticleSpiral::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSpiral*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSpiral_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSpiral_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSpiral_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleSpiral* ret = cocos2d::ParticleSpiral::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSpiral*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSpiral_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSpiral_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleSpiral* cobj = new (std::nothrow) cocos2d::ParticleSpiral(); + 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::ParticleSpiral"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleSpiral_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSpiral)", obj); +} + +void js_register_cocos2dx_ParticleSpiral(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleSpiral_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleSpiral_class->name = "ParticleSpiral"; + jsb_cocos2d_ParticleSpiral_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSpiral_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleSpiral_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSpiral_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleSpiral_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleSpiral_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleSpiral_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleSpiral_class->finalize = js_cocos2d_ParticleSpiral_finalize; + jsb_cocos2d_ParticleSpiral_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("init", js_cocos2dx_ParticleSpiral_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSpiral_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleSpiral_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSpiral_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleSpiral_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleSpiral_class, + js_cocos2dx_ParticleSpiral_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, "ParticleSpiral", 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_ParticleSpiral_class; + p->proto = jsb_cocos2d_ParticleSpiral_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleExplosion_class; +JSObject *jsb_cocos2d_ParticleExplosion_prototype; + +bool js_cocos2dx_ParticleExplosion_init(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::ParticleExplosion* cobj = (cocos2d::ParticleExplosion *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleExplosion_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleExplosion_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleExplosion_initWithTotalParticles(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::ParticleExplosion* cobj = (cocos2d::ParticleExplosion *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleExplosion_initWithTotalParticles : 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_ParticleExplosion_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleExplosion_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleExplosion_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleExplosion* ret = cocos2d::ParticleExplosion::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleExplosion*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleExplosion_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleExplosion_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleExplosion_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleExplosion* ret = cocos2d::ParticleExplosion::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleExplosion*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleExplosion_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleExplosion_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleExplosion* cobj = new (std::nothrow) cocos2d::ParticleExplosion(); + 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::ParticleExplosion"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleExplosion_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleExplosion)", obj); +} + +void js_register_cocos2dx_ParticleExplosion(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleExplosion_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleExplosion_class->name = "ParticleExplosion"; + jsb_cocos2d_ParticleExplosion_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleExplosion_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleExplosion_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleExplosion_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleExplosion_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleExplosion_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleExplosion_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleExplosion_class->finalize = js_cocos2d_ParticleExplosion_finalize; + jsb_cocos2d_ParticleExplosion_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("init", js_cocos2dx_ParticleExplosion_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleExplosion_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleExplosion_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleExplosion_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleExplosion_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleExplosion_class, + js_cocos2dx_ParticleExplosion_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, "ParticleExplosion", 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_ParticleExplosion_class; + p->proto = jsb_cocos2d_ParticleExplosion_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleSmoke_class; +JSObject *jsb_cocos2d_ParticleSmoke_prototype; + +bool js_cocos2dx_ParticleSmoke_init(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::ParticleSmoke* cobj = (cocos2d::ParticleSmoke *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSmoke_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSmoke_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSmoke_initWithTotalParticles(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::ParticleSmoke* cobj = (cocos2d::ParticleSmoke *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSmoke_initWithTotalParticles : 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_ParticleSmoke_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSmoke_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSmoke_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleSmoke* ret = cocos2d::ParticleSmoke::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSmoke*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSmoke_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSmoke_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSmoke_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleSmoke* ret = cocos2d::ParticleSmoke::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSmoke*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSmoke_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSmoke_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleSmoke* cobj = new (std::nothrow) cocos2d::ParticleSmoke(); + 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::ParticleSmoke"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleSmoke_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSmoke)", obj); +} + +void js_register_cocos2dx_ParticleSmoke(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleSmoke_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleSmoke_class->name = "ParticleSmoke"; + jsb_cocos2d_ParticleSmoke_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSmoke_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleSmoke_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSmoke_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleSmoke_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleSmoke_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleSmoke_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleSmoke_class->finalize = js_cocos2d_ParticleSmoke_finalize; + jsb_cocos2d_ParticleSmoke_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("init", js_cocos2dx_ParticleSmoke_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSmoke_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleSmoke_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSmoke_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleSmoke_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleSmoke_class, + js_cocos2dx_ParticleSmoke_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, "ParticleSmoke", 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_ParticleSmoke_class; + p->proto = jsb_cocos2d_ParticleSmoke_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleSnow_class; +JSObject *jsb_cocos2d_ParticleSnow_prototype; + +bool js_cocos2dx_ParticleSnow_init(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::ParticleSnow* cobj = (cocos2d::ParticleSnow *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSnow_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSnow_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleSnow_initWithTotalParticles(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::ParticleSnow* cobj = (cocos2d::ParticleSnow *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSnow_initWithTotalParticles : 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_ParticleSnow_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleSnow_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleSnow_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleSnow* ret = cocos2d::ParticleSnow::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSnow*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSnow_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSnow_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSnow_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleSnow* ret = cocos2d::ParticleSnow::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSnow*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleSnow_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleSnow_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleSnow* cobj = new (std::nothrow) cocos2d::ParticleSnow(); + 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::ParticleSnow"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleSnow_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSnow)", obj); +} + +void js_register_cocos2dx_ParticleSnow(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleSnow_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleSnow_class->name = "ParticleSnow"; + jsb_cocos2d_ParticleSnow_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSnow_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleSnow_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleSnow_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleSnow_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleSnow_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleSnow_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleSnow_class->finalize = js_cocos2d_ParticleSnow_finalize; + jsb_cocos2d_ParticleSnow_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("init", js_cocos2dx_ParticleSnow_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSnow_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleSnow_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSnow_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleSnow_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleSnow_class, + js_cocos2dx_ParticleSnow_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, "ParticleSnow", 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_ParticleSnow_class; + p->proto = jsb_cocos2d_ParticleSnow_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ParticleRain_class; +JSObject *jsb_cocos2d_ParticleRain_prototype; + +bool js_cocos2dx_ParticleRain_init(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::ParticleRain* cobj = (cocos2d::ParticleRain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleRain_init : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->init(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleRain_init : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ParticleRain_initWithTotalParticles(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::ParticleRain* cobj = (cocos2d::ParticleRain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleRain_initWithTotalParticles : 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_ParticleRain_initWithTotalParticles : Error processing arguments"); + bool ret = cobj->initWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParticleRain_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParticleRain_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParticleRain* ret = cocos2d::ParticleRain::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleRain*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleRain_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleRain_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleRain_createWithTotalParticles : Error processing arguments"); + cocos2d::ParticleRain* ret = cocos2d::ParticleRain::createWithTotalParticles(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleRain*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParticleRain_createWithTotalParticles : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParticleRain_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParticleRain* cobj = new (std::nothrow) cocos2d::ParticleRain(); + 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::ParticleRain"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +void js_cocos2d_ParticleRain_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParticleRain)", obj); +} + +void js_register_cocos2dx_ParticleRain(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParticleRain_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParticleRain_class->name = "ParticleRain"; + jsb_cocos2d_ParticleRain_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParticleRain_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParticleRain_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParticleRain_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParticleRain_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParticleRain_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParticleRain_class->convert = JS_ConvertStub; + jsb_cocos2d_ParticleRain_class->finalize = js_cocos2d_ParticleRain_finalize; + jsb_cocos2d_ParticleRain_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("init", js_cocos2dx_ParticleRain_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTotalParticles", js_cocos2dx_ParticleRain_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParticleRain_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTotalParticles", js_cocos2dx_ParticleRain_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParticleRain_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), + jsb_cocos2d_ParticleRain_class, + js_cocos2dx_ParticleRain_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, "ParticleRain", 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_ParticleRain_class; + p->proto = jsb_cocos2d_ParticleRain_prototype; + p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ProgressTimer_class; +JSObject *jsb_cocos2d_ProgressTimer_prototype; + +bool js_cocos2dx_ProgressTimer_initWithSprite(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_initWithSprite : Invalid Native Object"); + if (argc == 1) { + cocos2d::Sprite* 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::Sprite*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_initWithSprite : Error processing arguments"); + bool ret = cobj->initWithSprite(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_initWithSprite : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProgressTimer_isReverseDirection(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_isReverseDirection : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isReverseDirection(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_isReverseDirection : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProgressTimer_setBarChangeRate(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setBarChangeRate : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_setBarChangeRate : Error processing arguments"); + cobj->setBarChangeRate(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setBarChangeRate : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProgressTimer_getPercentage(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getPercentage : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getPercentage(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getPercentage : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProgressTimer_setSprite(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setSprite : Invalid Native Object"); + if (argc == 1) { + cocos2d::Sprite* 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::Sprite*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_setSprite : Error processing arguments"); + cobj->setSprite(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setSprite : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProgressTimer_getType(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getType : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getType(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getType : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProgressTimer_getSprite(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getSprite : Invalid Native Object"); + if (argc == 0) { + cocos2d::Sprite* ret = cobj->getSprite(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getSprite : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProgressTimer_setMidpoint(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setMidpoint : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_setMidpoint : Error processing arguments"); + cobj->setMidpoint(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setMidpoint : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProgressTimer_getBarChangeRate(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getBarChangeRate : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec2 ret = cobj->getBarChangeRate(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getBarChangeRate : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProgressTimer_setReverseDirection(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::ProgressTimer* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setReverseDirection : Invalid Native Object"); + do { + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + cobj->setReverseDirection(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + cobj->setReverseProgress(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setReverseDirection : wrong number of arguments"); + return false; +} +bool js_cocos2dx_ProgressTimer_getMidpoint(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getMidpoint : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec2 ret = cobj->getMidpoint(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getMidpoint : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProgressTimer_setPercentage(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setPercentage : 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_ProgressTimer_setPercentage : Error processing arguments"); + cobj->setPercentage(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setPercentage : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProgressTimer_setType(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setType : Invalid Native Object"); + if (argc == 1) { + cocos2d::ProgressTimer::Type arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_setType : Error processing arguments"); + cobj->setType(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setType : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProgressTimer_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + cocos2d::Sprite* 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::Sprite*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_create : Error processing arguments"); + cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ProgressTimer*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ProgressTimer_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ProgressTimer* cobj = new (std::nothrow) cocos2d::ProgressTimer(); + 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::ProgressTimer"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_ProgressTimer_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ProgressTimer)", obj); +} + +static bool js_cocos2d_ProgressTimer_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::ProgressTimer *nobj = new (std::nothrow) cocos2d::ProgressTimer(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::ProgressTimer"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_ProgressTimer(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ProgressTimer_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ProgressTimer_class->name = "ProgressTimer"; + jsb_cocos2d_ProgressTimer_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ProgressTimer_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ProgressTimer_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ProgressTimer_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ProgressTimer_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ProgressTimer_class->resolve = JS_ResolveStub; + jsb_cocos2d_ProgressTimer_class->convert = JS_ConvertStub; + jsb_cocos2d_ProgressTimer_class->finalize = js_cocos2d_ProgressTimer_finalize; + jsb_cocos2d_ProgressTimer_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("initWithSprite", js_cocos2dx_ProgressTimer_initWithSprite, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isReverseDirection", js_cocos2dx_ProgressTimer_isReverseDirection, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBarChangeRate", js_cocos2dx_ProgressTimer_setBarChangeRate, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPercentage", js_cocos2dx_ProgressTimer_getPercentage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSprite", js_cocos2dx_ProgressTimer_setSprite, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getType", js_cocos2dx_ProgressTimer_getType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSprite", js_cocos2dx_ProgressTimer_getSprite, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMidpoint", js_cocos2dx_ProgressTimer_setMidpoint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBarChangeRate", js_cocos2dx_ProgressTimer_getBarChangeRate, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setReverseDirection", js_cocos2dx_ProgressTimer_setReverseDirection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMidpoint", js_cocos2dx_ProgressTimer_getMidpoint, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPercentage", js_cocos2dx_ProgressTimer_setPercentage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setType", js_cocos2dx_ProgressTimer_setType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_ProgressTimer_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ProgressTimer_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ProgressTimer_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_ProgressTimer_class, + js_cocos2dx_ProgressTimer_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, "ProgressTimer", 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_ProgressTimer_class; + p->proto = jsb_cocos2d_ProgressTimer_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_ProtectedNode_class; +JSObject *jsb_cocos2d_ProtectedNode_prototype; + +bool js_cocos2dx_ProtectedNode_addProtectedChild(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::ProtectedNode* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_addProtectedChild : Invalid Native Object"); + do { + if (argc == 2) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + int arg1; + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + if (!ok) { ok = true; break; } + cobj->addProtectedChild(arg0, arg1); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cobj->addProtectedChild(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 3) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + int arg1; + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + if (!ok) { ok = true; break; } + int arg2; + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + if (!ok) { ok = true; break; } + cobj->addProtectedChild(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_addProtectedChild : wrong number of arguments"); + return false; +} +bool js_cocos2dx_ProtectedNode_disableCascadeColor(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_disableCascadeColor : Invalid Native Object"); + if (argc == 0) { + cobj->disableCascadeColor(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_disableCascadeColor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProtectedNode_removeProtectedChildByTag(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_removeProtectedChildByTag : 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_ProtectedNode_removeProtectedChildByTag : Error processing arguments"); + cobj->removeProtectedChildByTag(arg0); + args.rval().setUndefined(); + return true; + } + if (argc == 2) { + int arg0; + bool arg1; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + arg1 = JS::ToBoolean(args.get(1)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProtectedNode_removeProtectedChildByTag : Error processing arguments"); + cobj->removeProtectedChildByTag(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_removeProtectedChildByTag : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProtectedNode_reorderProtectedChild(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_reorderProtectedChild : Invalid Native Object"); + if (argc == 2) { + cocos2d::Node* arg0; + int arg1; + 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::Node*)(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_ProtectedNode_reorderProtectedChild : Error processing arguments"); + cobj->reorderProtectedChild(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_reorderProtectedChild : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup : Error processing arguments"); + cobj->removeAllProtectedChildrenWithCleanup(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProtectedNode_disableCascadeOpacity(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_disableCascadeOpacity : Invalid Native Object"); + if (argc == 0) { + cobj->disableCascadeOpacity(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_disableCascadeOpacity : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProtectedNode_sortAllProtectedChildren(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_sortAllProtectedChildren : Invalid Native Object"); + if (argc == 0) { + cobj->sortAllProtectedChildren(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_sortAllProtectedChildren : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProtectedNode_getProtectedChildByTag(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_getProtectedChildByTag : 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_ProtectedNode_getProtectedChildByTag : Error processing arguments"); + cocos2d::Node* ret = cobj->getProtectedChildByTag(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_getProtectedChildByTag : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProtectedNode_removeProtectedChild(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_removeProtectedChild : Invalid Native Object"); + if (argc == 1) { + cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProtectedNode_removeProtectedChild : Error processing arguments"); + cobj->removeProtectedChild(arg0); + args.rval().setUndefined(); + return true; + } + if (argc == 2) { + cocos2d::Node* arg0; + bool arg1; + 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::Node*)(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_ProtectedNode_removeProtectedChild : Error processing arguments"); + cobj->removeProtectedChild(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_removeProtectedChild : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ProtectedNode_removeAllProtectedChildren(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::ProtectedNode* cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_removeAllProtectedChildren : Invalid Native Object"); + if (argc == 0) { + cobj->removeAllProtectedChildren(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_removeAllProtectedChildren : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_ProtectedNode_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ProtectedNode* ret = cocos2d::ProtectedNode::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ProtectedNode*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ProtectedNode_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ProtectedNode_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ProtectedNode* cobj = new (std::nothrow) cocos2d::ProtectedNode(); + 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::ProtectedNode"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_ProtectedNode_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ProtectedNode)", obj); +} + +void js_register_cocos2dx_ProtectedNode(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ProtectedNode_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ProtectedNode_class->name = "ProtectedNode"; + jsb_cocos2d_ProtectedNode_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ProtectedNode_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ProtectedNode_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ProtectedNode_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ProtectedNode_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ProtectedNode_class->resolve = JS_ResolveStub; + jsb_cocos2d_ProtectedNode_class->convert = JS_ConvertStub; + jsb_cocos2d_ProtectedNode_class->finalize = js_cocos2d_ProtectedNode_finalize; + jsb_cocos2d_ProtectedNode_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("addProtectedChild", js_cocos2dx_ProtectedNode_addProtectedChild, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("disableCascadeColor", js_cocos2dx_ProtectedNode_disableCascadeColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeProtectedChildByTag", js_cocos2dx_ProtectedNode_removeProtectedChildByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("reorderProtectedChild", js_cocos2dx_ProtectedNode_reorderProtectedChild, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllProtectedChildrenWithCleanup", js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("disableCascadeOpacity", js_cocos2dx_ProtectedNode_disableCascadeOpacity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("sortAllProtectedChildren", js_cocos2dx_ProtectedNode_sortAllProtectedChildren, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getProtectedChildByTag", js_cocos2dx_ProtectedNode_getProtectedChildByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeProtectedChild", js_cocos2dx_ProtectedNode_removeProtectedChild, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllProtectedChildren", js_cocos2dx_ProtectedNode_removeAllProtectedChildren, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ProtectedNode_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ProtectedNode_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_ProtectedNode_class, + js_cocos2dx_ProtectedNode_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, "ProtectedNode", 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_ProtectedNode_class; + p->proto = jsb_cocos2d_ProtectedNode_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Sprite_class; +JSObject *jsb_cocos2d_Sprite_prototype; + +bool js_cocos2dx_Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Sprite* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setSpriteFrame : Invalid Native Object"); + do { + if (argc == 1) { + cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cobj->setSpriteFrame(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cobj->setSpriteFrame(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_Sprite_setSpriteFrame : wrong number of arguments"); + return false; +} +bool js_cocos2dx_Sprite_setTexture(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Sprite* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setTexture : Invalid Native Object"); + do { + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_Sprite_setTexture : wrong number of arguments"); + return false; +} +bool js_cocos2dx_Sprite_getTexture(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getTexture : Invalid Native Object"); + if (argc == 0) { + cocos2d::Texture2D* ret = cobj->getTexture(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_setFlippedY(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setFlippedY : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setFlippedY : Error processing arguments"); + cobj->setFlippedY(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setFlippedY : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_setFlippedX(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setFlippedX : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setFlippedX : Error processing arguments"); + cobj->setFlippedX(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setFlippedX : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_setRotationSkewX(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setRotationSkewX : 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_Sprite_setRotationSkewX : Error processing arguments"); + cobj->setRotationSkewX(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setRotationSkewX : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_setRotationSkewY(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setRotationSkewY : 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_Sprite_setRotationSkewY : Error processing arguments"); + cobj->setRotationSkewY(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setRotationSkewY : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Sprite* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithTexture : Invalid Native Object"); + do { + if (argc == 2) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Rect arg1; + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithTexture(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithTexture(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 3) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Rect arg1; + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + bool arg2; + arg2 = JS::ToBoolean(args.get(2)); + bool ret = cobj->initWithTexture(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_Sprite_initWithTexture : wrong number of arguments"); + return false; +} +bool js_cocos2dx_Sprite_getBatchNode(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getBatchNode : Invalid Native Object"); + if (argc == 0) { + cocos2d::SpriteBatchNode* ret = cobj->getBatchNode(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::SpriteBatchNode*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_getBatchNode : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_getOffsetPosition(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getOffsetPosition : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Vec2& ret = cobj->getOffsetPosition(); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_getOffsetPosition : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_removeAllChildrenWithCleanup(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_removeAllChildrenWithCleanup : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_removeAllChildrenWithCleanup : Error processing arguments"); + cobj->removeAllChildrenWithCleanup(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_removeAllChildrenWithCleanup : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Sprite* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setTextureRect : Invalid Native Object"); + do { + if (argc == 3) { + cocos2d::Rect arg0; + ok &= jsval_to_ccrect(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + bool arg1; + arg1 = JS::ToBoolean(args.get(1)); + cocos2d::Size arg2; + ok &= jsval_to_ccsize(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cobj->setTextureRect(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + cocos2d::Rect arg0; + ok &= jsval_to_ccrect(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cobj->setTextureRect(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_Sprite_setTextureRect : wrong number of arguments"); + return false; +} +bool js_cocos2dx_Sprite_initWithSpriteFrameName(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithSpriteFrameName : 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_Sprite_initWithSpriteFrameName : Error processing arguments"); + bool ret = cobj->initWithSpriteFrameName(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_initWithSpriteFrameName : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_isFrameDisplayed(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isFrameDisplayed : Invalid Native Object"); + if (argc == 1) { + cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_isFrameDisplayed : Error processing arguments"); + bool ret = cobj->isFrameDisplayed(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_isFrameDisplayed : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_getAtlasIndex(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getAtlasIndex : Invalid Native Object"); + if (argc == 0) { + ssize_t ret = cobj->getAtlasIndex(); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_getAtlasIndex : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_setBatchNode(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setBatchNode : Invalid Native Object"); + if (argc == 1) { + cocos2d::SpriteBatchNode* 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::SpriteBatchNode*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setBatchNode : Error processing arguments"); + cobj->setBatchNode(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setBatchNode : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_getBlendFunc(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getBlendFunc : Invalid Native Object"); + if (argc == 0) { + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + jsval jsret = JSVAL_NULL; + jsret = blendfunc_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_setDisplayFrameWithAnimationName(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setDisplayFrameWithAnimationName : Invalid Native Object"); + if (argc == 2) { + std::string arg0; + ssize_t arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_ssize(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setDisplayFrameWithAnimationName : Error processing arguments"); + cobj->setDisplayFrameWithAnimationName(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setDisplayFrameWithAnimationName : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_Sprite_setTextureAtlas(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setTextureAtlas : Invalid Native Object"); + if (argc == 1) { + cocos2d::TextureAtlas* 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::TextureAtlas*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setTextureAtlas : Error processing arguments"); + cobj->setTextureAtlas(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setTextureAtlas : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_getSpriteFrame(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getSpriteFrame : Invalid Native Object"); + if (argc == 0) { + cocos2d::SpriteFrame* ret = cobj->getSpriteFrame(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::SpriteFrame*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_getSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_isDirty(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isDirty : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isDirty(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_isDirty : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_setAtlasIndex(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setAtlasIndex : Invalid Native Object"); + if (argc == 1) { + ssize_t arg0; + ok &= jsval_to_ssize(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setAtlasIndex : Error processing arguments"); + cobj->setAtlasIndex(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setAtlasIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_setDirty(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setDirty : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setDirty : Error processing arguments"); + cobj->setDirty(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setDirty : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_isTextureRectRotated(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isTextureRectRotated : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isTextureRectRotated(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_isTextureRectRotated : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_getTextureRect(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getTextureRect : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Rect& ret = cobj->getTextureRect(); + jsval jsret = JSVAL_NULL; + jsret = ccrect_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_getTextureRect : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_initWithFile(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Sprite* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithFile : Invalid Native Object"); + do { + if (argc == 2) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cocos2d::Rect arg1; + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithFile(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithFile(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_Sprite_initWithFile : wrong number of arguments"); + return false; +} +bool js_cocos2dx_Sprite_setBlendFunc(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setBlendFunc : Invalid Native Object"); + if (argc == 1) { + cocos2d::BlendFunc arg0; + ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setBlendFunc : Error processing arguments"); + cobj->setBlendFunc(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_getTextureAtlas(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getTextureAtlas : Invalid Native Object"); + if (argc == 0) { + cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TextureAtlas*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_getTextureAtlas : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_initWithSpriteFrame(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithSpriteFrame : Invalid Native Object"); + if (argc == 1) { + cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_initWithSpriteFrame : Error processing arguments"); + bool ret = cobj->initWithSpriteFrame(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_initWithSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_isFlippedX(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isFlippedX : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isFlippedX(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_isFlippedX : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_isFlippedY(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isFlippedY : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isFlippedY(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_isFlippedY : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Sprite_setVertexRect(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setVertexRect : Invalid Native Object"); + if (argc == 1) { + cocos2d::Rect arg0; + ok &= jsval_to_ccrect(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setVertexRect : Error processing arguments"); + cobj->setVertexRect(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Sprite_setVertexRect : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Sprite_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cocos2d::Sprite* ret = cocos2d::Sprite::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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::Sprite* ret = cocos2d::Sprite::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cocos2d::Rect arg1; + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Sprite* ret = cocos2d::Sprite::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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_Sprite_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_Sprite_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 2) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Rect arg1; + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Rect arg1; + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + bool arg2; + arg2 = JS::ToBoolean(args.get(2)); + if (!ok) { ok = true; break; } + cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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_Sprite_createWithTexture : wrong number of arguments"); + return false; +} +bool js_cocos2dx_Sprite_createWithSpriteFrameName(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_Sprite_createWithSpriteFrameName : Error processing arguments"); + cocos2d::Sprite* ret = cocos2d::Sprite::createWithSpriteFrameName(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Sprite_createWithSpriteFrameName : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Sprite_createWithSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_createWithSpriteFrame : Error processing arguments"); + cocos2d::Sprite* ret = cocos2d::Sprite::createWithSpriteFrame(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Sprite_createWithSpriteFrame : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Sprite_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Sprite* cobj = new (std::nothrow) cocos2d::Sprite(); + 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::Sprite"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_Sprite_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Sprite)", obj); +} + +static bool js_cocos2d_Sprite_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::Sprite *nobj = new (std::nothrow) cocos2d::Sprite(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Sprite"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_Sprite(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Sprite_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Sprite_class->name = "Sprite"; + jsb_cocos2d_Sprite_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Sprite_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Sprite_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Sprite_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Sprite_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Sprite_class->resolve = JS_ResolveStub; + jsb_cocos2d_Sprite_class->convert = JS_ConvertStub; + jsb_cocos2d_Sprite_class->finalize = js_cocos2d_Sprite_finalize; + jsb_cocos2d_Sprite_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("setSpriteFrame", js_cocos2dx_Sprite_setSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTexture", js_cocos2dx_Sprite_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTexture", js_cocos2dx_Sprite_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFlippedY", js_cocos2dx_Sprite_setFlippedY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFlippedX", js_cocos2dx_Sprite_setFlippedX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRotationSkewX", js_cocos2dx_Sprite_setRotationSkewX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRotationSkewY", js_cocos2dx_Sprite_setRotationSkewY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTexture", js_cocos2dx_Sprite_initWithTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBatchNode", js_cocos2dx_Sprite_getBatchNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getOffsetPosition", js_cocos2dx_Sprite_getOffsetPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllChildrenWithCleanup", js_cocos2dx_Sprite_removeAllChildrenWithCleanup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTextureRect", js_cocos2dx_Sprite_setTextureRect, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithSpriteFrameName", js_cocos2dx_Sprite_initWithSpriteFrameName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isFrameDisplayed", js_cocos2dx_Sprite_isFrameDisplayed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAtlasIndex", js_cocos2dx_Sprite_getAtlasIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBatchNode", js_cocos2dx_Sprite_setBatchNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBlendFunc", js_cocos2dx_Sprite_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDisplayFrameWithAnimationName", js_cocos2dx_Sprite_setDisplayFrameWithAnimationName, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTextureAtlas", js_cocos2dx_Sprite_setTextureAtlas, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSpriteFrame", js_cocos2dx_Sprite_getSpriteFrame, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isDirty", js_cocos2dx_Sprite_isDirty, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAtlasIndex", js_cocos2dx_Sprite_setAtlasIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDirty", js_cocos2dx_Sprite_setDirty, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isTextureRectRotated", js_cocos2dx_Sprite_isTextureRectRotated, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTextureRect", js_cocos2dx_Sprite_getTextureRect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithFile", js_cocos2dx_Sprite_initWithFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBlendFunc", js_cocos2dx_Sprite_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTextureAtlas", js_cocos2dx_Sprite_getTextureAtlas, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithSpriteFrame", js_cocos2dx_Sprite_initWithSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isFlippedX", js_cocos2dx_Sprite_isFlippedX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isFlippedY", js_cocos2dx_Sprite_isFlippedY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setVertexRect", js_cocos2dx_Sprite_setVertexRect, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_Sprite_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_Sprite_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithTexture", js_cocos2dx_Sprite_createWithTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithSpriteFrameName", js_cocos2dx_Sprite_createWithSpriteFrameName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithSpriteFrame", js_cocos2dx_Sprite_createWithSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Sprite_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_Sprite_class, + js_cocos2dx_Sprite_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, "Sprite", 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_Sprite_class; + p->proto = jsb_cocos2d_Sprite_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Image_class; +JSObject *jsb_cocos2d_Image_prototype; + +bool js_cocos2dx_Image_hasPremultipliedAlpha(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_hasPremultipliedAlpha : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->hasPremultipliedAlpha(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_hasPremultipliedAlpha : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_getDataLen(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getDataLen : Invalid Native Object"); + if (argc == 0) { + ssize_t ret = cobj->getDataLen(); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_getDataLen : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_saveToFile(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_saveToFile : 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_Image_saveToFile : Error processing arguments"); + bool ret = cobj->saveToFile(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + if (argc == 2) { + std::string arg0; + bool arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + arg1 = JS::ToBoolean(args.get(1)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Image_saveToFile : Error processing arguments"); + bool ret = cobj->saveToFile(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_saveToFile : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Image_hasAlpha(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_hasAlpha : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->hasAlpha(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_hasAlpha : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_isCompressed(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_isCompressed : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isCompressed(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_isCompressed : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_getHeight(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getHeight : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getHeight(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_getHeight : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_initWithImageFile(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_initWithImageFile : 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_Image_initWithImageFile : Error processing arguments"); + bool ret = cobj->initWithImageFile(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_initWithImageFile : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Image_getWidth(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getWidth : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getWidth(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_getWidth : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_getBitPerPixel(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getBitPerPixel : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getBitPerPixel(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_getBitPerPixel : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_getFileType(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getFileType : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getFileType(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_getFileType : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_getNumberOfMipmaps(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getNumberOfMipmaps : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getNumberOfMipmaps(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_getNumberOfMipmaps : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_getRenderFormat(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getRenderFormat : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getRenderFormat(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_getRenderFormat : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_getData(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getData : Invalid Native Object"); + if (argc == 0) { + unsigned char* ret = cobj->getData(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR unsigned char*; + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_getData : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_getMipmaps(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getMipmaps : Invalid Native Object"); + if (argc == 0) { + cocos2d::_MipmapInfo* ret = cobj->getMipmaps(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR _MipmapInfo*; + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_getMipmaps : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Image_initWithRawData(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_initWithRawData : Invalid Native Object"); + if (argc == 5) { + const unsigned char* arg0; + ssize_t arg1; + int arg2; + int arg3; + int arg4; + #pragma warning NO CONVERSION TO NATIVE FOR unsigned char* + ok = false; + ok &= jsval_to_ssize(cx, args.get(1), &arg1); + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); + ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Image_initWithRawData : Error processing arguments"); + bool ret = cobj->initWithRawData(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + if (argc == 6) { + const unsigned char* arg0; + ssize_t arg1; + int arg2; + int arg3; + int arg4; + bool arg5; + #pragma warning NO CONVERSION TO NATIVE FOR unsigned char* + ok = false; + ok &= jsval_to_ssize(cx, args.get(1), &arg1); + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); + ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); + arg5 = JS::ToBoolean(args.get(5)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Image_initWithRawData : Error processing arguments"); + bool ret = cobj->initWithRawData(arg0, arg1, arg2, arg3, arg4, arg5); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Image_initWithRawData : wrong number of arguments: %d, was expecting %d", argc, 5); + return false; +} +bool js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha : Error processing arguments"); + cocos2d::Image::setPVRImagesHavePremultipliedAlpha(arg0); + args.rval().setUndefined(); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Image_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Image* cobj = new (std::nothrow) cocos2d::Image(); + 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::Image"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + + +void js_cocos2d_Image_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Image)", obj); +} + +void js_register_cocos2dx_Image(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Image_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Image_class->name = "Image"; + jsb_cocos2d_Image_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Image_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Image_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Image_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Image_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Image_class->resolve = JS_ResolveStub; + jsb_cocos2d_Image_class->convert = JS_ConvertStub; + jsb_cocos2d_Image_class->finalize = js_cocos2d_Image_finalize; + jsb_cocos2d_Image_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("hasPremultipliedAlpha", js_cocos2dx_Image_hasPremultipliedAlpha, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDataLen", js_cocos2dx_Image_getDataLen, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("saveToFile", js_cocos2dx_Image_saveToFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("hasAlpha", js_cocos2dx_Image_hasAlpha, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isCompressed", js_cocos2dx_Image_isCompressed, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getHeight", js_cocos2dx_Image_getHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithImageFile", js_cocos2dx_Image_initWithImageFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getWidth", js_cocos2dx_Image_getWidth, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBitPerPixel", js_cocos2dx_Image_getBitPerPixel, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFileType", js_cocos2dx_Image_getFileType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getNumberOfMipmaps", js_cocos2dx_Image_getNumberOfMipmaps, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRenderFormat", js_cocos2dx_Image_getRenderFormat, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getData", js_cocos2dx_Image_getData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMipmaps", js_cocos2dx_Image_getMipmaps, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithRawData", js_cocos2dx_Image_initWithRawData, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("setPVRImagesHavePremultipliedAlpha", js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Image_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Image_class, + js_cocos2dx_Image_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, "Image", 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_Image_class; + p->proto = jsb_cocos2d_Image_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_RenderTexture_class; +JSObject *jsb_cocos2d_RenderTexture_prototype; + +bool js_cocos2dx_RenderTexture_setVirtualViewport(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setVirtualViewport : Invalid Native Object"); + if (argc == 3) { + cocos2d::Vec2 arg0; + cocos2d::Rect arg1; + cocos2d::Rect arg2; + ok &= jsval_to_vector2(cx, args.get(0), &arg0); + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + ok &= jsval_to_ccrect(cx, args.get(2), &arg2); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setVirtualViewport : Error processing arguments"); + cobj->setVirtualViewport(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_setVirtualViewport : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_RenderTexture_clearStencil(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_clearStencil : 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_RenderTexture_clearStencil : Error processing arguments"); + cobj->clearStencil(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_clearStencil : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_RenderTexture_getClearDepth(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getClearDepth : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getClearDepth(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_getClearDepth : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_getClearStencil(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getClearStencil : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getClearStencil(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_getClearStencil : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_end(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_end : Invalid Native Object"); + if (argc == 0) { + cobj->end(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_end : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_setClearStencil(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setClearStencil : 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_RenderTexture_setClearStencil : Error processing arguments"); + cobj->setClearStencil(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_setClearStencil : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_RenderTexture_setSprite(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setSprite : Invalid Native Object"); + if (argc == 1) { + cocos2d::Sprite* 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::Sprite*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setSprite : Error processing arguments"); + cobj->setSprite(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_setSprite : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_RenderTexture_getSprite(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getSprite : Invalid Native Object"); + if (argc == 0) { + cocos2d::Sprite* ret = cobj->getSprite(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_getSprite : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_isAutoDraw(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_isAutoDraw : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isAutoDraw(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_isAutoDraw : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_setKeepMatrix(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setKeepMatrix : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setKeepMatrix : Error processing arguments"); + cobj->setKeepMatrix(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_setKeepMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_RenderTexture_setClearFlags(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setClearFlags : 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_RenderTexture_setClearFlags : Error processing arguments"); + cobj->setClearFlags(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_setClearFlags : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_RenderTexture_begin(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_begin : Invalid Native Object"); + if (argc == 0) { + cobj->begin(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_begin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_setAutoDraw(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setAutoDraw : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setAutoDraw : Error processing arguments"); + cobj->setAutoDraw(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_setAutoDraw : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_RenderTexture_setClearColor(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setClearColor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color4F arg0; + ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setClearColor : Error processing arguments"); + cobj->setClearColor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_setClearColor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_RenderTexture_endToLua(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_endToLua : Invalid Native Object"); + if (argc == 0) { + cobj->endToLua(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_endToLua : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_beginWithClear(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::RenderTexture* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_beginWithClear : Invalid Native Object"); + do { + if (argc == 5) { + 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; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + double arg3; + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + if (!ok) { ok = true; break; } + double arg4; + ok &= JS::ToNumber( cx, args.get(4), &arg4) && !isnan(arg4); + if (!ok) { ok = true; break; } + cobj->beginWithClear(arg0, arg1, arg2, arg3, arg4); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 4) { + 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; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + double arg3; + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + if (!ok) { ok = true; break; } + cobj->beginWithClear(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 6) { + 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; } + double arg2; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + if (!ok) { ok = true; break; } + double arg3; + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + if (!ok) { ok = true; break; } + double arg4; + ok &= JS::ToNumber( cx, args.get(4), &arg4) && !isnan(arg4); + if (!ok) { ok = true; break; } + int arg5; + ok &= jsval_to_int32(cx, args.get(5), (int32_t *)&arg5); + if (!ok) { ok = true; break; } + cobj->beginWithClear(arg0, arg1, arg2, arg3, arg4, arg5); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_beginWithClear : wrong number of arguments"); + return false; +} +bool js_cocos2dx_RenderTexture_clearDepth(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_clearDepth : 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_RenderTexture_clearDepth : Error processing arguments"); + cobj->clearDepth(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_clearDepth : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_RenderTexture_getClearColor(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getClearColor : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Color4F& ret = cobj->getClearColor(); + jsval jsret = JSVAL_NULL; + jsret = cccolor4f_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_getClearColor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_clear(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_clear : 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_RenderTexture_clear : Error processing arguments"); + cobj->clear(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_clear : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_RenderTexture_getClearFlags(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getClearFlags : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getClearFlags(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_getClearFlags : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_newImage(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_newImage : Invalid Native Object"); + if (argc == 0) { + cocos2d::Image* ret = cobj->newImage(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Image*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_newImage : Error processing arguments"); + cocos2d::Image* ret = cobj->newImage(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Image*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_newImage : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_RenderTexture_setClearDepth(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setClearDepth : 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_RenderTexture_setClearDepth : Error processing arguments"); + cobj->setClearDepth(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_setClearDepth : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_RenderTexture_initWithWidthAndHeight(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::RenderTexture* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_initWithWidthAndHeight : Invalid Native Object"); + do { + if (argc == 4) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + if (!ok) { ok = true; break; } + int arg1; + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + if (!ok) { ok = true; break; } + cocos2d::Texture2D::PixelFormat arg2; + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + if (!ok) { ok = true; break; } + unsigned int arg3; + ok &= jsval_to_uint32(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 3) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + if (!ok) { ok = true; break; } + int arg1; + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + if (!ok) { ok = true; break; } + cocos2d::Texture2D::PixelFormat arg2; + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + if (!ok) { ok = true; break; } + bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_RenderTexture_initWithWidthAndHeight : wrong number of arguments"); + return false; +} +bool js_cocos2dx_RenderTexture_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 3) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + if (!ok) { ok = true; break; } + int arg1; + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + if (!ok) { ok = true; break; } + cocos2d::Texture2D::PixelFormat arg2; + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + if (!ok) { ok = true; break; } + cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::RenderTexture*)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) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + if (!ok) { ok = true; break; } + int arg1; + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + if (!ok) { ok = true; break; } + cocos2d::Texture2D::PixelFormat arg2; + ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); + if (!ok) { ok = true; break; } + unsigned int arg3; + ok &= jsval_to_uint32(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::RenderTexture*)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) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + if (!ok) { ok = true; break; } + int arg1; + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + if (!ok) { ok = true; break; } + cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::RenderTexture*)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_RenderTexture_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_RenderTexture_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::RenderTexture* cobj = new (std::nothrow) cocos2d::RenderTexture(); + 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::RenderTexture"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_RenderTexture_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (RenderTexture)", obj); +} + +static bool js_cocos2d_RenderTexture_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::RenderTexture *nobj = new (std::nothrow) cocos2d::RenderTexture(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::RenderTexture"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_RenderTexture(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_RenderTexture_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_RenderTexture_class->name = "RenderTexture"; + jsb_cocos2d_RenderTexture_class->addProperty = JS_PropertyStub; + jsb_cocos2d_RenderTexture_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_RenderTexture_class->getProperty = JS_PropertyStub; + jsb_cocos2d_RenderTexture_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_RenderTexture_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_RenderTexture_class->resolve = JS_ResolveStub; + jsb_cocos2d_RenderTexture_class->convert = JS_ConvertStub; + jsb_cocos2d_RenderTexture_class->finalize = js_cocos2d_RenderTexture_finalize; + jsb_cocos2d_RenderTexture_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("setVirtualViewport", js_cocos2dx_RenderTexture_setVirtualViewport, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clearStencil", js_cocos2dx_RenderTexture_clearStencil, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getClearDepth", js_cocos2dx_RenderTexture_getClearDepth, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getClearStencil", js_cocos2dx_RenderTexture_getClearStencil, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("end", js_cocos2dx_RenderTexture_end, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setClearStencil", js_cocos2dx_RenderTexture_setClearStencil, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSprite", js_cocos2dx_RenderTexture_setSprite, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSprite", js_cocos2dx_RenderTexture_getSprite, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isAutoDraw", js_cocos2dx_RenderTexture_isAutoDraw, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setKeepMatrix", js_cocos2dx_RenderTexture_setKeepMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setClearFlags", js_cocos2dx_RenderTexture_setClearFlags, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("begin", js_cocos2dx_RenderTexture_begin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAutoDraw", js_cocos2dx_RenderTexture_setAutoDraw, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setClearColor", js_cocos2dx_RenderTexture_setClearColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("endToLua", js_cocos2dx_RenderTexture_endToLua, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("beginWithClear", js_cocos2dx_RenderTexture_beginWithClear, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clearDepth", js_cocos2dx_RenderTexture_clearDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getClearColor", js_cocos2dx_RenderTexture_getClearColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clear", js_cocos2dx_RenderTexture_clear, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getClearFlags", js_cocos2dx_RenderTexture_getClearFlags, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("newImage", js_cocos2dx_RenderTexture_newImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setClearDepth", js_cocos2dx_RenderTexture_setClearDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithWidthAndHeight", js_cocos2dx_RenderTexture_initWithWidthAndHeight, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_RenderTexture_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_RenderTexture_create, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_RenderTexture_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_RenderTexture_class, + js_cocos2dx_RenderTexture_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, "RenderTexture", 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_RenderTexture_class; + p->proto = jsb_cocos2d_RenderTexture_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_TransitionEaseScene_class; JSObject *jsb_cocos2d_TransitionEaseScene_prototype; @@ -44924,5552 +56256,44 @@ void js_register_cocos2dx_TransitionProgressOutIn(JSContext *cx, JS::HandleObjec } } -JSClass *jsb_cocos2d_MenuItem_class; -JSObject *jsb_cocos2d_MenuItem_prototype; +JSClass *jsb_cocos2d_Camera_class; +JSObject *jsb_cocos2d_Camera_prototype; -bool js_cocos2dx_MenuItem_setEnabled(JSContext *cx, uint32_t argc, jsval *vp) +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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_setEnabled : Invalid Native Object"); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setScene : Invalid Native Object"); if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItem_setEnabled : Error processing arguments"); - cobj->setEnabled(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItem_setEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItem_activate(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_activate : Invalid Native Object"); - if (argc == 0) { - cobj->activate(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItem_activate : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItem_initWithCallback(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_initWithCallback : Invalid Native Object"); - if (argc == 1) { - std::function arg0; - do { - if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(0))); - auto lambda = [=](cocos2d::Ref* larg0) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[1]; - do { - if (larg0) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); - largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - largv[0] = JSVAL_NULL; - } - } while (0); - JS::RootedValue rval(cx); - bool ok = func->invoke(1, &largv[0], &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg0 = lambda; - } - else - { - arg0 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItem_initWithCallback : Error processing arguments"); - bool ret = cobj->initWithCallback(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItem_initWithCallback : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItem_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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_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_MenuItem_isEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItem_selected(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_selected : Invalid Native Object"); - if (argc == 0) { - cobj->selected(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItem_selected : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItem_isSelected(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_isSelected : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isSelected(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItem_isSelected : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItem_unselected(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_unselected : Invalid Native Object"); - if (argc == 0) { - cobj->unselected(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItem_unselected : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItem_rect(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::MenuItem* cobj = (cocos2d::MenuItem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItem_rect : Invalid Native Object"); - if (argc == 0) { - cocos2d::Rect ret = cobj->rect(); - jsval jsret = JSVAL_NULL; - jsret = ccrect_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItem_rect : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItem_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::MenuItem* cobj = new (std::nothrow) cocos2d::MenuItem(); - 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::MenuItem"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_MenuItem_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (MenuItem)", obj); -} - -static bool js_cocos2d_MenuItem_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::MenuItem *nobj = new (std::nothrow) cocos2d::MenuItem(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItem"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_MenuItem(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_MenuItem_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_MenuItem_class->name = "MenuItem"; - jsb_cocos2d_MenuItem_class->addProperty = JS_PropertyStub; - jsb_cocos2d_MenuItem_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_MenuItem_class->getProperty = JS_PropertyStub; - jsb_cocos2d_MenuItem_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_MenuItem_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_MenuItem_class->resolve = JS_ResolveStub; - jsb_cocos2d_MenuItem_class->convert = JS_ConvertStub; - jsb_cocos2d_MenuItem_class->finalize = js_cocos2d_MenuItem_finalize; - jsb_cocos2d_MenuItem_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_MenuItem_setEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("activate", js_cocos2dx_MenuItem_activate, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithCallback", js_cocos2dx_MenuItem_initWithCallback, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isEnabled", js_cocos2dx_MenuItem_isEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("selected", js_cocos2dx_MenuItem_selected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isSelected", js_cocos2dx_MenuItem_isSelected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("unselected", js_cocos2dx_MenuItem_unselected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("rect", js_cocos2dx_MenuItem_rect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_MenuItem_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_MenuItem_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_MenuItem_class, - js_cocos2dx_MenuItem_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, "MenuItem", 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_MenuItem_class; - p->proto = jsb_cocos2d_MenuItem_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_MenuItemLabel_class; -JSObject *jsb_cocos2d_MenuItemLabel_prototype; - -bool js_cocos2dx_MenuItemLabel_setLabel(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_setLabel : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* arg0; + 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::Node*)(jsProxy ? jsProxy->ptr : NULL); + arg0 = (cocos2d::Scene*)(jsProxy ? jsProxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemLabel_setLabel : Error processing arguments"); - cobj->setLabel(arg0); + 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_MenuItemLabel_setLabel : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_Camera_setScene : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_MenuItemLabel_getDisabledColor(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_getDisabledColor : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Color3B& ret = cobj->getDisabledColor(); - jsval jsret = JSVAL_NULL; - jsret = cccolor3b_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_getDisabledColor : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemLabel_setString(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_setString : 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_MenuItemLabel_setString : Error processing arguments"); - cobj->setString(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_setString : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemLabel_initWithLabel(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_initWithLabel : Invalid Native Object"); - if (argc == 2) { - cocos2d::Node* arg0; - std::function arg1; - 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - do { - if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(1))); - auto lambda = [=](cocos2d::Ref* larg0) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[1]; - do { - if (larg0) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); - largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - largv[0] = JSVAL_NULL; - } - } while (0); - JS::RootedValue rval(cx); - bool ok = func->invoke(1, &largv[0], &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg1 = lambda; - } - else - { - arg1 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemLabel_initWithLabel : Error processing arguments"); - bool ret = cobj->initWithLabel(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_initWithLabel : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_MenuItemLabel_setDisabledColor(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_setDisabledColor : Invalid Native Object"); - if (argc == 1) { - cocos2d::Color3B arg0; - ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemLabel_setDisabledColor : Error processing arguments"); - cobj->setDisabledColor(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_setDisabledColor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemLabel_getLabel(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::MenuItemLabel* cobj = (cocos2d::MenuItemLabel *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemLabel_getLabel : Invalid Native Object"); - if (argc == 0) { - cocos2d::Node* ret = cobj->getLabel(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemLabel_getLabel : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemLabel_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::MenuItemLabel* cobj = new (std::nothrow) cocos2d::MenuItemLabel(); - 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::MenuItemLabel"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_MenuItem_prototype; - -void js_cocos2d_MenuItemLabel_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemLabel)", obj); -} - -static bool js_cocos2d_MenuItemLabel_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::MenuItemLabel *nobj = new (std::nothrow) cocos2d::MenuItemLabel(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemLabel"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_MenuItemLabel(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_MenuItemLabel_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_MenuItemLabel_class->name = "MenuItemLabel"; - jsb_cocos2d_MenuItemLabel_class->addProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemLabel_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_MenuItemLabel_class->getProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemLabel_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_MenuItemLabel_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_MenuItemLabel_class->resolve = JS_ResolveStub; - jsb_cocos2d_MenuItemLabel_class->convert = JS_ConvertStub; - jsb_cocos2d_MenuItemLabel_class->finalize = js_cocos2d_MenuItemLabel_finalize; - jsb_cocos2d_MenuItemLabel_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("setLabel", js_cocos2dx_MenuItemLabel_setLabel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDisabledColor", js_cocos2dx_MenuItemLabel_getDisabledColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setString", js_cocos2dx_MenuItemLabel_setString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithLabel", js_cocos2dx_MenuItemLabel_initWithLabel, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDisabledColor", js_cocos2dx_MenuItemLabel_setDisabledColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getLabel", js_cocos2dx_MenuItemLabel_getLabel, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_MenuItemLabel_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_MenuItemLabel_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_MenuItem_prototype), - jsb_cocos2d_MenuItemLabel_class, - js_cocos2dx_MenuItemLabel_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, "MenuItemLabel", 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_MenuItemLabel_class; - p->proto = jsb_cocos2d_MenuItemLabel_prototype; - p->parentProto = jsb_cocos2d_MenuItem_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_MenuItemAtlasFont_class; -JSObject *jsb_cocos2d_MenuItemAtlasFont_prototype; - -bool js_cocos2dx_MenuItemAtlasFont_initWithString(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::MenuItemAtlasFont* cobj = (cocos2d::MenuItemAtlasFont *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemAtlasFont_initWithString : Invalid Native Object"); - if (argc == 6) { - std::string arg0; - std::string arg1; - int arg2; - int arg3; - int32_t arg4; - std::function arg5; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); - ok &= jsval_to_int32(cx, args.get(4), &arg4); - do { - if(JS_TypeOfValue(cx, args.get(5)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(5))); - auto lambda = [=](cocos2d::Ref* larg0) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[1]; - do { - if (larg0) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); - largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - largv[0] = JSVAL_NULL; - } - } while (0); - JS::RootedValue rval(cx); - bool ok = func->invoke(1, &largv[0], &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg5 = lambda; - } - else - { - arg5 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemAtlasFont_initWithString : Error processing arguments"); - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4, arg5); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemAtlasFont_initWithString : wrong number of arguments: %d, was expecting %d", argc, 6); - return false; -} -bool js_cocos2dx_MenuItemAtlasFont_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::MenuItemAtlasFont* cobj = new (std::nothrow) cocos2d::MenuItemAtlasFont(); - 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::MenuItemAtlasFont"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_MenuItemLabel_prototype; - -void js_cocos2d_MenuItemAtlasFont_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemAtlasFont)", obj); -} - -static bool js_cocos2d_MenuItemAtlasFont_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::MenuItemAtlasFont *nobj = new (std::nothrow) cocos2d::MenuItemAtlasFont(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemAtlasFont"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_MenuItemAtlasFont(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_MenuItemAtlasFont_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_MenuItemAtlasFont_class->name = "MenuItemAtlasFont"; - jsb_cocos2d_MenuItemAtlasFont_class->addProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemAtlasFont_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_MenuItemAtlasFont_class->getProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemAtlasFont_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_MenuItemAtlasFont_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_MenuItemAtlasFont_class->resolve = JS_ResolveStub; - jsb_cocos2d_MenuItemAtlasFont_class->convert = JS_ConvertStub; - jsb_cocos2d_MenuItemAtlasFont_class->finalize = js_cocos2d_MenuItemAtlasFont_finalize; - jsb_cocos2d_MenuItemAtlasFont_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("initWithString", js_cocos2dx_MenuItemAtlasFont_initWithString, 6, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_MenuItemAtlasFont_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_MenuItemAtlasFont_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_MenuItemLabel_prototype), - jsb_cocos2d_MenuItemAtlasFont_class, - js_cocos2dx_MenuItemAtlasFont_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, "MenuItemAtlasFont", 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_MenuItemAtlasFont_class; - p->proto = jsb_cocos2d_MenuItemAtlasFont_prototype; - p->parentProto = jsb_cocos2d_MenuItemLabel_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_MenuItemFont_class; -JSObject *jsb_cocos2d_MenuItemFont_prototype; - -bool js_cocos2dx_MenuItemFont_setFontNameObj(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_setFontNameObj : 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_MenuItemFont_setFontNameObj : Error processing arguments"); - cobj->setFontNameObj(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemFont_setFontNameObj : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemFont_getFontSizeObj(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_getFontSizeObj : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getFontSizeObj(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemFont_getFontSizeObj : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemFont_setFontSizeObj(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_setFontSizeObj : 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_MenuItemFont_setFontSizeObj : Error processing arguments"); - cobj->setFontSizeObj(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemFont_setFontSizeObj : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemFont_initWithString(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_initWithString : Invalid Native Object"); - if (argc == 2) { - std::string arg0; - std::function arg1; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - do { - if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(1))); - auto lambda = [=](cocos2d::Ref* larg0) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[1]; - do { - if (larg0) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); - largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - largv[0] = JSVAL_NULL; - } - } while (0); - JS::RootedValue rval(cx); - bool ok = func->invoke(1, &largv[0], &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg1 = lambda; - } - else - { - arg1 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemFont_initWithString : Error processing arguments"); - bool ret = cobj->initWithString(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemFont_initWithString : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_MenuItemFont_getFontNameObj(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::MenuItemFont* cobj = (cocos2d::MenuItemFont *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemFont_getFontNameObj : Invalid Native Object"); - if (argc == 0) { - const std::string& ret = cobj->getFontNameObj(); - jsval jsret = JSVAL_NULL; - jsret = std_string_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemFont_getFontNameObj : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemFont_setFontName(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_MenuItemFont_setFontName : Error processing arguments"); - cocos2d::MenuItemFont::setFontName(arg0); - args.rval().setUndefined(); - return true; - } - JS_ReportError(cx, "js_cocos2dx_MenuItemFont_setFontName : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_MenuItemFont_getFontSize(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - int ret = cocos2d::MenuItemFont::getFontSize(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_MenuItemFont_getFontSize : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_MenuItemFont_getFontName(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - const std::string& ret = cocos2d::MenuItemFont::getFontName(); - jsval jsret = JSVAL_NULL; - jsret = std_string_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_MenuItemFont_getFontName : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_MenuItemFont_setFontSize(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemFont_setFontSize : Error processing arguments"); - cocos2d::MenuItemFont::setFontSize(arg0); - args.rval().setUndefined(); - return true; - } - JS_ReportError(cx, "js_cocos2dx_MenuItemFont_setFontSize : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_MenuItemFont_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::MenuItemFont* cobj = new (std::nothrow) cocos2d::MenuItemFont(); - 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::MenuItemFont"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_MenuItemLabel_prototype; - -void js_cocos2d_MenuItemFont_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemFont)", obj); -} - -static bool js_cocos2d_MenuItemFont_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::MenuItemFont *nobj = new (std::nothrow) cocos2d::MenuItemFont(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemFont"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_MenuItemFont(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_MenuItemFont_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_MenuItemFont_class->name = "MenuItemFont"; - jsb_cocos2d_MenuItemFont_class->addProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemFont_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_MenuItemFont_class->getProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemFont_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_MenuItemFont_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_MenuItemFont_class->resolve = JS_ResolveStub; - jsb_cocos2d_MenuItemFont_class->convert = JS_ConvertStub; - jsb_cocos2d_MenuItemFont_class->finalize = js_cocos2d_MenuItemFont_finalize; - jsb_cocos2d_MenuItemFont_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("setFontName", js_cocos2dx_MenuItemFont_setFontNameObj, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFontSize", js_cocos2dx_MenuItemFont_getFontSizeObj, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFontSize", js_cocos2dx_MenuItemFont_setFontSizeObj, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithString", js_cocos2dx_MenuItemFont_initWithString, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFontName", js_cocos2dx_MenuItemFont_getFontNameObj, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_MenuItemFont_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("setFontName", js_cocos2dx_MenuItemFont_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFontSize", js_cocos2dx_MenuItemFont_getFontSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFontName", js_cocos2dx_MenuItemFont_getFontName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFontSize", js_cocos2dx_MenuItemFont_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_MenuItemFont_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_MenuItemLabel_prototype), - jsb_cocos2d_MenuItemFont_class, - js_cocos2dx_MenuItemFont_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, "MenuItemFont", 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_MenuItemFont_class; - p->proto = jsb_cocos2d_MenuItemFont_prototype; - p->parentProto = jsb_cocos2d_MenuItemLabel_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_MenuItemSprite_class; -JSObject *jsb_cocos2d_MenuItemSprite_prototype; - -bool js_cocos2dx_MenuItemSprite_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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_setEnabled : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_setEnabled : Error processing arguments"); - cobj->setEnabled(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_setEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemSprite_selected(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_selected : Invalid Native Object"); - if (argc == 0) { - cobj->selected(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_selected : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemSprite_setNormalImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_setNormalImage : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_setNormalImage : Error processing arguments"); - cobj->setNormalImage(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_setNormalImage : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemSprite_setDisabledImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_setDisabledImage : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_setDisabledImage : Error processing arguments"); - cobj->setDisabledImage(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_setDisabledImage : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemSprite_initWithNormalSprite(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_initWithNormalSprite : Invalid Native Object"); - if (argc == 4) { - cocos2d::Node* arg0; - cocos2d::Node* arg1; - cocos2d::Node* arg2; - std::function arg3; - 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); - do { - if (!args.get(2).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(2).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg2 = (cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg2, cx, false, "Invalid Native Object"); - } while (0); - do { - if(JS_TypeOfValue(cx, args.get(3)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(3))); - auto lambda = [=](cocos2d::Ref* larg0) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[1]; - do { - if (larg0) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); - largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - largv[0] = JSVAL_NULL; - } - } while (0); - JS::RootedValue rval(cx); - bool ok = func->invoke(1, &largv[0], &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg3 = lambda; - } - else - { - arg3 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_initWithNormalSprite : Error processing arguments"); - bool ret = cobj->initWithNormalSprite(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_initWithNormalSprite : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_MenuItemSprite_setSelectedImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_setSelectedImage : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemSprite_setSelectedImage : Error processing arguments"); - cobj->setSelectedImage(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_setSelectedImage : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemSprite_getDisabledImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_getDisabledImage : Invalid Native Object"); - if (argc == 0) { - cocos2d::Node* ret = cobj->getDisabledImage(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_getDisabledImage : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemSprite_getSelectedImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_getSelectedImage : Invalid Native Object"); - if (argc == 0) { - cocos2d::Node* ret = cobj->getSelectedImage(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_getSelectedImage : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemSprite_getNormalImage(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_getNormalImage : Invalid Native Object"); - if (argc == 0) { - cocos2d::Node* ret = cobj->getNormalImage(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_getNormalImage : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemSprite_unselected(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::MenuItemSprite* cobj = (cocos2d::MenuItemSprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemSprite_unselected : Invalid Native Object"); - if (argc == 0) { - cobj->unselected(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemSprite_unselected : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemSprite_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::MenuItemSprite* cobj = new (std::nothrow) cocos2d::MenuItemSprite(); - 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::MenuItemSprite"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_MenuItem_prototype; - -void js_cocos2d_MenuItemSprite_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemSprite)", obj); -} - -static bool js_cocos2d_MenuItemSprite_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::MenuItemSprite *nobj = new (std::nothrow) cocos2d::MenuItemSprite(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemSprite"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_MenuItemSprite(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_MenuItemSprite_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_MenuItemSprite_class->name = "MenuItemSprite"; - jsb_cocos2d_MenuItemSprite_class->addProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemSprite_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_MenuItemSprite_class->getProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemSprite_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_MenuItemSprite_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_MenuItemSprite_class->resolve = JS_ResolveStub; - jsb_cocos2d_MenuItemSprite_class->convert = JS_ConvertStub; - jsb_cocos2d_MenuItemSprite_class->finalize = js_cocos2d_MenuItemSprite_finalize; - jsb_cocos2d_MenuItemSprite_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_MenuItemSprite_setEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("selected", js_cocos2dx_MenuItemSprite_selected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setNormalImage", js_cocos2dx_MenuItemSprite_setNormalImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDisabledImage", js_cocos2dx_MenuItemSprite_setDisabledImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithNormalSprite", js_cocos2dx_MenuItemSprite_initWithNormalSprite, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSelectedImage", js_cocos2dx_MenuItemSprite_setSelectedImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDisabledImage", js_cocos2dx_MenuItemSprite_getDisabledImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSelectedImage", js_cocos2dx_MenuItemSprite_getSelectedImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getNormalImage", js_cocos2dx_MenuItemSprite_getNormalImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("unselected", js_cocos2dx_MenuItemSprite_unselected, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_MenuItemSprite_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_MenuItemSprite_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_MenuItem_prototype), - jsb_cocos2d_MenuItemSprite_class, - js_cocos2dx_MenuItemSprite_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, "MenuItemSprite", 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_MenuItemSprite_class; - p->proto = jsb_cocos2d_MenuItemSprite_prototype; - p->parentProto = jsb_cocos2d_MenuItem_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_MenuItemImage_class; -JSObject *jsb_cocos2d_MenuItemImage_prototype; - -bool js_cocos2dx_MenuItemImage_setDisabledSpriteFrame(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_setDisabledSpriteFrame : Invalid Native Object"); - if (argc == 1) { - cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemImage_setDisabledSpriteFrame : Error processing arguments"); - cobj->setDisabledSpriteFrame(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemImage_setDisabledSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemImage_setSelectedSpriteFrame(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_setSelectedSpriteFrame : Invalid Native Object"); - if (argc == 1) { - cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemImage_setSelectedSpriteFrame : Error processing arguments"); - cobj->setSelectedSpriteFrame(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemImage_setSelectedSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemImage_setNormalSpriteFrame(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_setNormalSpriteFrame : Invalid Native Object"); - if (argc == 1) { - cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemImage_setNormalSpriteFrame : Error processing arguments"); - cobj->setNormalSpriteFrame(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemImage_setNormalSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemImage_init(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemImage_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemImage_initWithNormalImage(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::MenuItemImage* cobj = (cocos2d::MenuItemImage *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemImage_initWithNormalImage : Invalid Native Object"); - if (argc == 4) { - std::string arg0; - std::string arg1; - std::string arg2; - std::function arg3; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - ok &= jsval_to_std_string(cx, args.get(2), &arg2); - do { - if(JS_TypeOfValue(cx, args.get(3)) == JSTYPE_FUNCTION) - { - std::shared_ptr func(new JSFunctionWrapper(cx, args.thisv().toObjectOrNull(), args.get(3))); - auto lambda = [=](cocos2d::Ref* larg0) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[1]; - do { - if (larg0) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Ref*)larg0); - largv[0] = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - largv[0] = JSVAL_NULL; - } - } while (0); - JS::RootedValue rval(cx); - bool ok = func->invoke(1, &largv[0], &rval); - if (!ok && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg3 = lambda; - } - else - { - arg3 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemImage_initWithNormalImage : Error processing arguments"); - bool ret = cobj->initWithNormalImage(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemImage_initWithNormalImage : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_MenuItemImage_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::MenuItemImage* cobj = new (std::nothrow) cocos2d::MenuItemImage(); - 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::MenuItemImage"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_MenuItemSprite_prototype; - -void js_cocos2d_MenuItemImage_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemImage)", obj); -} - -static bool js_cocos2d_MenuItemImage_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::MenuItemImage *nobj = new (std::nothrow) cocos2d::MenuItemImage(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemImage"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_MenuItemImage(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_MenuItemImage_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_MenuItemImage_class->name = "MenuItemImage"; - jsb_cocos2d_MenuItemImage_class->addProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemImage_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_MenuItemImage_class->getProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemImage_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_MenuItemImage_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_MenuItemImage_class->resolve = JS_ResolveStub; - jsb_cocos2d_MenuItemImage_class->convert = JS_ConvertStub; - jsb_cocos2d_MenuItemImage_class->finalize = js_cocos2d_MenuItemImage_finalize; - jsb_cocos2d_MenuItemImage_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("setDisabledSpriteFrame", js_cocos2dx_MenuItemImage_setDisabledSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSelectedSpriteFrame", js_cocos2dx_MenuItemImage_setSelectedSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setNormalSpriteFrame", js_cocos2dx_MenuItemImage_setNormalSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("init", js_cocos2dx_MenuItemImage_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithNormalImage", js_cocos2dx_MenuItemImage_initWithNormalImage, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_MenuItemImage_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_MenuItemImage_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_MenuItemSprite_prototype), - jsb_cocos2d_MenuItemImage_class, - js_cocos2dx_MenuItemImage_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, "MenuItemImage", 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_MenuItemImage_class; - p->proto = jsb_cocos2d_MenuItemImage_prototype; - p->parentProto = jsb_cocos2d_MenuItemSprite_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_MenuItemToggle_class; -JSObject *jsb_cocos2d_MenuItemToggle_prototype; - -bool js_cocos2dx_MenuItemToggle_setSubItems(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_setSubItems : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vector arg0; - ok &= jsval_to_ccvector(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemToggle_setSubItems : Error processing arguments"); - cobj->setSubItems(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_setSubItems : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemToggle_initWithItem(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_initWithItem : Invalid Native Object"); - if (argc == 1) { - cocos2d::MenuItem* 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::MenuItem*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemToggle_initWithItem : Error processing arguments"); - bool ret = cobj->initWithItem(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_initWithItem : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemToggle_getSelectedIndex(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_getSelectedIndex : Invalid Native Object"); - if (argc == 0) { - unsigned int ret = cobj->getSelectedIndex(); - jsval jsret = JSVAL_NULL; - jsret = uint32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_getSelectedIndex : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemToggle_addSubItem(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_addSubItem : Invalid Native Object"); - if (argc == 1) { - cocos2d::MenuItem* 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::MenuItem*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MenuItemToggle_addSubItem : Error processing arguments"); - cobj->addSubItem(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_addSubItem : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemToggle_getSelectedItem(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_getSelectedItem : Invalid Native Object"); - if (argc == 0) { - cocos2d::MenuItem* ret = cobj->getSelectedItem(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MenuItem*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_getSelectedItem : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MenuItemToggle_setSelectedIndex(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::MenuItemToggle* cobj = (cocos2d::MenuItemToggle *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MenuItemToggle_setSelectedIndex : 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_MenuItemToggle_setSelectedIndex : Error processing arguments"); - cobj->setSelectedIndex(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MenuItemToggle_setSelectedIndex : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MenuItemToggle_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::MenuItemToggle* cobj = new (std::nothrow) cocos2d::MenuItemToggle(); - 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::MenuItemToggle"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_MenuItem_prototype; - -void js_cocos2d_MenuItemToggle_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (MenuItemToggle)", obj); -} - -static bool js_cocos2d_MenuItemToggle_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::MenuItemToggle *nobj = new (std::nothrow) cocos2d::MenuItemToggle(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::MenuItemToggle"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_MenuItemToggle(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_MenuItemToggle_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_MenuItemToggle_class->name = "MenuItemToggle"; - jsb_cocos2d_MenuItemToggle_class->addProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemToggle_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_MenuItemToggle_class->getProperty = JS_PropertyStub; - jsb_cocos2d_MenuItemToggle_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_MenuItemToggle_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_MenuItemToggle_class->resolve = JS_ResolveStub; - jsb_cocos2d_MenuItemToggle_class->convert = JS_ConvertStub; - jsb_cocos2d_MenuItemToggle_class->finalize = js_cocos2d_MenuItemToggle_finalize; - jsb_cocos2d_MenuItemToggle_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("setSubItems", js_cocos2dx_MenuItemToggle_setSubItems, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithItem", js_cocos2dx_MenuItemToggle_initWithItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSelectedIndex", js_cocos2dx_MenuItemToggle_getSelectedIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addSubItem", js_cocos2dx_MenuItemToggle_addSubItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSelectedItem", js_cocos2dx_MenuItemToggle_getSelectedItem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSelectedIndex", js_cocos2dx_MenuItemToggle_setSelectedIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_MenuItemToggle_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_MenuItemToggle_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_MenuItem_prototype), - jsb_cocos2d_MenuItemToggle_class, - js_cocos2dx_MenuItemToggle_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, "MenuItemToggle", 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_MenuItemToggle_class; - p->proto = jsb_cocos2d_MenuItemToggle_prototype; - p->parentProto = jsb_cocos2d_MenuItem_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Menu_class; -JSObject *jsb_cocos2d_Menu_prototype; - -bool js_cocos2dx_Menu_initWithArray(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_initWithArray : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vector arg0; - ok &= jsval_to_ccvector(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Menu_initWithArray : Error processing arguments"); - bool ret = cobj->initWithArray(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Menu_initWithArray : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Menu_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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_setEnabled : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Menu_setEnabled : Error processing arguments"); - cobj->setEnabled(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Menu_setEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Menu_alignItemsVertically(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_alignItemsVertically : Invalid Native Object"); - if (argc == 0) { - cobj->alignItemsVertically(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Menu_alignItemsVertically : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Menu_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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_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_Menu_isEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Menu_alignItemsHorizontallyWithPadding(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_alignItemsHorizontallyWithPadding : 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_Menu_alignItemsHorizontallyWithPadding : Error processing arguments"); - cobj->alignItemsHorizontallyWithPadding(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Menu_alignItemsHorizontallyWithPadding : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Menu_alignItemsVerticallyWithPadding(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_alignItemsVerticallyWithPadding : 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_Menu_alignItemsVerticallyWithPadding : Error processing arguments"); - cobj->alignItemsVerticallyWithPadding(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Menu_alignItemsVerticallyWithPadding : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Menu_alignItemsHorizontally(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::Menu* cobj = (cocos2d::Menu *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Menu_alignItemsHorizontally : Invalid Native Object"); - if (argc == 0) { - cobj->alignItemsHorizontally(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Menu_alignItemsHorizontally : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Menu_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Menu* cobj = new (std::nothrow) cocos2d::Menu(); - 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::Menu"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Layer_prototype; - -void js_cocos2d_Menu_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Menu)", obj); -} - -static bool js_cocos2d_Menu_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::Menu *nobj = new (std::nothrow) cocos2d::Menu(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::Menu"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_Menu(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Menu_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Menu_class->name = "Menu"; - jsb_cocos2d_Menu_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Menu_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Menu_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Menu_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Menu_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Menu_class->resolve = JS_ResolveStub; - jsb_cocos2d_Menu_class->convert = JS_ConvertStub; - jsb_cocos2d_Menu_class->finalize = js_cocos2d_Menu_finalize; - jsb_cocos2d_Menu_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("initWithArray", js_cocos2dx_Menu_initWithArray, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEnabled", js_cocos2dx_Menu_setEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("alignItemsVertically", js_cocos2dx_Menu_alignItemsVertically, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isEnabled", js_cocos2dx_Menu_isEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("alignItemsHorizontallyWithPadding", js_cocos2dx_Menu_alignItemsHorizontallyWithPadding, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("alignItemsVerticallyWithPadding", js_cocos2dx_Menu_alignItemsVerticallyWithPadding, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("alignItemsHorizontally", js_cocos2dx_Menu_alignItemsHorizontally, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_Menu_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - JSFunctionSpec *st_funcs = NULL; - - jsb_cocos2d_Menu_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Layer_prototype), - jsb_cocos2d_Menu_class, - js_cocos2dx_Menu_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, "Menu", 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_Menu_class; - p->proto = jsb_cocos2d_Menu_prototype; - p->parentProto = jsb_cocos2d_Layer_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ClippingNode_class; -JSObject *jsb_cocos2d_ClippingNode_prototype; - -bool js_cocos2dx_ClippingNode_hasContent(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_hasContent : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->hasContent(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ClippingNode_hasContent : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ClippingNode_setInverted(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_setInverted : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ClippingNode_setInverted : Error processing arguments"); - cobj->setInverted(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ClippingNode_setInverted : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ClippingNode_setStencil(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_setStencil : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ClippingNode_setStencil : Error processing arguments"); - cobj->setStencil(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ClippingNode_setStencil : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ClippingNode_getAlphaThreshold(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_getAlphaThreshold : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getAlphaThreshold(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ClippingNode_getAlphaThreshold : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ClippingNode_getStencil(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_getStencil : Invalid Native Object"); - if (argc == 0) { - cocos2d::Node* ret = cobj->getStencil(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Node*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ClippingNode_getStencil : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ClippingNode_setAlphaThreshold(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_setAlphaThreshold : 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_ClippingNode_setAlphaThreshold : Error processing arguments"); - cobj->setAlphaThreshold(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ClippingNode_setAlphaThreshold : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ClippingNode_isInverted(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::ClippingNode* cobj = (cocos2d::ClippingNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ClippingNode_isInverted : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isInverted(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ClippingNode_isInverted : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ClippingNode_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - do { - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cocos2d::ClippingNode* ret = cocos2d::ClippingNode::create(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ClippingNode*)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::ClippingNode* ret = cocos2d::ClippingNode::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ClippingNode*)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_ClippingNode_create : wrong number of arguments"); - return false; -} -bool js_cocos2dx_ClippingNode_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ClippingNode* cobj = new (std::nothrow) cocos2d::ClippingNode(); - 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::ClippingNode"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_ClippingNode_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ClippingNode)", obj); -} - -void js_register_cocos2dx_ClippingNode(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ClippingNode_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ClippingNode_class->name = "ClippingNode"; - jsb_cocos2d_ClippingNode_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ClippingNode_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ClippingNode_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ClippingNode_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ClippingNode_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ClippingNode_class->resolve = JS_ResolveStub; - jsb_cocos2d_ClippingNode_class->convert = JS_ConvertStub; - jsb_cocos2d_ClippingNode_class->finalize = js_cocos2d_ClippingNode_finalize; - jsb_cocos2d_ClippingNode_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("hasContent", js_cocos2dx_ClippingNode_hasContent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setInverted", js_cocos2dx_ClippingNode_setInverted, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStencil", js_cocos2dx_ClippingNode_setStencil, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getAlphaThreshold", js_cocos2dx_ClippingNode_getAlphaThreshold, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStencil", js_cocos2dx_ClippingNode_getStencil, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setAlphaThreshold", js_cocos2dx_ClippingNode_setAlphaThreshold, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isInverted", js_cocos2dx_ClippingNode_isInverted, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ClippingNode_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ClippingNode_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_ClippingNode_class, - js_cocos2dx_ClippingNode_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, "ClippingNode", 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_ClippingNode_class; - p->proto = jsb_cocos2d_ClippingNode_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_MotionStreak_class; -JSObject *jsb_cocos2d_MotionStreak_prototype; - -bool js_cocos2dx_MotionStreak_reset(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_reset : Invalid Native Object"); - if (argc == 0) { - cobj->reset(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_reset : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MotionStreak_setTexture(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setTexture : Invalid Native Object"); - if (argc == 1) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_setTexture : Error processing arguments"); - cobj->setTexture(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_setTexture : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MotionStreak_getTexture(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_getTexture : Invalid Native Object"); - if (argc == 0) { - cocos2d::Texture2D* ret = cobj->getTexture(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MotionStreak_tintWithColor(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_tintWithColor : Invalid Native Object"); - if (argc == 1) { - cocos2d::Color3B arg0; - ok &= jsval_to_cccolor3b(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_tintWithColor : Error processing arguments"); - cobj->tintWithColor(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_tintWithColor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MotionStreak_setBlendFunc(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setBlendFunc : Invalid Native Object"); - if (argc == 1) { - cocos2d::BlendFunc arg0; - ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_setBlendFunc : Error processing arguments"); - cobj->setBlendFunc(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MotionStreak_setStartingPositionInitialized(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setStartingPositionInitialized : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_setStartingPositionInitialized : Error processing arguments"); - cobj->setStartingPositionInitialized(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_setStartingPositionInitialized : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MotionStreak_getBlendFunc(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_getBlendFunc : Invalid Native Object"); - if (argc == 0) { - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - jsval jsret = JSVAL_NULL; - jsret = blendfunc_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MotionStreak_isStartingPositionInitialized(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_isStartingPositionInitialized : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isStartingPositionInitialized(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_isStartingPositionInitialized : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MotionStreak_isFastMode(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_isFastMode : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isFastMode(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_isFastMode : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MotionStreak_getStroke(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_getStroke : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getStroke(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_getStroke : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_MotionStreak_initWithFade(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::MotionStreak* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_initWithFade : Invalid Native Object"); - do { - if (argc == 5) { - 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; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - cocos2d::Color3B arg3; - ok &= jsval_to_cccolor3b(cx, args.get(3), &arg3); - if (!ok) { ok = true; break; } - cocos2d::Texture2D* arg4; - do { - if (!args.get(4).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(4).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg4 = (cocos2d::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg4, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithFade(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - do { - if (argc == 5) { - 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; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - cocos2d::Color3B arg3; - ok &= jsval_to_cccolor3b(cx, args.get(3), &arg3); - if (!ok) { ok = true; break; } - std::string arg4; - ok &= jsval_to_std_string(cx, args.get(4), &arg4); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithFade(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_initWithFade : wrong number of arguments"); - return false; -} -bool js_cocos2dx_MotionStreak_setFastMode(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setFastMode : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_MotionStreak_setFastMode : Error processing arguments"); - cobj->setFastMode(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_setFastMode : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MotionStreak_setStroke(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::MotionStreak* cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_setStroke : 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_MotionStreak_setStroke : Error processing arguments"); - cobj->setStroke(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_MotionStreak_setStroke : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_MotionStreak_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - do { - if (argc == 5) { - 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; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - cocos2d::Color3B arg3; - ok &= jsval_to_cccolor3b(cx, args.get(3), &arg3); - if (!ok) { ok = true; break; } - cocos2d::Texture2D* arg4; - do { - if (!args.get(4).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(4).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg4 = (cocos2d::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg4, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cocos2d::MotionStreak* ret = cocos2d::MotionStreak::create(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MotionStreak*)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) { - 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; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - cocos2d::Color3B arg3; - ok &= jsval_to_cccolor3b(cx, args.get(3), &arg3); - if (!ok) { ok = true; break; } - std::string arg4; - ok &= jsval_to_std_string(cx, args.get(4), &arg4); - if (!ok) { ok = true; break; } - cocos2d::MotionStreak* ret = cocos2d::MotionStreak::create(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::MotionStreak*)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_MotionStreak_create : wrong number of arguments"); - return false; -} -bool js_cocos2dx_MotionStreak_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::MotionStreak* cobj = new (std::nothrow) cocos2d::MotionStreak(); - 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::MotionStreak"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_MotionStreak_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (MotionStreak)", obj); -} - -static bool js_cocos2d_MotionStreak_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::MotionStreak *nobj = new (std::nothrow) cocos2d::MotionStreak(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::MotionStreak"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_MotionStreak(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_MotionStreak_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_MotionStreak_class->name = "MotionStreak"; - jsb_cocos2d_MotionStreak_class->addProperty = JS_PropertyStub; - jsb_cocos2d_MotionStreak_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_MotionStreak_class->getProperty = JS_PropertyStub; - jsb_cocos2d_MotionStreak_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_MotionStreak_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_MotionStreak_class->resolve = JS_ResolveStub; - jsb_cocos2d_MotionStreak_class->convert = JS_ConvertStub; - jsb_cocos2d_MotionStreak_class->finalize = js_cocos2d_MotionStreak_finalize; - jsb_cocos2d_MotionStreak_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("reset", js_cocos2dx_MotionStreak_reset, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTexture", js_cocos2dx_MotionStreak_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTexture", js_cocos2dx_MotionStreak_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("tintWithColor", js_cocos2dx_MotionStreak_tintWithColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBlendFunc", js_cocos2dx_MotionStreak_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStartingPositionInitialized", js_cocos2dx_MotionStreak_setStartingPositionInitialized, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBlendFunc", js_cocos2dx_MotionStreak_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isStartingPositionInitialized", js_cocos2dx_MotionStreak_isStartingPositionInitialized, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isFastMode", js_cocos2dx_MotionStreak_isFastMode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStroke", js_cocos2dx_MotionStreak_getStroke, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithFade", js_cocos2dx_MotionStreak_initWithFade, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFastMode", js_cocos2dx_MotionStreak_setFastMode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStroke", js_cocos2dx_MotionStreak_setStroke, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_MotionStreak_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_MotionStreak_create, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_MotionStreak_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_MotionStreak_class, - js_cocos2dx_MotionStreak_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, "MotionStreak", 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_MotionStreak_class; - p->proto = jsb_cocos2d_MotionStreak_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ProgressTimer_class; -JSObject *jsb_cocos2d_ProgressTimer_prototype; - -bool js_cocos2dx_ProgressTimer_initWithSprite(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_initWithSprite : Invalid Native Object"); - if (argc == 1) { - cocos2d::Sprite* 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::Sprite*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_initWithSprite : Error processing arguments"); - bool ret = cobj->initWithSprite(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_initWithSprite : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProgressTimer_isReverseDirection(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_isReverseDirection : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isReverseDirection(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_isReverseDirection : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProgressTimer_setBarChangeRate(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setBarChangeRate : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= jsval_to_vector2(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_setBarChangeRate : Error processing arguments"); - cobj->setBarChangeRate(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setBarChangeRate : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProgressTimer_getPercentage(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getPercentage : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getPercentage(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getPercentage : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProgressTimer_setSprite(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setSprite : Invalid Native Object"); - if (argc == 1) { - cocos2d::Sprite* 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::Sprite*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_setSprite : Error processing arguments"); - cobj->setSprite(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setSprite : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProgressTimer_getType(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getType : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getType(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getType : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProgressTimer_getSprite(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getSprite : Invalid Native Object"); - if (argc == 0) { - cocos2d::Sprite* ret = cobj->getSprite(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getSprite : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProgressTimer_setMidpoint(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setMidpoint : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= jsval_to_vector2(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_setMidpoint : Error processing arguments"); - cobj->setMidpoint(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setMidpoint : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProgressTimer_getBarChangeRate(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getBarChangeRate : Invalid Native Object"); - if (argc == 0) { - cocos2d::Vec2 ret = cobj->getBarChangeRate(); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getBarChangeRate : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProgressTimer_setReverseDirection(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::ProgressTimer* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setReverseDirection : Invalid Native Object"); - do { - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - cobj->setReverseDirection(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - cobj->setReverseProgress(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setReverseDirection : wrong number of arguments"); - return false; -} -bool js_cocos2dx_ProgressTimer_getMidpoint(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_getMidpoint : Invalid Native Object"); - if (argc == 0) { - cocos2d::Vec2 ret = cobj->getMidpoint(); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_getMidpoint : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ProgressTimer_setPercentage(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setPercentage : 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_ProgressTimer_setPercentage : Error processing arguments"); - cobj->setPercentage(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setPercentage : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProgressTimer_setType(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::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setType : Invalid Native Object"); - if (argc == 1) { - cocos2d::ProgressTimer::Type arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_setType : Error processing arguments"); - cobj->setType(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setType : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ProgressTimer_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - cocos2d::Sprite* 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::Sprite*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_create : Error processing arguments"); - cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ProgressTimer*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ProgressTimer_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ProgressTimer* cobj = new (std::nothrow) cocos2d::ProgressTimer(); - 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::ProgressTimer"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_ProgressTimer_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ProgressTimer)", obj); -} - -static bool js_cocos2d_ProgressTimer_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::ProgressTimer *nobj = new (std::nothrow) cocos2d::ProgressTimer(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::ProgressTimer"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_ProgressTimer(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ProgressTimer_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ProgressTimer_class->name = "ProgressTimer"; - jsb_cocos2d_ProgressTimer_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ProgressTimer_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ProgressTimer_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ProgressTimer_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ProgressTimer_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ProgressTimer_class->resolve = JS_ResolveStub; - jsb_cocos2d_ProgressTimer_class->convert = JS_ConvertStub; - jsb_cocos2d_ProgressTimer_class->finalize = js_cocos2d_ProgressTimer_finalize; - jsb_cocos2d_ProgressTimer_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("initWithSprite", js_cocos2dx_ProgressTimer_initWithSprite, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isReverseDirection", js_cocos2dx_ProgressTimer_isReverseDirection, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBarChangeRate", js_cocos2dx_ProgressTimer_setBarChangeRate, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPercentage", js_cocos2dx_ProgressTimer_getPercentage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSprite", js_cocos2dx_ProgressTimer_setSprite, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getType", js_cocos2dx_ProgressTimer_getType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSprite", js_cocos2dx_ProgressTimer_getSprite, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMidpoint", js_cocos2dx_ProgressTimer_setMidpoint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBarChangeRate", js_cocos2dx_ProgressTimer_getBarChangeRate, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setReverseDirection", js_cocos2dx_ProgressTimer_setReverseDirection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMidpoint", js_cocos2dx_ProgressTimer_getMidpoint, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPercentage", js_cocos2dx_ProgressTimer_setPercentage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setType", js_cocos2dx_ProgressTimer_setType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_ProgressTimer_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ProgressTimer_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ProgressTimer_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_ProgressTimer_class, - js_cocos2dx_ProgressTimer_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, "ProgressTimer", 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_ProgressTimer_class; - p->proto = jsb_cocos2d_ProgressTimer_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Sprite_class; -JSObject *jsb_cocos2d_Sprite_prototype; - -bool js_cocos2dx_Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setSpriteFrame : Invalid Native Object"); - do { - if (argc == 1) { - cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cobj->setSpriteFrame(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cobj->setSpriteFrame(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_Sprite_setSpriteFrame : wrong number of arguments"); - return false; -} -bool js_cocos2dx_Sprite_setTexture(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setTexture : Invalid Native Object"); - do { - if (argc == 1) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cobj->setTexture(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cobj->setTexture(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_Sprite_setTexture : wrong number of arguments"); - return false; -} -bool js_cocos2dx_Sprite_getTexture(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getTexture : Invalid Native Object"); - if (argc == 0) { - cocos2d::Texture2D* ret = cobj->getTexture(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_setFlippedY(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setFlippedY : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setFlippedY : Error processing arguments"); - cobj->setFlippedY(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setFlippedY : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_setFlippedX(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setFlippedX : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setFlippedX : Error processing arguments"); - cobj->setFlippedX(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setFlippedX : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_setRotationSkewX(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setRotationSkewX : 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_Sprite_setRotationSkewX : Error processing arguments"); - cobj->setRotationSkewX(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setRotationSkewX : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_setRotationSkewY(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setRotationSkewY : 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_Sprite_setRotationSkewY : Error processing arguments"); - cobj->setRotationSkewY(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setRotationSkewY : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithTexture : Invalid Native Object"); - do { - if (argc == 2) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cocos2d::Rect arg1; - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithTexture(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - do { - if (argc == 1) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithTexture(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - do { - if (argc == 3) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cocos2d::Rect arg1; - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - bool arg2; - arg2 = JS::ToBoolean(args.get(2)); - bool ret = cobj->initWithTexture(arg0, arg1, arg2); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_Sprite_initWithTexture : wrong number of arguments"); - return false; -} -bool js_cocos2dx_Sprite_getBatchNode(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getBatchNode : Invalid Native Object"); - if (argc == 0) { - cocos2d::SpriteBatchNode* ret = cobj->getBatchNode(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::SpriteBatchNode*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_getBatchNode : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_getOffsetPosition(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getOffsetPosition : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Vec2& ret = cobj->getOffsetPosition(); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_getOffsetPosition : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_removeAllChildrenWithCleanup(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_removeAllChildrenWithCleanup : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_removeAllChildrenWithCleanup : Error processing arguments"); - cobj->removeAllChildrenWithCleanup(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_removeAllChildrenWithCleanup : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setTextureRect : Invalid Native Object"); - do { - if (argc == 3) { - cocos2d::Rect arg0; - ok &= jsval_to_ccrect(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - bool arg1; - arg1 = JS::ToBoolean(args.get(1)); - cocos2d::Size arg2; - ok &= jsval_to_ccsize(cx, args.get(2), &arg2); - if (!ok) { ok = true; break; } - cobj->setTextureRect(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 1) { - cocos2d::Rect arg0; - ok &= jsval_to_ccrect(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cobj->setTextureRect(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_Sprite_setTextureRect : wrong number of arguments"); - return false; -} -bool js_cocos2dx_Sprite_initWithSpriteFrameName(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithSpriteFrameName : 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_Sprite_initWithSpriteFrameName : Error processing arguments"); - bool ret = cobj->initWithSpriteFrameName(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_initWithSpriteFrameName : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_isFrameDisplayed(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isFrameDisplayed : Invalid Native Object"); - if (argc == 1) { - cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_isFrameDisplayed : Error processing arguments"); - bool ret = cobj->isFrameDisplayed(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_isFrameDisplayed : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_getAtlasIndex(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getAtlasIndex : Invalid Native Object"); - if (argc == 0) { - ssize_t ret = cobj->getAtlasIndex(); - jsval jsret = JSVAL_NULL; - jsret = ssize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_getAtlasIndex : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_setBatchNode(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setBatchNode : Invalid Native Object"); - if (argc == 1) { - cocos2d::SpriteBatchNode* 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::SpriteBatchNode*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setBatchNode : Error processing arguments"); - cobj->setBatchNode(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setBatchNode : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_getBlendFunc(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getBlendFunc : Invalid Native Object"); - if (argc == 0) { - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - jsval jsret = JSVAL_NULL; - jsret = blendfunc_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_setDisplayFrameWithAnimationName(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setDisplayFrameWithAnimationName : Invalid Native Object"); - if (argc == 2) { - std::string arg0; - ssize_t arg1; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_ssize(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setDisplayFrameWithAnimationName : Error processing arguments"); - cobj->setDisplayFrameWithAnimationName(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setDisplayFrameWithAnimationName : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_Sprite_setTextureAtlas(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setTextureAtlas : Invalid Native Object"); - if (argc == 1) { - cocos2d::TextureAtlas* 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::TextureAtlas*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setTextureAtlas : Error processing arguments"); - cobj->setTextureAtlas(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setTextureAtlas : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_getSpriteFrame(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getSpriteFrame : Invalid Native Object"); - if (argc == 0) { - cocos2d::SpriteFrame* ret = cobj->getSpriteFrame(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::SpriteFrame*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_getSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_isDirty(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isDirty : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isDirty(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_isDirty : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_setAtlasIndex(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setAtlasIndex : Invalid Native Object"); - if (argc == 1) { - ssize_t arg0; - ok &= jsval_to_ssize(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setAtlasIndex : Error processing arguments"); - cobj->setAtlasIndex(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setAtlasIndex : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_setDirty(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setDirty : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setDirty : Error processing arguments"); - cobj->setDirty(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setDirty : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_isTextureRectRotated(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isTextureRectRotated : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isTextureRectRotated(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_isTextureRectRotated : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_getTextureRect(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getTextureRect : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Rect& ret = cobj->getTextureRect(); - jsval jsret = JSVAL_NULL; - jsret = ccrect_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_getTextureRect : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_initWithFile(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithFile : Invalid Native Object"); - do { - if (argc == 2) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cocos2d::Rect arg1; - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithFile(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - do { - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithFile(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_Sprite_initWithFile : wrong number of arguments"); - return false; -} -bool js_cocos2dx_Sprite_setBlendFunc(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setBlendFunc : Invalid Native Object"); - if (argc == 1) { - cocos2d::BlendFunc arg0; - ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setBlendFunc : Error processing arguments"); - cobj->setBlendFunc(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_getTextureAtlas(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_getTextureAtlas : Invalid Native Object"); - if (argc == 0) { - cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TextureAtlas*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_getTextureAtlas : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_initWithSpriteFrame(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithSpriteFrame : Invalid Native Object"); - if (argc == 1) { - cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_initWithSpriteFrame : Error processing arguments"); - bool ret = cobj->initWithSpriteFrame(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_initWithSpriteFrame : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_isFlippedX(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isFlippedX : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isFlippedX(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_isFlippedX : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_isFlippedY(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_isFlippedY : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isFlippedY(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_isFlippedY : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Sprite_setVertexRect(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::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setVertexRect : Invalid Native Object"); - if (argc == 1) { - cocos2d::Rect arg0; - ok &= jsval_to_ccrect(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_setVertexRect : Error processing arguments"); - cobj->setVertexRect(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_setVertexRect : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Sprite_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - do { - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cocos2d::Sprite* ret = cocos2d::Sprite::create(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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::Sprite* ret = cocos2d::Sprite::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cocos2d::Rect arg1; - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - cocos2d::Sprite* ret = cocos2d::Sprite::create(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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_Sprite_create : wrong number of arguments"); - return false; -} -bool js_cocos2dx_Sprite_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - do { - if (argc == 2) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cocos2d::Rect arg1; - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cocos2d::Rect arg1; - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - bool arg2; - arg2 = JS::ToBoolean(args.get(2)); - if (!ok) { ok = true; break; } - cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0, arg1, arg2); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - } while (0); - - do { - if (argc == 1) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - if (!ok) { ok = true; break; } - cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)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_Sprite_createWithTexture : wrong number of arguments"); - return false; -} -bool js_cocos2dx_Sprite_createWithSpriteFrameName(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_Sprite_createWithSpriteFrameName : Error processing arguments"); - cocos2d::Sprite* ret = cocos2d::Sprite::createWithSpriteFrameName(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Sprite_createWithSpriteFrameName : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Sprite_createWithSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Sprite_createWithSpriteFrame : Error processing arguments"); - cocos2d::Sprite* ret = cocos2d::Sprite::createWithSpriteFrame(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Sprite_createWithSpriteFrame : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Sprite_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Sprite* cobj = new (std::nothrow) cocos2d::Sprite(); - 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::Sprite"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_Sprite_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Sprite)", obj); -} - -static bool js_cocos2d_Sprite_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::Sprite *nobj = new (std::nothrow) cocos2d::Sprite(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::Sprite"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_Sprite(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Sprite_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Sprite_class->name = "Sprite"; - jsb_cocos2d_Sprite_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Sprite_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Sprite_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Sprite_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Sprite_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Sprite_class->resolve = JS_ResolveStub; - jsb_cocos2d_Sprite_class->convert = JS_ConvertStub; - jsb_cocos2d_Sprite_class->finalize = js_cocos2d_Sprite_finalize; - jsb_cocos2d_Sprite_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("setSpriteFrame", js_cocos2dx_Sprite_setSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTexture", js_cocos2dx_Sprite_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTexture", js_cocos2dx_Sprite_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFlippedY", js_cocos2dx_Sprite_setFlippedY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFlippedX", js_cocos2dx_Sprite_setFlippedX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRotationSkewX", js_cocos2dx_Sprite_setRotationSkewX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRotationSkewY", js_cocos2dx_Sprite_setRotationSkewY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTexture", js_cocos2dx_Sprite_initWithTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBatchNode", js_cocos2dx_Sprite_getBatchNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getOffsetPosition", js_cocos2dx_Sprite_getOffsetPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllChildrenWithCleanup", js_cocos2dx_Sprite_removeAllChildrenWithCleanup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTextureRect", js_cocos2dx_Sprite_setTextureRect, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithSpriteFrameName", js_cocos2dx_Sprite_initWithSpriteFrameName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isFrameDisplayed", js_cocos2dx_Sprite_isFrameDisplayed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getAtlasIndex", js_cocos2dx_Sprite_getAtlasIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBatchNode", js_cocos2dx_Sprite_setBatchNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBlendFunc", js_cocos2dx_Sprite_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDisplayFrameWithAnimationName", js_cocos2dx_Sprite_setDisplayFrameWithAnimationName, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTextureAtlas", js_cocos2dx_Sprite_setTextureAtlas, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSpriteFrame", js_cocos2dx_Sprite_getSpriteFrame, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isDirty", js_cocos2dx_Sprite_isDirty, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setAtlasIndex", js_cocos2dx_Sprite_setAtlasIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDirty", js_cocos2dx_Sprite_setDirty, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isTextureRectRotated", js_cocos2dx_Sprite_isTextureRectRotated, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTextureRect", js_cocos2dx_Sprite_getTextureRect, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithFile", js_cocos2dx_Sprite_initWithFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBlendFunc", js_cocos2dx_Sprite_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTextureAtlas", js_cocos2dx_Sprite_getTextureAtlas, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithSpriteFrame", js_cocos2dx_Sprite_initWithSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isFlippedX", js_cocos2dx_Sprite_isFlippedX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isFlippedY", js_cocos2dx_Sprite_isFlippedY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setVertexRect", js_cocos2dx_Sprite_setVertexRect, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_Sprite_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_Sprite_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTexture", js_cocos2dx_Sprite_createWithTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithSpriteFrameName", js_cocos2dx_Sprite_createWithSpriteFrameName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithSpriteFrame", js_cocos2dx_Sprite_createWithSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_Sprite_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_Sprite_class, - js_cocos2dx_Sprite_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, "Sprite", 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_Sprite_class; - p->proto = jsb_cocos2d_Sprite_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_Image_class; -JSObject *jsb_cocos2d_Image_prototype; - -bool js_cocos2dx_Image_hasPremultipliedAlpha(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_hasPremultipliedAlpha : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->hasPremultipliedAlpha(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_hasPremultipliedAlpha : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_getDataLen(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getDataLen : Invalid Native Object"); - if (argc == 0) { - ssize_t ret = cobj->getDataLen(); - jsval jsret = JSVAL_NULL; - jsret = ssize_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_getDataLen : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_saveToFile(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_saveToFile : 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_Image_saveToFile : Error processing arguments"); - bool ret = cobj->saveToFile(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - if (argc == 2) { - std::string arg0; - bool arg1; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - arg1 = JS::ToBoolean(args.get(1)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Image_saveToFile : Error processing arguments"); - bool ret = cobj->saveToFile(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_saveToFile : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Image_hasAlpha(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_hasAlpha : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->hasAlpha(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_hasAlpha : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_isCompressed(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_isCompressed : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isCompressed(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_isCompressed : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_getHeight(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getHeight : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getHeight(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_getHeight : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_initWithImageFile(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_initWithImageFile : 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_Image_initWithImageFile : Error processing arguments"); - bool ret = cobj->initWithImageFile(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_initWithImageFile : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Image_getWidth(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getWidth : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getWidth(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_getWidth : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_getBitPerPixel(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getBitPerPixel : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getBitPerPixel(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_getBitPerPixel : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_getFileType(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getFileType : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getFileType(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_getFileType : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_getNumberOfMipmaps(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getNumberOfMipmaps : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getNumberOfMipmaps(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_getNumberOfMipmaps : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_getRenderFormat(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getRenderFormat : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getRenderFormat(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_getRenderFormat : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_getData(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getData : Invalid Native Object"); - if (argc == 0) { - unsigned char* ret = cobj->getData(); - jsval jsret = JSVAL_NULL; - #pragma warning NO CONVERSION FROM NATIVE FOR unsigned char*; - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_getData : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_getMipmaps(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_getMipmaps : Invalid Native Object"); - if (argc == 0) { - cocos2d::_MipmapInfo* ret = cobj->getMipmaps(); - jsval jsret = JSVAL_NULL; - #pragma warning NO CONVERSION FROM NATIVE FOR _MipmapInfo*; - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_getMipmaps : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Image_initWithRawData(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::Image* cobj = (cocos2d::Image *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Image_initWithRawData : Invalid Native Object"); - if (argc == 5) { - const unsigned char* arg0; - ssize_t arg1; - int arg2; - int arg3; - int arg4; - #pragma warning NO CONVERSION TO NATIVE FOR unsigned char* - ok = false; - ok &= jsval_to_ssize(cx, args.get(1), &arg1); - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); - ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Image_initWithRawData : Error processing arguments"); - bool ret = cobj->initWithRawData(arg0, arg1, arg2, arg3, arg4); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - if (argc == 6) { - const unsigned char* arg0; - ssize_t arg1; - int arg2; - int arg3; - int arg4; - bool arg5; - #pragma warning NO CONVERSION TO NATIVE FOR unsigned char* - ok = false; - ok &= jsval_to_ssize(cx, args.get(1), &arg1); - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); - ok &= jsval_to_int32(cx, args.get(4), (int32_t *)&arg4); - arg5 = JS::ToBoolean(args.get(5)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Image_initWithRawData : Error processing arguments"); - bool ret = cobj->initWithRawData(arg0, arg1, arg2, arg3, arg4, arg5); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Image_initWithRawData : wrong number of arguments: %d, was expecting %d", argc, 5); - return false; -} -bool js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha : Error processing arguments"); - cocos2d::Image::setPVRImagesHavePremultipliedAlpha(arg0); - args.rval().setUndefined(); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Image_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Image* cobj = new (std::nothrow) cocos2d::Image(); - 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::Image"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - - -void js_cocos2d_Image_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Image)", obj); -} - -void js_register_cocos2dx_Image(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Image_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Image_class->name = "Image"; - jsb_cocos2d_Image_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Image_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Image_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Image_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Image_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Image_class->resolve = JS_ResolveStub; - jsb_cocos2d_Image_class->convert = JS_ConvertStub; - jsb_cocos2d_Image_class->finalize = js_cocos2d_Image_finalize; - jsb_cocos2d_Image_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("hasPremultipliedAlpha", js_cocos2dx_Image_hasPremultipliedAlpha, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDataLen", js_cocos2dx_Image_getDataLen, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("saveToFile", js_cocos2dx_Image_saveToFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("hasAlpha", js_cocos2dx_Image_hasAlpha, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isCompressed", js_cocos2dx_Image_isCompressed, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getHeight", js_cocos2dx_Image_getHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithImageFile", js_cocos2dx_Image_initWithImageFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getWidth", js_cocos2dx_Image_getWidth, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBitPerPixel", js_cocos2dx_Image_getBitPerPixel, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getFileType", js_cocos2dx_Image_getFileType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getNumberOfMipmaps", js_cocos2dx_Image_getNumberOfMipmaps, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRenderFormat", js_cocos2dx_Image_getRenderFormat, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getData", js_cocos2dx_Image_getData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMipmaps", js_cocos2dx_Image_getMipmaps, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithRawData", js_cocos2dx_Image_initWithRawData, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("setPVRImagesHavePremultipliedAlpha", js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_Image_prototype = JS_InitClass( - cx, global, - JS::NullPtr(), // parent proto - jsb_cocos2d_Image_class, - js_cocos2dx_Image_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, "Image", 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_Image_class; - p->proto = jsb_cocos2d_Image_prototype; - p->parentProto = NULL; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_RenderTexture_class; -JSObject *jsb_cocos2d_RenderTexture_prototype; - -bool js_cocos2dx_RenderTexture_setVirtualViewport(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setVirtualViewport : Invalid Native Object"); - if (argc == 3) { - cocos2d::Vec2 arg0; - cocos2d::Rect arg1; - cocos2d::Rect arg2; - ok &= jsval_to_vector2(cx, args.get(0), &arg0); - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - ok &= jsval_to_ccrect(cx, args.get(2), &arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setVirtualViewport : Error processing arguments"); - cobj->setVirtualViewport(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_setVirtualViewport : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} -bool js_cocos2dx_RenderTexture_clearStencil(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_clearStencil : 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_RenderTexture_clearStencil : Error processing arguments"); - cobj->clearStencil(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_clearStencil : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_RenderTexture_getClearDepth(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getClearDepth : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getClearDepth(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_getClearDepth : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_getClearStencil(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getClearStencil : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getClearStencil(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_getClearStencil : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_end(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_end : Invalid Native Object"); - if (argc == 0) { - cobj->end(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_end : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_setClearStencil(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setClearStencil : 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_RenderTexture_setClearStencil : Error processing arguments"); - cobj->setClearStencil(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_setClearStencil : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_RenderTexture_setSprite(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setSprite : Invalid Native Object"); - if (argc == 1) { - cocos2d::Sprite* 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::Sprite*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setSprite : Error processing arguments"); - cobj->setSprite(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_setSprite : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_RenderTexture_getSprite(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getSprite : Invalid Native Object"); - if (argc == 0) { - cocos2d::Sprite* ret = cobj->getSprite(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Sprite*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_getSprite : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_isAutoDraw(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_isAutoDraw : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isAutoDraw(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_isAutoDraw : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_setKeepMatrix(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setKeepMatrix : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setKeepMatrix : Error processing arguments"); - cobj->setKeepMatrix(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_setKeepMatrix : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_RenderTexture_setClearFlags(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setClearFlags : 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_RenderTexture_setClearFlags : Error processing arguments"); - cobj->setClearFlags(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_setClearFlags : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_RenderTexture_begin(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_begin : Invalid Native Object"); - if (argc == 0) { - cobj->begin(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_begin : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_setAutoDraw(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setAutoDraw : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setAutoDraw : Error processing arguments"); - cobj->setAutoDraw(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_setAutoDraw : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_RenderTexture_setClearColor(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setClearColor : Invalid Native Object"); - if (argc == 1) { - cocos2d::Color4F arg0; - ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_setClearColor : Error processing arguments"); - cobj->setClearColor(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_setClearColor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_RenderTexture_endToLua(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_endToLua : Invalid Native Object"); - if (argc == 0) { - cobj->endToLua(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_endToLua : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_beginWithClear(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::RenderTexture* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_beginWithClear : Invalid Native Object"); - do { - if (argc == 5) { - 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; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - double arg3; - ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); - if (!ok) { ok = true; break; } - double arg4; - ok &= JS::ToNumber( cx, args.get(4), &arg4) && !isnan(arg4); - if (!ok) { ok = true; break; } - cobj->beginWithClear(arg0, arg1, arg2, arg3, arg4); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 4) { - 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; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - double arg3; - ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); - if (!ok) { ok = true; break; } - cobj->beginWithClear(arg0, arg1, arg2, arg3); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 6) { - 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; } - double arg2; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - if (!ok) { ok = true; break; } - double arg3; - ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); - if (!ok) { ok = true; break; } - double arg4; - ok &= JS::ToNumber( cx, args.get(4), &arg4) && !isnan(arg4); - if (!ok) { ok = true; break; } - int arg5; - ok &= jsval_to_int32(cx, args.get(5), (int32_t *)&arg5); - if (!ok) { ok = true; break; } - cobj->beginWithClear(arg0, arg1, arg2, arg3, arg4, arg5); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_beginWithClear : wrong number of arguments"); - return false; -} -bool js_cocos2dx_RenderTexture_clearDepth(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_clearDepth : 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_RenderTexture_clearDepth : Error processing arguments"); - cobj->clearDepth(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_clearDepth : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_RenderTexture_getClearColor(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getClearColor : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Color4F& ret = cobj->getClearColor(); - jsval jsret = JSVAL_NULL; - jsret = cccolor4f_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_getClearColor : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_clear(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_clear : Invalid Native Object"); + 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; @@ -50479,3018 +56303,314 @@ bool js_cocos2dx_RenderTexture_clear(JSContext *cx, uint32_t argc, jsval *vp) 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_RenderTexture_clear : Error processing arguments"); - cobj->clear(arg0, arg1, arg2, arg3); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_clear : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_RenderTexture_getClearFlags(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_getClearFlags : Invalid Native Object"); - if (argc == 0) { - unsigned int ret = cobj->getClearFlags(); - jsval jsret = JSVAL_NULL; - jsret = uint32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_getClearFlags : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_newImage(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_newImage : Invalid Native Object"); - if (argc == 0) { - cocos2d::Image* ret = cobj->newImage(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Image*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_RenderTexture_newImage : Error processing arguments"); - cocos2d::Image* ret = cobj->newImage(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Image*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_newImage : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_RenderTexture_setClearDepth(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::RenderTexture* cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_setClearDepth : 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_RenderTexture_setClearDepth : Error processing arguments"); - cobj->setClearDepth(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_setClearDepth : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_RenderTexture_initWithWidthAndHeight(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::RenderTexture* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_initWithWidthAndHeight : Invalid Native Object"); - do { - if (argc == 4) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - if (!ok) { ok = true; break; } - int arg1; - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - if (!ok) { ok = true; break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - if (!ok) { ok = true; break; } - unsigned int arg3; - ok &= jsval_to_uint32(cx, args.get(3), &arg3); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - do { - if (argc == 3) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - if (!ok) { ok = true; break; } - int arg1; - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - if (!ok) { ok = true; break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_RenderTexture_initWithWidthAndHeight : wrong number of arguments"); - return false; -} -bool js_cocos2dx_RenderTexture_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - do { - if (argc == 3) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - if (!ok) { ok = true; break; } - int arg1; - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - if (!ok) { ok = true; break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - if (!ok) { ok = true; break; } - cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1, arg2); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::RenderTexture*)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) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - if (!ok) { ok = true; break; } - int arg1; - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - if (!ok) { ok = true; break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - if (!ok) { ok = true; break; } - unsigned int arg3; - ok &= jsval_to_uint32(cx, args.get(3), &arg3); - if (!ok) { ok = true; break; } - cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::RenderTexture*)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) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - if (!ok) { ok = true; break; } - int arg1; - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - if (!ok) { ok = true; break; } - cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::RenderTexture*)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_RenderTexture_create : wrong number of arguments"); - return false; -} -bool js_cocos2dx_RenderTexture_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::RenderTexture* cobj = new (std::nothrow) cocos2d::RenderTexture(); - 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::RenderTexture"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_RenderTexture_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (RenderTexture)", obj); -} - -static bool js_cocos2d_RenderTexture_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::RenderTexture *nobj = new (std::nothrow) cocos2d::RenderTexture(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::RenderTexture"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_RenderTexture(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_RenderTexture_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_RenderTexture_class->name = "RenderTexture"; - jsb_cocos2d_RenderTexture_class->addProperty = JS_PropertyStub; - jsb_cocos2d_RenderTexture_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_RenderTexture_class->getProperty = JS_PropertyStub; - jsb_cocos2d_RenderTexture_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_RenderTexture_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_RenderTexture_class->resolve = JS_ResolveStub; - jsb_cocos2d_RenderTexture_class->convert = JS_ConvertStub; - jsb_cocos2d_RenderTexture_class->finalize = js_cocos2d_RenderTexture_finalize; - jsb_cocos2d_RenderTexture_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("setVirtualViewport", js_cocos2dx_RenderTexture_setVirtualViewport, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("clearStencil", js_cocos2dx_RenderTexture_clearStencil, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getClearDepth", js_cocos2dx_RenderTexture_getClearDepth, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getClearStencil", js_cocos2dx_RenderTexture_getClearStencil, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("end", js_cocos2dx_RenderTexture_end, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setClearStencil", js_cocos2dx_RenderTexture_setClearStencil, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSprite", js_cocos2dx_RenderTexture_setSprite, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSprite", js_cocos2dx_RenderTexture_getSprite, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isAutoDraw", js_cocos2dx_RenderTexture_isAutoDraw, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setKeepMatrix", js_cocos2dx_RenderTexture_setKeepMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setClearFlags", js_cocos2dx_RenderTexture_setClearFlags, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("begin", js_cocos2dx_RenderTexture_begin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setAutoDraw", js_cocos2dx_RenderTexture_setAutoDraw, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setClearColor", js_cocos2dx_RenderTexture_setClearColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("endToLua", js_cocos2dx_RenderTexture_endToLua, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("beginWithClear", js_cocos2dx_RenderTexture_beginWithClear, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("clearDepth", js_cocos2dx_RenderTexture_clearDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getClearColor", js_cocos2dx_RenderTexture_getClearColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("clear", js_cocos2dx_RenderTexture_clear, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getClearFlags", js_cocos2dx_RenderTexture_getClearFlags, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("newImage", js_cocos2dx_RenderTexture_newImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setClearDepth", js_cocos2dx_RenderTexture_setClearDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithWidthAndHeight", js_cocos2dx_RenderTexture_initWithWidthAndHeight, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_RenderTexture_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_RenderTexture_create, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_RenderTexture_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_RenderTexture_class, - js_cocos2dx_RenderTexture_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, "RenderTexture", 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_RenderTexture_class; - p->proto = jsb_cocos2d_RenderTexture_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_NodeGrid_class; -JSObject *jsb_cocos2d_NodeGrid_prototype; - -bool js_cocos2dx_NodeGrid_setTarget(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::NodeGrid* cobj = (cocos2d::NodeGrid *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_NodeGrid_setTarget : Invalid Native Object"); - if (argc == 1) { - cocos2d::Node* 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::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_NodeGrid_setTarget : Error processing arguments"); - cobj->setTarget(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_NodeGrid_setTarget : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_NodeGrid_getGrid(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::NodeGrid* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::NodeGrid *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_NodeGrid_getGrid : Invalid Native Object"); - do { - if (argc == 0) { - const cocos2d::GridBase* ret = cobj->getGrid(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::GridBase*)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::GridBase* ret = cobj->getGrid(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::GridBase*)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_NodeGrid_getGrid : wrong number of arguments"); - return false; -} -bool js_cocos2dx_NodeGrid_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::NodeGrid* ret = cocos2d::NodeGrid::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::NodeGrid*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_NodeGrid_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_NodeGrid_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::NodeGrid* cobj = new (std::nothrow) cocos2d::NodeGrid(); - 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::NodeGrid"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_NodeGrid_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (NodeGrid)", obj); -} - -void js_register_cocos2dx_NodeGrid(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_NodeGrid_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_NodeGrid_class->name = "NodeGrid"; - jsb_cocos2d_NodeGrid_class->addProperty = JS_PropertyStub; - jsb_cocos2d_NodeGrid_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_NodeGrid_class->getProperty = JS_PropertyStub; - jsb_cocos2d_NodeGrid_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_NodeGrid_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_NodeGrid_class->resolve = JS_ResolveStub; - jsb_cocos2d_NodeGrid_class->convert = JS_ConvertStub; - jsb_cocos2d_NodeGrid_class->finalize = js_cocos2d_NodeGrid_finalize; - jsb_cocos2d_NodeGrid_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("setTarget", js_cocos2dx_NodeGrid_setTarget, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getGrid", js_cocos2dx_NodeGrid_getGrid, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_NodeGrid_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_NodeGrid_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_NodeGrid_class, - js_cocos2dx_NodeGrid_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, "NodeGrid", 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_NodeGrid_class; - p->proto = jsb_cocos2d_NodeGrid_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleBatchNode_class; -JSObject *jsb_cocos2d_ParticleBatchNode_prototype; - -bool js_cocos2dx_ParticleBatchNode_setTexture(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_setTexture : Invalid Native Object"); - if (argc == 1) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_setTexture : Error processing arguments"); - cobj->setTexture(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_setTexture : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleBatchNode_initWithTexture(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_initWithTexture : Invalid Native Object"); - if (argc == 2) { - cocos2d::Texture2D* arg0; - int arg1; - 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::Texture2D*)(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_ParticleBatchNode_initWithTexture : Error processing arguments"); - bool ret = cobj->initWithTexture(arg0, arg1); + 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_ParticleBatchNode_initWithTexture : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_Camera_initPerspective : wrong number of arguments: %d, was expecting %d", argc, 4); return false; } -bool js_cocos2dx_ParticleBatchNode_disableParticle(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_disableParticle : 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_ParticleBatchNode_disableParticle : Error processing arguments"); - cobj->disableParticle(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_disableParticle : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleBatchNode_getTexture(JSContext *cx, uint32_t argc, jsval *vp) +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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_getTexture : Invalid Native Object"); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getProjectionMatrix : Invalid Native Object"); if (argc == 0) { - cocos2d::Texture2D* ret = cobj->getTexture(); + const cocos2d::Mat4& ret = cobj->getProjectionMatrix(); jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); + jsret = matrix_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_getTexture : 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_ParticleBatchNode_setTextureAtlas(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_setTextureAtlas : Invalid Native Object"); - if (argc == 1) { - cocos2d::TextureAtlas* 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::TextureAtlas*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_setTextureAtlas : Error processing arguments"); - cobj->setTextureAtlas(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_setTextureAtlas : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleBatchNode_initWithFile(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_initWithFile : Invalid Native Object"); - if (argc == 2) { - std::string arg0; - int arg1; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_initWithFile : Error processing arguments"); - bool ret = cobj->initWithFile(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_initWithFile : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_ParticleBatchNode_setBlendFunc(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_setBlendFunc : Invalid Native Object"); - if (argc == 1) { - cocos2d::BlendFunc arg0; - ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_setBlendFunc : Error processing arguments"); - cobj->setBlendFunc(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup : Error processing arguments"); - cobj->removeAllChildrenWithCleanup(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleBatchNode_getTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_getViewProjectionMatrix(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_getTextureAtlas : Invalid Native Object"); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getViewProjectionMatrix : Invalid Native Object"); if (argc == 0) { - cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); + const cocos2d::Mat4& ret = cobj->getViewProjectionMatrix(); jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TextureAtlas*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); + jsret = matrix_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_getTextureAtlas : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_getViewProjectionMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_ParticleBatchNode_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_getBlendFunc : Invalid Native Object"); + 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::BlendFunc& ret = cobj->getBlendFunc(); + const cocos2d::Mat4& ret = cobj->getViewMatrix(); jsval jsret = JSVAL_NULL; - jsret = blendfunc_to_jsval(cx, ret); + jsret = matrix_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_getViewMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_ParticleBatchNode_insertChild(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_insertChild : Invalid Native Object"); - if (argc == 2) { - cocos2d::ParticleSystem* arg0; - int arg1; - 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::ParticleSystem*)(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_ParticleBatchNode_insertChild : Error processing arguments"); - cobj->insertChild(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_insertChild : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_ParticleBatchNode_removeChildAtIndex(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::ParticleBatchNode* cobj = (cocos2d::ParticleBatchNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleBatchNode_removeChildAtIndex : Invalid Native Object"); - if (argc == 2) { - int arg0; - bool arg1; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - arg1 = JS::ToBoolean(args.get(1)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_removeChildAtIndex : Error processing arguments"); - cobj->removeChildAtIndex(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_removeChildAtIndex : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_ParticleBatchNode_create(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_ParticleBatchNode_create : Error processing arguments"); - cocos2d::ParticleBatchNode* ret = cocos2d::ParticleBatchNode::create(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - if (argc == 2) { - std::string arg0; - int arg1; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_create : Error processing arguments"); - cocos2d::ParticleBatchNode* ret = cocos2d::ParticleBatchNode::create(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleBatchNode_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleBatchNode_createWithTexture : Error processing arguments"); - cocos2d::ParticleBatchNode* ret = cocos2d::ParticleBatchNode::createWithTexture(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - if (argc == 2) { - cocos2d::Texture2D* arg0; - int arg1; - 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::Texture2D*)(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_ParticleBatchNode_createWithTexture : Error processing arguments"); - cocos2d::ParticleBatchNode* ret = cocos2d::ParticleBatchNode::createWithTexture(arg0, arg1); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleBatchNode_createWithTexture : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleBatchNode_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleBatchNode* cobj = new (std::nothrow) cocos2d::ParticleBatchNode(); - 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::ParticleBatchNode"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_ParticleBatchNode_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleBatchNode)", obj); -} - -static bool js_cocos2d_ParticleBatchNode_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::ParticleBatchNode *nobj = new (std::nothrow) cocos2d::ParticleBatchNode(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::ParticleBatchNode"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_ParticleBatchNode(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleBatchNode_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleBatchNode_class->name = "ParticleBatchNode"; - jsb_cocos2d_ParticleBatchNode_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleBatchNode_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleBatchNode_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleBatchNode_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleBatchNode_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleBatchNode_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleBatchNode_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleBatchNode_class->finalize = js_cocos2d_ParticleBatchNode_finalize; - jsb_cocos2d_ParticleBatchNode_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("setTexture", js_cocos2dx_ParticleBatchNode_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTexture", js_cocos2dx_ParticleBatchNode_initWithTexture, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("disableParticle", js_cocos2dx_ParticleBatchNode_disableParticle, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTexture", js_cocos2dx_ParticleBatchNode_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTextureAtlas", js_cocos2dx_ParticleBatchNode_setTextureAtlas, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithFile", js_cocos2dx_ParticleBatchNode_initWithFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBlendFunc", js_cocos2dx_ParticleBatchNode_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllChildrenWithCleanup", js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTextureAtlas", js_cocos2dx_ParticleBatchNode_getTextureAtlas, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBlendFunc", js_cocos2dx_ParticleBatchNode_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("insertChild", js_cocos2dx_ParticleBatchNode_insertChild, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeChildAtIndex", js_cocos2dx_ParticleBatchNode_removeChildAtIndex, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_ParticleBatchNode_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleBatchNode_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTexture", js_cocos2dx_ParticleBatchNode_createWithTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleBatchNode_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_ParticleBatchNode_class, - js_cocos2dx_ParticleBatchNode_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, "ParticleBatchNode", 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_ParticleBatchNode_class; - p->proto = jsb_cocos2d_ParticleBatchNode_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleSystem_class; -JSObject *jsb_cocos2d_ParticleSystem_prototype; - -bool js_cocos2dx_ParticleSystem_getStartSizeVar(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_getCameraFlag(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartSizeVar : Invalid Native Object"); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getCameraFlag : Invalid Native Object"); if (argc == 0) { - double ret = cobj->getStartSizeVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartSizeVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getTexture(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getTexture : Invalid Native Object"); - if (argc == 0) { - cocos2d::Texture2D* ret = cobj->getTexture(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_isFull(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_isFull : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isFull(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_isFull : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getBatchNode(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getBatchNode : Invalid Native Object"); - if (argc == 0) { - cocos2d::ParticleBatchNode* ret = cobj->getBatchNode(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleBatchNode*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getBatchNode : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getStartColor(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartColor : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Color4F& ret = cobj->getStartColor(); - jsval jsret = JSVAL_NULL; - jsret = cccolor4f_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartColor : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getPositionType(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getPositionType : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getPositionType(); + int ret = (int)cobj->getCameraFlag(); jsval jsret = JSVAL_NULL; jsret = int32_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getPositionType : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_getCameraFlag : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_ParticleSystem_setPosVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setPosVar : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= jsval_to_vector2(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setPosVar : Error processing arguments"); - cobj->setPosVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setPosVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getEndSpin(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_getType(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndSpin : Invalid Native Object"); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getType : Invalid Native Object"); if (argc == 0) { - double ret = cobj->getEndSpin(); + int ret = (int)cobj->getType(); jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); + jsret = int32_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndSpin : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_getType : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_ParticleSystem_setRotatePerSecondVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRotatePerSecondVar : 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_ParticleSystem_setRotatePerSecondVar : Error processing arguments"); - cobj->setRotatePerSecondVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRotatePerSecondVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getStartSpinVar(JSContext *cx, uint32_t argc, jsval *vp) +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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartSpinVar : Invalid Native Object"); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initDefault : Invalid Native Object"); if (argc == 0) { - double ret = cobj->getStartSpinVar(); + bool ret = cobj->initDefault(); jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); + jsret = BOOLEAN_TO_JSVAL(ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartSpinVar : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_initDefault : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_ParticleSystem_getRadialAccelVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRadialAccelVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getRadialAccelVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRadialAccelVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getEndSizeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndSizeVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getEndSizeVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndSizeVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setTangentialAccel(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setTangentialAccel : Invalid Native Object"); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_project : 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_ParticleSystem_setTangentialAccel : Error processing arguments"); - cobj->setTangentialAccel(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setTangentialAccel : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getRadialAccel(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRadialAccel : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getRadialAccel(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRadialAccel : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setStartRadius(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartRadius : 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_ParticleSystem_setStartRadius : Error processing arguments"); - cobj->setStartRadius(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartRadius : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setRotatePerSecond(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRotatePerSecond : 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_ParticleSystem_setRotatePerSecond : Error processing arguments"); - cobj->setRotatePerSecond(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRotatePerSecond : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setEndSize(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndSize : 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_ParticleSystem_setEndSize : Error processing arguments"); - cobj->setEndSize(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndSize : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getGravity : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Vec2& ret = cobj->getGravity(); + 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_ParticleSystem_getGravity : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_project : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_ParticleSystem_getTangentialAccel(JSContext *cx, uint32_t argc, jsval *vp) +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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getTangentialAccel : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getTangentialAccel(); + 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_ParticleSystem_getTangentialAccel : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_getDepthInView : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_ParticleSystem_setEndRadius(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndRadius : Invalid Native Object"); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_lookAt : 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_ParticleSystem_setEndRadius : Error processing arguments"); - cobj->setEndRadius(arg0); + 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; } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndRadius : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getSpeed(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getSpeed : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getSpeed(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getSpeed : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getAngle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getAngle : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getAngle(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getAngle : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setEndColor(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndColor : Invalid Native Object"); - if (argc == 1) { - cocos2d::Color4F arg0; - ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setEndColor : Error processing arguments"); - cobj->setEndColor(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndColor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setStartSpin(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartSpin : 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_ParticleSystem_setStartSpin : Error processing arguments"); - cobj->setStartSpin(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartSpin : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setDuration(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setDuration : 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_ParticleSystem_setDuration : Error processing arguments"); - cobj->setDuration(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setDuration : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_initWithTotalParticles(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_initWithTotalParticles : 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_ParticleSystem_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setTexture(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setTexture : Invalid Native Object"); - if (argc == 1) { - cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setTexture : Error processing arguments"); - cobj->setTexture(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setTexture : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getPosVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getPosVar : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Vec2& ret = cobj->getPosVar(); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getPosVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_updateWithNoTime(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_updateWithNoTime : Invalid Native Object"); - if (argc == 0) { - cobj->updateWithNoTime(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_updateWithNoTime : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_isBlendAdditive(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_isBlendAdditive : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isBlendAdditive(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_isBlendAdditive : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getSpeedVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getSpeedVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getSpeedVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getSpeedVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setPositionType(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setPositionType : Invalid Native Object"); - if (argc == 1) { - cocos2d::ParticleSystem::PositionType arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setPositionType : Error processing arguments"); - cobj->setPositionType(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setPositionType : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_stopSystem(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_stopSystem : Invalid Native Object"); - if (argc == 0) { - cobj->stopSystem(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_stopSystem : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getSourcePosition(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getSourcePosition : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Vec2& ret = cobj->getSourcePosition(); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getSourcePosition : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setLifeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setLifeVar : 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_ParticleSystem_setLifeVar : Error processing arguments"); - cobj->setLifeVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setLifeVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setTotalParticles(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setTotalParticles : 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_ParticleSystem_setTotalParticles : Error processing arguments"); - cobj->setTotalParticles(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setEndColorVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndColorVar : Invalid Native Object"); - if (argc == 1) { - cocos2d::Color4F arg0; - ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setEndColorVar : Error processing arguments"); - cobj->setEndColorVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndColorVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_updateQuadWithParticle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_updateQuadWithParticle : Invalid Native Object"); if (argc == 2) { - cocos2d::sParticle* arg0; - cocos2d::Vec2 arg1; - #pragma warning NO CONVERSION TO NATIVE FOR sParticle* - ok = false; - ok &= jsval_to_vector2(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_updateQuadWithParticle : Error processing arguments"); - cobj->updateQuadWithParticle(arg0, arg1); + 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_ParticleSystem_updateQuadWithParticle : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_Camera_lookAt : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_ParticleSystem_getAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_setCameraFlag(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_setCameraFlag : Invalid Native Object"); + if (argc == 1) { + cocos2d::CameraFlag arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setCameraFlag : Error processing arguments"); + cobj->setCameraFlag(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_setCameraFlag : 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); + 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_initOrthographic : 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_initOrthographic : Error processing arguments"); + bool ret = cobj->initOrthographic(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_initOrthographic : wrong number of arguments: %d, was expecting %d", argc, 4); + 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) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getAtlasIndex : Invalid Native Object"); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepth : Invalid Native Object"); if (argc == 0) { - int ret = cobj->getAtlasIndex(); + int ret = cobj->getDepth(); jsval jsret = JSVAL_NULL; jsret = int32_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getAtlasIndex : 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_ParticleSystem_getStartSize(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartSize : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getStartSize(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartSize : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setStartSpinVar(JSContext *cx, uint32_t argc, jsval *vp) +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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartSpinVar : 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_ParticleSystem_setStartSpinVar : Error processing arguments"); - cobj->setStartSpinVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartSpinVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_resetSystem(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_resetSystem : Invalid Native Object"); - if (argc == 0) { - cobj->resetSystem(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_resetSystem : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setAtlasIndex(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setAtlasIndex : Invalid Native Object"); + 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_ParticleSystem_setAtlasIndex : Error processing arguments"); - cobj->setAtlasIndex(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_ParticleSystem_setAtlasIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_Camera_setDepth : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_ParticleSystem_setTangentialAccelVar(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_create(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setTangentialAccelVar : 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_ParticleSystem_setTangentialAccelVar : Error processing arguments"); - cobj->setTangentialAccelVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setTangentialAccelVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setEndRadiusVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndRadiusVar : 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_ParticleSystem_setEndRadiusVar : Error processing arguments"); - cobj->setEndRadiusVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndRadiusVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getEndRadius(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndRadius : Invalid Native Object"); if (argc == 0) { - double ret = cobj->getEndRadius(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndRadius : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_isActive(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_isActive : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isActive(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_isActive : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setRadialAccelVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRadialAccelVar : 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_ParticleSystem_setRadialAccelVar : Error processing arguments"); - cobj->setRadialAccelVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRadialAccelVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setStartSize(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartSize : 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_ParticleSystem_setStartSize : Error processing arguments"); - cobj->setStartSize(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartSize : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setSpeed(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setSpeed : 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_ParticleSystem_setSpeed : Error processing arguments"); - cobj->setSpeed(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setSpeed : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getStartSpin(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartSpin : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getStartSpin(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartSpin : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getRotatePerSecond(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRotatePerSecond : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getRotatePerSecond(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRotatePerSecond : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_initParticle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_initParticle : Invalid Native Object"); - if (argc == 1) { - cocos2d::sParticle* arg0; - #pragma warning NO CONVERSION TO NATIVE FOR sParticle* - ok = false; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_initParticle : Error processing arguments"); - cobj->initParticle(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_initParticle : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setEmitterMode(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEmitterMode : Invalid Native Object"); - if (argc == 1) { - cocos2d::ParticleSystem::Mode arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setEmitterMode : Error processing arguments"); - cobj->setEmitterMode(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEmitterMode : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getDuration(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getDuration : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getDuration(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getDuration : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setSourcePosition(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setSourcePosition : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= jsval_to_vector2(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setSourcePosition : Error processing arguments"); - cobj->setSourcePosition(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setSourcePosition : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getEndSpinVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndSpinVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getEndSpinVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndSpinVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setBlendAdditive(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setBlendAdditive : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setBlendAdditive : Error processing arguments"); - cobj->setBlendAdditive(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setBlendAdditive : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setLife(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setLife : 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_ParticleSystem_setLife : Error processing arguments"); - cobj->setLife(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setLife : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setAngleVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setAngleVar : 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_ParticleSystem_setAngleVar : Error processing arguments"); - cobj->setAngleVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setAngleVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setRotationIsDir(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRotationIsDir : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setRotationIsDir : Error processing arguments"); - cobj->setRotationIsDir(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRotationIsDir : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setEndSizeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndSizeVar : 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_ParticleSystem_setEndSizeVar : Error processing arguments"); - cobj->setEndSizeVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndSizeVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setAngle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setAngle : 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_ParticleSystem_setAngle : Error processing arguments"); - cobj->setAngle(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setAngle : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setBatchNode(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setBatchNode : Invalid Native Object"); - if (argc == 1) { - cocos2d::ParticleBatchNode* 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::ParticleBatchNode*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setBatchNode : Error processing arguments"); - cobj->setBatchNode(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setBatchNode : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getTangentialAccelVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getTangentialAccelVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getTangentialAccelVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getTangentialAccelVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getEmitterMode(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEmitterMode : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getEmitterMode(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEmitterMode : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setEndSpinVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndSpinVar : 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_ParticleSystem_setEndSpinVar : Error processing arguments"); - cobj->setEndSpinVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndSpinVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_initWithFile(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_initWithFile : 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_ParticleSystem_initWithFile : Error processing arguments"); - bool ret = cobj->initWithFile(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_initWithFile : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getAngleVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getAngleVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getAngleVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getAngleVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setStartColor(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartColor : Invalid Native Object"); - if (argc == 1) { - cocos2d::Color4F arg0; - ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setStartColor : Error processing arguments"); - cobj->setStartColor(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartColor : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getRotatePerSecondVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRotatePerSecondVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getRotatePerSecondVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRotatePerSecondVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getEndSize(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndSize : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getEndSize(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndSize : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getLife(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getLife : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getLife(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getLife : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setSpeedVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setSpeedVar : 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_ParticleSystem_setSpeedVar : Error processing arguments"); - cobj->setSpeedVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setSpeedVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish : Error processing arguments"); - cobj->setAutoRemoveOnFinish(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setGravity : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= jsval_to_vector2(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setGravity : Error processing arguments"); - cobj->setGravity(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setGravity : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_postStep(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_postStep : Invalid Native Object"); - if (argc == 0) { - cobj->postStep(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_postStep : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setEmissionRate(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEmissionRate : 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_ParticleSystem_setEmissionRate : Error processing arguments"); - cobj->setEmissionRate(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEmissionRate : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getEndColorVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndColorVar : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Color4F& ret = cobj->getEndColorVar(); - jsval jsret = JSVAL_NULL; - jsret = cccolor4f_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndColorVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getRotationIsDir(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getRotationIsDir : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->getRotationIsDir(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getRotationIsDir : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getEmissionRate(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEmissionRate : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getEmissionRate(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEmissionRate : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getEndColor(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndColor : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Color4F& ret = cobj->getEndColor(); - jsval jsret = JSVAL_NULL; - jsret = cccolor4f_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndColor : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getLifeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getLifeVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getLifeVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getLifeVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setStartSizeVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartSizeVar : 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_ParticleSystem_setStartSizeVar : Error processing arguments"); - cobj->setStartSizeVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartSizeVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_addParticle(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_addParticle : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->addParticle(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_addParticle : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getStartRadius(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartRadius : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getStartRadius(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartRadius : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getParticleCount(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getParticleCount : Invalid Native Object"); - if (argc == 0) { - unsigned int ret = cobj->getParticleCount(); - jsval jsret = JSVAL_NULL; - jsret = uint32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getParticleCount : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getStartRadiusVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartRadiusVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getStartRadiusVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartRadiusVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getBlendFunc(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getBlendFunc : Invalid Native Object"); - if (argc == 0) { - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - jsval jsret = JSVAL_NULL; - jsret = blendfunc_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setStartColorVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartColorVar : Invalid Native Object"); - if (argc == 1) { - cocos2d::Color4F arg0; - ok &= jsval_to_cccolor4f(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setStartColorVar : Error processing arguments"); - cobj->setStartColorVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartColorVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setEndSpin(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setEndSpin : 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_ParticleSystem_setEndSpin : Error processing arguments"); - cobj->setEndSpin(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setEndSpin : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setRadialAccel(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setRadialAccel : 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_ParticleSystem_setRadialAccel : Error processing arguments"); - cobj->setRadialAccel(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setRadialAccel : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_initWithDictionary(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::ParticleSystem* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_initWithDictionary : Invalid Native Object"); - do { - if (argc == 2) { - cocos2d::ValueMap arg0; - ok &= jsval_to_ccvaluemap(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithDictionary(arg0, arg1); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - do { - if (argc == 1) { - cocos2d::ValueMap arg0; - ok &= jsval_to_ccvaluemap(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - bool ret = cobj->initWithDictionary(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_initWithDictionary : wrong number of arguments"); - return false; -} -bool js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->isAutoRemoveOnFinish(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getTotalParticles(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getTotalParticles : Invalid Native Object"); - if (argc == 0) { - int ret = cobj->getTotalParticles(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_setStartRadiusVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setStartRadiusVar : 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_ParticleSystem_setStartRadiusVar : Error processing arguments"); - cobj->setStartRadiusVar(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setStartRadiusVar : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_setBlendFunc(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_setBlendFunc : Invalid Native Object"); - if (argc == 1) { - cocos2d::BlendFunc arg0; - ok &= jsval_to_blendfunc(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_setBlendFunc : Error processing arguments"); - cobj->setBlendFunc(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystem_getEndRadiusVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getEndRadiusVar : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getEndRadiusVar(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getEndRadiusVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_getStartColorVar(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::ParticleSystem* cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_getStartColorVar : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Color4F& ret = cobj->getStartColorVar(); - jsval jsret = JSVAL_NULL; - jsret = cccolor4f_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_getStartColorVar : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSystem_create(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_ParticleSystem_create : Error processing arguments"); - cocos2d::ParticleSystem* ret = cocos2d::ParticleSystem::create(arg0); + cocos2d::Camera* ret = cocos2d::Camera::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystem*)ret); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); jsret = OBJECT_TO_JSVAL(jsProxy->obj); } else { jsret = JSVAL_NULL; @@ -53499,23 +56619,29 @@ bool js_cocos2dx_ParticleSystem_create(JSContext *cx, uint32_t argc, jsval *vp) args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_Camera_create : wrong number of arguments"); return false; } -bool js_cocos2dx_ParticleSystem_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_createPerspective(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystem_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleSystem* ret = cocos2d::ParticleSystem::createWithTotalParticles(arg0); + 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_createPerspective : Error processing arguments"); + cocos2d::Camera* ret = cocos2d::Camera::createPerspective(arg0, arg1, arg2, arg3); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystem*)ret); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); jsret = OBJECT_TO_JSVAL(jsProxy->obj); } else { jsret = JSVAL_NULL; @@ -53524,20 +56650,93 @@ bool js_cocos2dx_ParticleSystem_createWithTotalParticles(JSContext *cx, uint32_t args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_ParticleSystem_createWithTotalParticles : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_Camera_createPerspective : wrong number of arguments"); return false; } -bool js_cocos2dx_ParticleSystem_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_createOrthographic(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - cocos2d::ParticleSystem* cobj = new (std::nothrow) cocos2d::ParticleSystem(); + 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_createOrthographic : Error processing arguments"); + cocos2d::Camera* ret = cocos2d::Camera::createOrthographic(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Camera_createOrthographic : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Camera_getDefaultCamera(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::Camera* ret = cocos2d::Camera::getDefaultCamera(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Camera_getDefaultCamera : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Camera_getVisitingCamera(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + const cocos2d::Camera* ret = cocos2d::Camera::getVisitingCamera(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Camera_getVisitingCamera : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Camera_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Camera* cobj = new (std::nothrow) cocos2d::Camera(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -53551,7 +56750,7 @@ bool js_cocos2dx_ParticleSystem_constructor(JSContext *cx, uint32_t argc, jsval 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::ParticleSystem"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Camera"); if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); return true; @@ -53560,38 +56759,22 @@ bool js_cocos2dx_ParticleSystem_constructor(JSContext *cx, uint32_t argc, jsval extern JSObject *jsb_cocos2d_Node_prototype; -void js_cocos2d_ParticleSystem_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSystem)", obj); +void js_cocos2d_Camera_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Camera)", obj); } -static bool js_cocos2d_ParticleSystem_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::ParticleSystem *nobj = new (std::nothrow) cocos2d::ParticleSystem(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::ParticleSystem"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_ParticleSystem(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleSystem_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleSystem_class->name = "ParticleSystem"; - jsb_cocos2d_ParticleSystem_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSystem_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleSystem_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSystem_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleSystem_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleSystem_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleSystem_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleSystem_class->finalize = js_cocos2d_ParticleSystem_finalize; - jsb_cocos2d_ParticleSystem_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Camera_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Camera_class->name = "Camera"; + jsb_cocos2d_Camera_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Camera_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Camera_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Camera_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Camera_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Camera_class->resolve = JS_ResolveStub; + jsb_cocos2d_Camera_class->convert = JS_ConvertStub; + jsb_cocos2d_Camera_class->finalize = js_cocos2d_Camera_finalize; + jsb_cocos2d_Camera_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -53599,120 +56782,39 @@ void js_register_cocos2dx_ParticleSystem(JSContext *cx, JS::HandleObject global) }; static JSFunctionSpec funcs[] = { - JS_FN("getStartSizeVar", js_cocos2dx_ParticleSystem_getStartSizeVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTexture", js_cocos2dx_ParticleSystem_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isFull", js_cocos2dx_ParticleSystem_isFull, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBatchNode", js_cocos2dx_ParticleSystem_getBatchNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStartColor", js_cocos2dx_ParticleSystem_getStartColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPositionType", js_cocos2dx_ParticleSystem_getPositionType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPosVar", js_cocos2dx_ParticleSystem_setPosVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEndSpin", js_cocos2dx_ParticleSystem_getEndSpin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRotatePerSecondVar", js_cocos2dx_ParticleSystem_setRotatePerSecondVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStartSpinVar", js_cocos2dx_ParticleSystem_getStartSpinVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRadialAccelVar", js_cocos2dx_ParticleSystem_getRadialAccelVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEndSizeVar", js_cocos2dx_ParticleSystem_getEndSizeVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTangentialAccel", js_cocos2dx_ParticleSystem_setTangentialAccel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRadialAccel", js_cocos2dx_ParticleSystem_getRadialAccel, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStartRadius", js_cocos2dx_ParticleSystem_setStartRadius, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRotatePerSecond", js_cocos2dx_ParticleSystem_setRotatePerSecond, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEndSize", js_cocos2dx_ParticleSystem_setEndSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getGravity", js_cocos2dx_ParticleSystem_getGravity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTangentialAccel", js_cocos2dx_ParticleSystem_getTangentialAccel, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEndRadius", js_cocos2dx_ParticleSystem_setEndRadius, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSpeed", js_cocos2dx_ParticleSystem_getSpeed, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getAngle", js_cocos2dx_ParticleSystem_getAngle, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEndColor", js_cocos2dx_ParticleSystem_setEndColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStartSpin", js_cocos2dx_ParticleSystem_setStartSpin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDuration", js_cocos2dx_ParticleSystem_setDuration, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSystem_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTexture", js_cocos2dx_ParticleSystem_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPosVar", js_cocos2dx_ParticleSystem_getPosVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("updateWithNoTime", js_cocos2dx_ParticleSystem_updateWithNoTime, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isBlendAdditive", js_cocos2dx_ParticleSystem_isBlendAdditive, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSpeedVar", js_cocos2dx_ParticleSystem_getSpeedVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPositionType", js_cocos2dx_ParticleSystem_setPositionType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("stopSystem", js_cocos2dx_ParticleSystem_stopSystem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSourcePosition", js_cocos2dx_ParticleSystem_getSourcePosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setLifeVar", js_cocos2dx_ParticleSystem_setLifeVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTotalParticles", js_cocos2dx_ParticleSystem_setTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEndColorVar", js_cocos2dx_ParticleSystem_setEndColorVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("updateQuadWithParticle", js_cocos2dx_ParticleSystem_updateQuadWithParticle, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getAtlasIndex", js_cocos2dx_ParticleSystem_getAtlasIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStartSize", js_cocos2dx_ParticleSystem_getStartSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStartSpinVar", js_cocos2dx_ParticleSystem_setStartSpinVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("resetSystem", js_cocos2dx_ParticleSystem_resetSystem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setAtlasIndex", js_cocos2dx_ParticleSystem_setAtlasIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTangentialAccelVar", js_cocos2dx_ParticleSystem_setTangentialAccelVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEndRadiusVar", js_cocos2dx_ParticleSystem_setEndRadiusVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEndRadius", js_cocos2dx_ParticleSystem_getEndRadius, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isActive", js_cocos2dx_ParticleSystem_isActive, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRadialAccelVar", js_cocos2dx_ParticleSystem_setRadialAccelVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStartSize", js_cocos2dx_ParticleSystem_setStartSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSpeed", js_cocos2dx_ParticleSystem_setSpeed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStartSpin", js_cocos2dx_ParticleSystem_getStartSpin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRotatePerSecond", js_cocos2dx_ParticleSystem_getRotatePerSecond, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initParticle", js_cocos2dx_ParticleSystem_initParticle, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEmitterMode", js_cocos2dx_ParticleSystem_setEmitterMode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDuration", js_cocos2dx_ParticleSystem_getDuration, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSourcePosition", js_cocos2dx_ParticleSystem_setSourcePosition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEndSpinVar", js_cocos2dx_ParticleSystem_getEndSpinVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBlendAdditive", js_cocos2dx_ParticleSystem_setBlendAdditive, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setLife", js_cocos2dx_ParticleSystem_setLife, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setAngleVar", js_cocos2dx_ParticleSystem_setAngleVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRotationIsDir", js_cocos2dx_ParticleSystem_setRotationIsDir, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEndSizeVar", js_cocos2dx_ParticleSystem_setEndSizeVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setAngle", js_cocos2dx_ParticleSystem_setAngle, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBatchNode", js_cocos2dx_ParticleSystem_setBatchNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTangentialAccelVar", js_cocos2dx_ParticleSystem_getTangentialAccelVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEmitterMode", js_cocos2dx_ParticleSystem_getEmitterMode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEndSpinVar", js_cocos2dx_ParticleSystem_setEndSpinVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithFile", js_cocos2dx_ParticleSystem_initWithFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getAngleVar", js_cocos2dx_ParticleSystem_getAngleVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStartColor", js_cocos2dx_ParticleSystem_setStartColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRotatePerSecondVar", js_cocos2dx_ParticleSystem_getRotatePerSecondVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEndSize", js_cocos2dx_ParticleSystem_getEndSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getLife", js_cocos2dx_ParticleSystem_getLife, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSpeedVar", js_cocos2dx_ParticleSystem_setSpeedVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setAutoRemoveOnFinish", js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setGravity", js_cocos2dx_ParticleSystem_setGravity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("postStep", js_cocos2dx_ParticleSystem_postStep, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEmissionRate", js_cocos2dx_ParticleSystem_setEmissionRate, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEndColorVar", js_cocos2dx_ParticleSystem_getEndColorVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRotationIsDir", js_cocos2dx_ParticleSystem_getRotationIsDir, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEmissionRate", js_cocos2dx_ParticleSystem_getEmissionRate, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEndColor", js_cocos2dx_ParticleSystem_getEndColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getLifeVar", js_cocos2dx_ParticleSystem_getLifeVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStartSizeVar", js_cocos2dx_ParticleSystem_setStartSizeVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addParticle", js_cocos2dx_ParticleSystem_addParticle, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStartRadius", js_cocos2dx_ParticleSystem_getStartRadius, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getParticleCount", js_cocos2dx_ParticleSystem_getParticleCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStartRadiusVar", js_cocos2dx_ParticleSystem_getStartRadiusVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBlendFunc", js_cocos2dx_ParticleSystem_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStartColorVar", js_cocos2dx_ParticleSystem_setStartColorVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEndSpin", js_cocos2dx_ParticleSystem_setEndSpin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRadialAccel", js_cocos2dx_ParticleSystem_setRadialAccel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithDictionary", js_cocos2dx_ParticleSystem_initWithDictionary, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isAutoRemoveOnFinish", js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTotalParticles", js_cocos2dx_ParticleSystem_getTotalParticles, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStartRadiusVar", js_cocos2dx_ParticleSystem_setStartRadiusVar, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBlendFunc", js_cocos2dx_ParticleSystem_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getEndRadiusVar", js_cocos2dx_ParticleSystem_getEndRadiusVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStartColorVar", js_cocos2dx_ParticleSystem_getStartColorVar, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_ParticleSystem_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + 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("getViewProjectionMatrix", js_cocos2dx_Camera_getViewProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getViewMatrix", js_cocos2dx_Camera_getViewMatrix, 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("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("initOrthographic", js_cocos2dx_Camera_initOrthographic, 4, 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_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleSystem_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSystem_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_Camera_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createPerspective", js_cocos2dx_Camera_createPerspective, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createOrthographic", js_cocos2dx_Camera_createOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDefaultCamera", js_cocos2dx_Camera_getDefaultCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVisitingCamera", js_cocos2dx_Camera_getVisitingCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_ParticleSystem_prototype = JS_InitClass( + jsb_cocos2d_Camera_prototype = JS_InitClass( cx, global, JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_ParticleSystem_class, - js_cocos2dx_ParticleSystem_constructor, 0, // constructor + jsb_cocos2d_Camera_class, + js_cocos2dx_Camera_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -53720,2263 +56822,22 @@ void js_register_cocos2dx_ParticleSystem(JSContext *cx, JS::HandleObject global) // make the class enumerable in the registered namespace // bool found; //FIXME: Removed in Firefox v27 -// JS_SetPropertyAttributes(cx, global, "ParticleSystem", JSPROP_ENUMERATE | JSPROP_READONLY, &found); +// JS_SetPropertyAttributes(cx, global, "Camera", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + 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_ParticleSystem_class; - p->proto = jsb_cocos2d_ParticleSystem_prototype; + p->jsclass = jsb_cocos2d_Camera_class; + p->proto = jsb_cocos2d_Camera_prototype; p->parentProto = jsb_cocos2d_Node_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_ParticleSystemQuad_class; -JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -bool js_cocos2dx_ParticleSystemQuad_setDisplayFrame(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::ParticleSystemQuad* cobj = (cocos2d::ParticleSystemQuad *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystemQuad_setDisplayFrame : Invalid Native Object"); - if (argc == 1) { - cocos2d::SpriteFrame* 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::SpriteFrame*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystemQuad_setDisplayFrame : Error processing arguments"); - cobj->setDisplayFrame(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystemQuad_setDisplayFrame : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystemQuad_setTextureWithRect(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::ParticleSystemQuad* cobj = (cocos2d::ParticleSystemQuad *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystemQuad_setTextureWithRect : Invalid Native Object"); - if (argc == 2) { - cocos2d::Texture2D* arg0; - cocos2d::Rect arg1; - 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - ok &= jsval_to_ccrect(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystemQuad_setTextureWithRect : Error processing arguments"); - cobj->setTextureWithRect(arg0, arg1); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystemQuad_setTextureWithRect : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_ParticleSystemQuad_listenRendererRecreated(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::ParticleSystemQuad* cobj = (cocos2d::ParticleSystemQuad *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystemQuad_listenRendererRecreated : Invalid Native Object"); - if (argc == 1) { - cocos2d::EventCustom* 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::EventCustom*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystemQuad_listenRendererRecreated : Error processing arguments"); - cobj->listenRendererRecreated(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSystemQuad_listenRendererRecreated : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSystemQuad_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - - do { - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cocos2d::ParticleSystemQuad* ret = cocos2d::ParticleSystemQuad::create(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystemQuad*)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::ParticleSystemQuad* ret = cocos2d::ParticleSystemQuad::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystemQuad*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - } while (0); - - do { - if (argc == 1) { - cocos2d::ValueMap arg0; - ok &= jsval_to_ccvaluemap(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - cocos2d::ParticleSystemQuad* ret = cocos2d::ParticleSystemQuad::create(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystemQuad*)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_ParticleSystemQuad_create : wrong number of arguments"); - return false; -} -bool js_cocos2dx_ParticleSystemQuad_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSystemQuad_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleSystemQuad* ret = cocos2d::ParticleSystemQuad::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSystemQuad*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleSystemQuad_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleSystemQuad_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleSystemQuad* cobj = new (std::nothrow) cocos2d::ParticleSystemQuad(); - 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::ParticleSystemQuad"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystem_prototype; - -void js_cocos2d_ParticleSystemQuad_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSystemQuad)", obj); -} - -void js_register_cocos2dx_ParticleSystemQuad(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleSystemQuad_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleSystemQuad_class->name = "ParticleSystem"; - jsb_cocos2d_ParticleSystemQuad_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSystemQuad_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleSystemQuad_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSystemQuad_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleSystemQuad_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleSystemQuad_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleSystemQuad_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleSystemQuad_class->finalize = js_cocos2d_ParticleSystemQuad_finalize; - jsb_cocos2d_ParticleSystemQuad_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("setDisplayFrame", js_cocos2dx_ParticleSystemQuad_setDisplayFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTextureWithRect", js_cocos2dx_ParticleSystemQuad_setTextureWithRect, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("listenRendererRecreated", js_cocos2dx_ParticleSystemQuad_listenRendererRecreated, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleSystemQuad_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSystemQuad_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleSystemQuad_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystem_prototype), - jsb_cocos2d_ParticleSystemQuad_class, - js_cocos2dx_ParticleSystemQuad_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, "ParticleSystem", 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_ParticleSystemQuad_class; - p->proto = jsb_cocos2d_ParticleSystemQuad_prototype; - p->parentProto = jsb_cocos2d_ParticleSystem_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleFire_class; -JSObject *jsb_cocos2d_ParticleFire_prototype; - -bool js_cocos2dx_ParticleFire_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleFire* ret = cocos2d::ParticleFire::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFire*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleFire_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleFire_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleFire_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleFire* ret = cocos2d::ParticleFire::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFire*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleFire_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleFire_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleFire* cobj = new (std::nothrow) cocos2d::ParticleFire(); - 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::ParticleFire"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleFire_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleFire)", obj); -} - -void js_register_cocos2dx_ParticleFire(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleFire_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleFire_class->name = "ParticleFire"; - jsb_cocos2d_ParticleFire_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleFire_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleFire_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleFire_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleFire_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleFire_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleFire_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleFire_class->finalize = js_cocos2d_ParticleFire_finalize; - jsb_cocos2d_ParticleFire_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_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleFire_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleFire_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleFire_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleFire_class, - js_cocos2dx_ParticleFire_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, "ParticleFire", 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_ParticleFire_class; - p->proto = jsb_cocos2d_ParticleFire_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleFireworks_class; -JSObject *jsb_cocos2d_ParticleFireworks_prototype; - -bool js_cocos2dx_ParticleFireworks_init(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::ParticleFireworks* cobj = (cocos2d::ParticleFireworks *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleFireworks_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleFireworks_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleFireworks_initWithTotalParticles(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::ParticleFireworks* cobj = (cocos2d::ParticleFireworks *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleFireworks_initWithTotalParticles : 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_ParticleFireworks_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleFireworks_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleFireworks_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleFireworks* ret = cocos2d::ParticleFireworks::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFireworks*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleFireworks_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleFireworks_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleFireworks_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleFireworks* ret = cocos2d::ParticleFireworks::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFireworks*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleFireworks_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleFireworks_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleFireworks* cobj = new (std::nothrow) cocos2d::ParticleFireworks(); - 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::ParticleFireworks"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleFireworks_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleFireworks)", obj); -} - -void js_register_cocos2dx_ParticleFireworks(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleFireworks_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleFireworks_class->name = "ParticleFireworks"; - jsb_cocos2d_ParticleFireworks_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleFireworks_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleFireworks_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleFireworks_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleFireworks_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleFireworks_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleFireworks_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleFireworks_class->finalize = js_cocos2d_ParticleFireworks_finalize; - jsb_cocos2d_ParticleFireworks_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("init", js_cocos2dx_ParticleFireworks_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleFireworks_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleFireworks_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleFireworks_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleFireworks_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleFireworks_class, - js_cocos2dx_ParticleFireworks_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, "ParticleFireworks", 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_ParticleFireworks_class; - p->proto = jsb_cocos2d_ParticleFireworks_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleSun_class; -JSObject *jsb_cocos2d_ParticleSun_prototype; - -bool js_cocos2dx_ParticleSun_init(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::ParticleSun* cobj = (cocos2d::ParticleSun *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSun_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSun_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSun_initWithTotalParticles(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::ParticleSun* cobj = (cocos2d::ParticleSun *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSun_initWithTotalParticles : 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_ParticleSun_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSun_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSun_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleSun* ret = cocos2d::ParticleSun::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSun*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleSun_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleSun_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSun_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleSun* ret = cocos2d::ParticleSun::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSun*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleSun_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleSun_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleSun* cobj = new (std::nothrow) cocos2d::ParticleSun(); - 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::ParticleSun"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleSun_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSun)", obj); -} - -void js_register_cocos2dx_ParticleSun(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleSun_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleSun_class->name = "ParticleSun"; - jsb_cocos2d_ParticleSun_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSun_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleSun_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSun_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleSun_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleSun_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleSun_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleSun_class->finalize = js_cocos2d_ParticleSun_finalize; - jsb_cocos2d_ParticleSun_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("init", js_cocos2dx_ParticleSun_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSun_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleSun_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSun_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleSun_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleSun_class, - js_cocos2dx_ParticleSun_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, "ParticleSun", 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_ParticleSun_class; - p->proto = jsb_cocos2d_ParticleSun_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleGalaxy_class; -JSObject *jsb_cocos2d_ParticleGalaxy_prototype; - -bool js_cocos2dx_ParticleGalaxy_init(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::ParticleGalaxy* cobj = (cocos2d::ParticleGalaxy *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleGalaxy_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleGalaxy_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleGalaxy_initWithTotalParticles(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::ParticleGalaxy* cobj = (cocos2d::ParticleGalaxy *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleGalaxy_initWithTotalParticles : 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_ParticleGalaxy_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleGalaxy_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleGalaxy_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleGalaxy* ret = cocos2d::ParticleGalaxy::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleGalaxy*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleGalaxy_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleGalaxy_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleGalaxy_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleGalaxy* ret = cocos2d::ParticleGalaxy::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleGalaxy*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleGalaxy_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleGalaxy_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleGalaxy* cobj = new (std::nothrow) cocos2d::ParticleGalaxy(); - 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::ParticleGalaxy"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleGalaxy_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleGalaxy)", obj); -} - -void js_register_cocos2dx_ParticleGalaxy(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleGalaxy_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleGalaxy_class->name = "ParticleGalaxy"; - jsb_cocos2d_ParticleGalaxy_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleGalaxy_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleGalaxy_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleGalaxy_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleGalaxy_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleGalaxy_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleGalaxy_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleGalaxy_class->finalize = js_cocos2d_ParticleGalaxy_finalize; - jsb_cocos2d_ParticleGalaxy_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("init", js_cocos2dx_ParticleGalaxy_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleGalaxy_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleGalaxy_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleGalaxy_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleGalaxy_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleGalaxy_class, - js_cocos2dx_ParticleGalaxy_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, "ParticleGalaxy", 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_ParticleGalaxy_class; - p->proto = jsb_cocos2d_ParticleGalaxy_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleFlower_class; -JSObject *jsb_cocos2d_ParticleFlower_prototype; - -bool js_cocos2dx_ParticleFlower_init(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::ParticleFlower* cobj = (cocos2d::ParticleFlower *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleFlower_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleFlower_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleFlower_initWithTotalParticles(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::ParticleFlower* cobj = (cocos2d::ParticleFlower *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleFlower_initWithTotalParticles : 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_ParticleFlower_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleFlower_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleFlower_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleFlower* ret = cocos2d::ParticleFlower::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFlower*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleFlower_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleFlower_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleFlower_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleFlower* ret = cocos2d::ParticleFlower::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleFlower*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleFlower_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleFlower_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleFlower* cobj = new (std::nothrow) cocos2d::ParticleFlower(); - 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::ParticleFlower"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleFlower_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleFlower)", obj); -} - -void js_register_cocos2dx_ParticleFlower(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleFlower_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleFlower_class->name = "ParticleFlower"; - jsb_cocos2d_ParticleFlower_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleFlower_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleFlower_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleFlower_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleFlower_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleFlower_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleFlower_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleFlower_class->finalize = js_cocos2d_ParticleFlower_finalize; - jsb_cocos2d_ParticleFlower_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("init", js_cocos2dx_ParticleFlower_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleFlower_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleFlower_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleFlower_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleFlower_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleFlower_class, - js_cocos2dx_ParticleFlower_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, "ParticleFlower", 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_ParticleFlower_class; - p->proto = jsb_cocos2d_ParticleFlower_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleMeteor_class; -JSObject *jsb_cocos2d_ParticleMeteor_prototype; - -bool js_cocos2dx_ParticleMeteor_init(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::ParticleMeteor* cobj = (cocos2d::ParticleMeteor *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleMeteor_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleMeteor_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleMeteor_initWithTotalParticles(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::ParticleMeteor* cobj = (cocos2d::ParticleMeteor *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleMeteor_initWithTotalParticles : 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_ParticleMeteor_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleMeteor_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleMeteor_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleMeteor* ret = cocos2d::ParticleMeteor::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleMeteor*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleMeteor_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleMeteor_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleMeteor_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleMeteor* ret = cocos2d::ParticleMeteor::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleMeteor*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleMeteor_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleMeteor_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleMeteor* cobj = new (std::nothrow) cocos2d::ParticleMeteor(); - 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::ParticleMeteor"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleMeteor_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleMeteor)", obj); -} - -void js_register_cocos2dx_ParticleMeteor(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleMeteor_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleMeteor_class->name = "ParticleMeteor"; - jsb_cocos2d_ParticleMeteor_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleMeteor_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleMeteor_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleMeteor_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleMeteor_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleMeteor_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleMeteor_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleMeteor_class->finalize = js_cocos2d_ParticleMeteor_finalize; - jsb_cocos2d_ParticleMeteor_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("init", js_cocos2dx_ParticleMeteor_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleMeteor_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleMeteor_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleMeteor_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleMeteor_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleMeteor_class, - js_cocos2dx_ParticleMeteor_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, "ParticleMeteor", 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_ParticleMeteor_class; - p->proto = jsb_cocos2d_ParticleMeteor_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleSpiral_class; -JSObject *jsb_cocos2d_ParticleSpiral_prototype; - -bool js_cocos2dx_ParticleSpiral_init(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::ParticleSpiral* cobj = (cocos2d::ParticleSpiral *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSpiral_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSpiral_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSpiral_initWithTotalParticles(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::ParticleSpiral* cobj = (cocos2d::ParticleSpiral *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSpiral_initWithTotalParticles : 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_ParticleSpiral_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSpiral_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSpiral_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleSpiral* ret = cocos2d::ParticleSpiral::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSpiral*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleSpiral_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleSpiral_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSpiral_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleSpiral* ret = cocos2d::ParticleSpiral::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSpiral*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleSpiral_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleSpiral_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleSpiral* cobj = new (std::nothrow) cocos2d::ParticleSpiral(); - 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::ParticleSpiral"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleSpiral_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSpiral)", obj); -} - -void js_register_cocos2dx_ParticleSpiral(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleSpiral_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleSpiral_class->name = "ParticleSpiral"; - jsb_cocos2d_ParticleSpiral_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSpiral_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleSpiral_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSpiral_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleSpiral_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleSpiral_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleSpiral_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleSpiral_class->finalize = js_cocos2d_ParticleSpiral_finalize; - jsb_cocos2d_ParticleSpiral_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("init", js_cocos2dx_ParticleSpiral_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSpiral_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleSpiral_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSpiral_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleSpiral_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleSpiral_class, - js_cocos2dx_ParticleSpiral_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, "ParticleSpiral", 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_ParticleSpiral_class; - p->proto = jsb_cocos2d_ParticleSpiral_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleExplosion_class; -JSObject *jsb_cocos2d_ParticleExplosion_prototype; - -bool js_cocos2dx_ParticleExplosion_init(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::ParticleExplosion* cobj = (cocos2d::ParticleExplosion *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleExplosion_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleExplosion_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleExplosion_initWithTotalParticles(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::ParticleExplosion* cobj = (cocos2d::ParticleExplosion *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleExplosion_initWithTotalParticles : 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_ParticleExplosion_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleExplosion_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleExplosion_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleExplosion* ret = cocos2d::ParticleExplosion::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleExplosion*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleExplosion_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleExplosion_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleExplosion_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleExplosion* ret = cocos2d::ParticleExplosion::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleExplosion*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleExplosion_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleExplosion_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleExplosion* cobj = new (std::nothrow) cocos2d::ParticleExplosion(); - 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::ParticleExplosion"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleExplosion_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleExplosion)", obj); -} - -void js_register_cocos2dx_ParticleExplosion(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleExplosion_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleExplosion_class->name = "ParticleExplosion"; - jsb_cocos2d_ParticleExplosion_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleExplosion_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleExplosion_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleExplosion_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleExplosion_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleExplosion_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleExplosion_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleExplosion_class->finalize = js_cocos2d_ParticleExplosion_finalize; - jsb_cocos2d_ParticleExplosion_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("init", js_cocos2dx_ParticleExplosion_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleExplosion_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleExplosion_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleExplosion_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleExplosion_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleExplosion_class, - js_cocos2dx_ParticleExplosion_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, "ParticleExplosion", 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_ParticleExplosion_class; - p->proto = jsb_cocos2d_ParticleExplosion_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleSmoke_class; -JSObject *jsb_cocos2d_ParticleSmoke_prototype; - -bool js_cocos2dx_ParticleSmoke_init(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::ParticleSmoke* cobj = (cocos2d::ParticleSmoke *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSmoke_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSmoke_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSmoke_initWithTotalParticles(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::ParticleSmoke* cobj = (cocos2d::ParticleSmoke *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSmoke_initWithTotalParticles : 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_ParticleSmoke_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSmoke_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSmoke_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleSmoke* ret = cocos2d::ParticleSmoke::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSmoke*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleSmoke_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleSmoke_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSmoke_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleSmoke* ret = cocos2d::ParticleSmoke::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSmoke*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleSmoke_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleSmoke_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleSmoke* cobj = new (std::nothrow) cocos2d::ParticleSmoke(); - 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::ParticleSmoke"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleSmoke_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSmoke)", obj); -} - -void js_register_cocos2dx_ParticleSmoke(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleSmoke_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleSmoke_class->name = "ParticleSmoke"; - jsb_cocos2d_ParticleSmoke_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSmoke_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleSmoke_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSmoke_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleSmoke_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleSmoke_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleSmoke_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleSmoke_class->finalize = js_cocos2d_ParticleSmoke_finalize; - jsb_cocos2d_ParticleSmoke_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("init", js_cocos2dx_ParticleSmoke_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSmoke_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleSmoke_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSmoke_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleSmoke_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleSmoke_class, - js_cocos2dx_ParticleSmoke_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, "ParticleSmoke", 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_ParticleSmoke_class; - p->proto = jsb_cocos2d_ParticleSmoke_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleSnow_class; -JSObject *jsb_cocos2d_ParticleSnow_prototype; - -bool js_cocos2dx_ParticleSnow_init(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::ParticleSnow* cobj = (cocos2d::ParticleSnow *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSnow_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSnow_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleSnow_initWithTotalParticles(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::ParticleSnow* cobj = (cocos2d::ParticleSnow *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSnow_initWithTotalParticles : 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_ParticleSnow_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleSnow_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleSnow_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleSnow* ret = cocos2d::ParticleSnow::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSnow*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleSnow_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleSnow_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleSnow_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleSnow* ret = cocos2d::ParticleSnow::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleSnow*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleSnow_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleSnow_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleSnow* cobj = new (std::nothrow) cocos2d::ParticleSnow(); - 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::ParticleSnow"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleSnow_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleSnow)", obj); -} - -void js_register_cocos2dx_ParticleSnow(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleSnow_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleSnow_class->name = "ParticleSnow"; - jsb_cocos2d_ParticleSnow_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSnow_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleSnow_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleSnow_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleSnow_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleSnow_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleSnow_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleSnow_class->finalize = js_cocos2d_ParticleSnow_finalize; - jsb_cocos2d_ParticleSnow_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("init", js_cocos2dx_ParticleSnow_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleSnow_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleSnow_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleSnow_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleSnow_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleSnow_class, - js_cocos2dx_ParticleSnow_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, "ParticleSnow", 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_ParticleSnow_class; - p->proto = jsb_cocos2d_ParticleSnow_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParticleRain_class; -JSObject *jsb_cocos2d_ParticleRain_prototype; - -bool js_cocos2dx_ParticleRain_init(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::ParticleRain* cobj = (cocos2d::ParticleRain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleRain_init : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->init(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleRain_init : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_ParticleRain_initWithTotalParticles(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::ParticleRain* cobj = (cocos2d::ParticleRain *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleRain_initWithTotalParticles : 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_ParticleRain_initWithTotalParticles : Error processing arguments"); - bool ret = cobj->initWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParticleRain_initWithTotalParticles : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParticleRain_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParticleRain* ret = cocos2d::ParticleRain::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleRain*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleRain_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleRain_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParticleRain_createWithTotalParticles : Error processing arguments"); - cocos2d::ParticleRain* ret = cocos2d::ParticleRain::createWithTotalParticles(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParticleRain*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParticleRain_createWithTotalParticles : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParticleRain_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParticleRain* cobj = new (std::nothrow) cocos2d::ParticleRain(); - 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::ParticleRain"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -void js_cocos2d_ParticleRain_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParticleRain)", obj); -} - -void js_register_cocos2dx_ParticleRain(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParticleRain_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParticleRain_class->name = "ParticleRain"; - jsb_cocos2d_ParticleRain_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParticleRain_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParticleRain_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParticleRain_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParticleRain_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParticleRain_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParticleRain_class->convert = JS_ConvertStub; - jsb_cocos2d_ParticleRain_class->finalize = js_cocos2d_ParticleRain_finalize; - jsb_cocos2d_ParticleRain_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("init", js_cocos2dx_ParticleRain_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithTotalParticles", js_cocos2dx_ParticleRain_initWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParticleRain_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithTotalParticles", js_cocos2dx_ParticleRain_createWithTotalParticles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_ParticleRain_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_ParticleSystemQuad_prototype), - jsb_cocos2d_ParticleRain_class, - js_cocos2dx_ParticleRain_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, "ParticleRain", 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_ParticleRain_class; - p->proto = jsb_cocos2d_ParticleRain_prototype; - p->parentProto = jsb_cocos2d_ParticleSystemQuad_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - JSClass *jsb_cocos2d_GridBase_class; JSObject *jsb_cocos2d_GridBase_prototype; @@ -56900,588 +57761,6 @@ void js_register_cocos2dx_TiledGrid3D(JSContext *cx, JS::HandleObject global) { } } -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) -{ - 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"); - if (argc == 0) { - 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_getProjectionMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Camera_getViewProjectionMatrix(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_getViewProjectionMatrix : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Mat4& ret = cobj->getViewProjectionMatrix(); - jsval jsret = JSVAL_NULL; - jsret = matrix_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - 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) -{ - 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_getCameraFlag(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_getCameraFlag : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getCameraFlag(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Camera_getCameraFlag : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Camera_getType(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_getType : Invalid Native Object"); - if (argc == 0) { - int ret = (int)cobj->getType(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - 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_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_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_setCameraFlag(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_setCameraFlag : Invalid Native Object"); - if (argc == 1) { - cocos2d::CameraFlag arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setCameraFlag : Error processing arguments"); - cobj->setCameraFlag(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Camera_setCameraFlag : 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); - 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_initOrthographic : 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_initOrthographic : Error processing arguments"); - bool ret = cobj->initOrthographic(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_initOrthographic : wrong number of arguments: %d, was expecting %d", argc, 4); - 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) -{ - 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"); - if (argc == 0) { - int ret = cobj->getDepth(); - jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Camera_getDepth : wrong number of arguments: %d, was expecting %d", argc, 0); - 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_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::Camera* ret = cocos2d::Camera::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Camera_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Camera_createPerspective(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = 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_Camera_createPerspective : Error processing arguments"); - cocos2d::Camera* ret = cocos2d::Camera::createPerspective(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Camera_createPerspective : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Camera_createOrthographic(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = 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_Camera_createOrthographic : Error processing arguments"); - cocos2d::Camera* ret = cocos2d::Camera::createOrthographic(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Camera_createOrthographic : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Camera_getDefaultCamera(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::Camera* ret = cocos2d::Camera::getDefaultCamera(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Camera_getDefaultCamera : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Camera_getVisitingCamera(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - const cocos2d::Camera* ret = cocos2d::Camera::getVisitingCamera(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Camera*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Camera_getVisitingCamera : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_Camera_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::Camera* cobj = new (std::nothrow) cocos2d::Camera(); - 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::Camera"); - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - return true; -} - - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_Camera_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (Camera)", obj); -} - -void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_Camera_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_Camera_class->name = "Camera"; - jsb_cocos2d_Camera_class->addProperty = JS_PropertyStub; - jsb_cocos2d_Camera_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_Camera_class->getProperty = JS_PropertyStub; - jsb_cocos2d_Camera_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_Camera_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_Camera_class->resolve = JS_ResolveStub; - jsb_cocos2d_Camera_class->convert = JS_ConvertStub; - jsb_cocos2d_Camera_class->finalize = js_cocos2d_Camera_finalize; - jsb_cocos2d_Camera_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("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("getViewProjectionMatrix", js_cocos2dx_Camera_getViewProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getViewMatrix", js_cocos2dx_Camera_getViewMatrix, 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("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("initOrthographic", js_cocos2dx_Camera_initOrthographic, 4, 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_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_Camera_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createPerspective", js_cocos2dx_Camera_createPerspective, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createOrthographic", js_cocos2dx_Camera_createOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDefaultCamera", js_cocos2dx_Camera_getDefaultCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVisitingCamera", js_cocos2dx_Camera_getVisitingCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_Camera_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_Camera_class, - js_cocos2dx_Camera_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, "Camera", 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_Camera_class; - p->proto = jsb_cocos2d_Camera_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - JSClass *jsb_cocos2d_BaseLight_class; JSObject *jsb_cocos2d_BaseLight_prototype; @@ -65794,50 +66073,124 @@ void js_register_cocos2dx_SimpleAudioEngine(JSContext *cx, JS::HandleObject glob } } -JSClass *jsb_cocos2d_AsyncTaskPool_class; -JSObject *jsb_cocos2d_AsyncTaskPool_prototype; +JSClass *jsb_cocos2d_SpritePolygonCache_class; +JSObject *jsb_cocos2d_SpritePolygonCache_prototype; -bool js_cocos2dx_AsyncTaskPool_stopTasks(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist(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::AsyncTaskPool* cobj = (cocos2d::AsyncTaskPool *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_AsyncTaskPool_stopTasks : Invalid Native Object"); + cocos2d::SpritePolygonCache* cobj = (cocos2d::SpritePolygonCache *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist : Invalid Native Object"); + if (argc == 2) { + std::string arg0; + cocos2d::Rect arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist : Error processing arguments"); + bool ret = cobj->isSpritePolygonCachExist(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache(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::SpritePolygonCache* cobj = (cocos2d::SpritePolygonCache *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache : Invalid Native Object"); + if (argc == 0) { + cobj->removeAllSpritePolygonCache(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_SpritePolygonCache_removeSpritePolygonCache(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::SpritePolygonCache* cobj = (cocos2d::SpritePolygonCache *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_SpritePolygonCache_removeSpritePolygonCache : Invalid Native Object"); if (argc == 1) { - cocos2d::AsyncTaskPool::TaskType arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_AsyncTaskPool_stopTasks : Error processing arguments"); - cobj->stopTasks(arg0); + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_SpritePolygonCache_removeSpritePolygonCache : Error processing arguments"); + cobj->removeSpritePolygonCache(arg0); + args.rval().setUndefined(); + return true; + } + if (argc == 2) { + std::string arg0; + const cocos2d::Rect* arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + 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 = (const cocos2d::Rect*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_SpritePolygonCache_removeSpritePolygonCache : Error processing arguments"); + cobj->removeSpritePolygonCache(arg0, arg1); args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_AsyncTaskPool_stopTasks : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_SpritePolygonCache_removeSpritePolygonCache : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_AsyncTaskPool_destoryInstance(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_SpritePolygonCache_destroyInstance(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); if (argc == 0) { - cocos2d::AsyncTaskPool::destoryInstance(); + cocos2d::SpritePolygonCache::destroyInstance(); args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_AsyncTaskPool_destoryInstance : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_SpritePolygonCache_destroyInstance : wrong number of arguments"); return false; } -bool js_cocos2dx_AsyncTaskPool_getInstance(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_SpritePolygonCache_printInfo(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + cocos2d::_SpritePolygonInfo arg0; + #pragma warning NO CONVERSION TO NATIVE FOR _SpritePolygonInfo + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_SpritePolygonCache_printInfo : Error processing arguments"); + cocos2d::SpritePolygonCache::printInfo(arg0); + args.rval().setUndefined(); + return true; + } + JS_ReportError(cx, "js_cocos2dx_SpritePolygonCache_printInfo : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_SpritePolygonCache_getInstance(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); if (argc == 0) { - cocos2d::AsyncTaskPool* ret = cocos2d::AsyncTaskPool::getInstance(); + cocos2d::SpritePolygonCache* ret = cocos2d::SpritePolygonCache::getInstance(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::AsyncTaskPool*)ret); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::SpritePolygonCache*)ret); jsret = OBJECT_TO_JSVAL(jsProxy->obj); } else { jsret = JSVAL_NULL; @@ -65846,28 +66199,28 @@ bool js_cocos2dx_AsyncTaskPool_getInstance(JSContext *cx, uint32_t argc, jsval * args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_AsyncTaskPool_getInstance : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_SpritePolygonCache_getInstance : wrong number of arguments"); return false; } -void js_cocos2d_AsyncTaskPool_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (AsyncTaskPool)", obj); +void js_cocos2d_SpritePolygonCache_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (SpritePolygonCache)", obj); } -void js_register_cocos2dx_AsyncTaskPool(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_AsyncTaskPool_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_AsyncTaskPool_class->name = "AsyncTaskPool"; - jsb_cocos2d_AsyncTaskPool_class->addProperty = JS_PropertyStub; - jsb_cocos2d_AsyncTaskPool_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_AsyncTaskPool_class->getProperty = JS_PropertyStub; - jsb_cocos2d_AsyncTaskPool_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_AsyncTaskPool_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_AsyncTaskPool_class->resolve = JS_ResolveStub; - jsb_cocos2d_AsyncTaskPool_class->convert = JS_ConvertStub; - jsb_cocos2d_AsyncTaskPool_class->finalize = js_cocos2d_AsyncTaskPool_finalize; - jsb_cocos2d_AsyncTaskPool_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_SpritePolygonCache(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_SpritePolygonCache_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_SpritePolygonCache_class->name = "SpritePolygonCache"; + jsb_cocos2d_SpritePolygonCache_class->addProperty = JS_PropertyStub; + jsb_cocos2d_SpritePolygonCache_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_SpritePolygonCache_class->getProperty = JS_PropertyStub; + jsb_cocos2d_SpritePolygonCache_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_SpritePolygonCache_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_SpritePolygonCache_class->resolve = JS_ResolveStub; + jsb_cocos2d_SpritePolygonCache_class->convert = JS_ConvertStub; + jsb_cocos2d_SpritePolygonCache_class->finalize = js_cocos2d_SpritePolygonCache_finalize; + jsb_cocos2d_SpritePolygonCache_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -65875,20 +66228,23 @@ void js_register_cocos2dx_AsyncTaskPool(JSContext *cx, JS::HandleObject global) }; static JSFunctionSpec funcs[] = { - JS_FN("stopTasks", js_cocos2dx_AsyncTaskPool_stopTasks, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isSpritePolygonCachExist", js_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllSpritePolygonCache", js_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeSpritePolygonCache", js_cocos2dx_SpritePolygonCache_removeSpritePolygonCache, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("destoryInstance", js_cocos2dx_AsyncTaskPool_destoryInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getInstance", js_cocos2dx_AsyncTaskPool_getInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("destroyInstance", js_cocos2dx_SpritePolygonCache_destroyInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("printInfo", js_cocos2dx_SpritePolygonCache_printInfo, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getInstance", js_cocos2dx_SpritePolygonCache_getInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_AsyncTaskPool_prototype = JS_InitClass( + jsb_cocos2d_SpritePolygonCache_prototype = JS_InitClass( cx, global, JS::NullPtr(), // parent proto - jsb_cocos2d_AsyncTaskPool_class, + jsb_cocos2d_SpritePolygonCache_class, empty_constructor, 0, properties, funcs, @@ -65897,17 +66253,17 @@ void js_register_cocos2dx_AsyncTaskPool(JSContext *cx, JS::HandleObject global) // make the class enumerable in the registered namespace // bool found; //FIXME: Removed in Firefox v27 -// JS_SetPropertyAttributes(cx, global, "AsyncTaskPool", JSPROP_ENUMERATE | JSPROP_READONLY, &found); +// JS_SetPropertyAttributes(cx, global, "SpritePolygonCache", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + 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_AsyncTaskPool_class; - p->proto = jsb_cocos2d_AsyncTaskPool_prototype; + p->jsclass = jsb_cocos2d_SpritePolygonCache_class; + p->proto = jsb_cocos2d_SpritePolygonCache_prototype; p->parentProto = NULL; _js_global_type_map.insert(std::make_pair(typeName, p)); } @@ -65948,15 +66304,17 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_JumpBy(cx, ns); js_register_cocos2dx_EventListener(cx, ns); js_register_cocos2dx_EventListenerKeyboard(cx, ns); - js_register_cocos2dx_EventListenerMouse(cx, ns); + js_register_cocos2dx_ActionEase(cx, ns); + js_register_cocos2dx_EaseBounce(cx, ns); + js_register_cocos2dx_EaseBounceIn(cx, ns); js_register_cocos2dx_TransitionRotoZoom(cx, ns); js_register_cocos2dx_Director(cx, ns); js_register_cocos2dx_Scheduler(cx, ns); - js_register_cocos2dx_ActionEase(cx, ns); js_register_cocos2dx_EaseElastic(cx, ns); js_register_cocos2dx_EaseElasticOut(cx, ns); js_register_cocos2dx_EaseQuadraticActionInOut(cx, ns); js_register_cocos2dx_EaseBackOut(cx, ns); + js_register_cocos2dx_Texture2D(cx, ns); js_register_cocos2dx_TransitionSceneOriented(cx, ns); js_register_cocos2dx_TransitionFlipX(cx, ns); js_register_cocos2dx_GridAction(cx, ns); @@ -65986,25 +66344,26 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_EaseSineInOut(cx, ns); js_register_cocos2dx_TransitionFlipAngular(cx, ns); js_register_cocos2dx_EaseElasticInOut(cx, ns); - js_register_cocos2dx_EaseBounce(cx, ns); js_register_cocos2dx_Show(cx, ns); js_register_cocos2dx_FadeOut(cx, ns); js_register_cocos2dx_CallFunc(cx, ns); js_register_cocos2dx_Event(cx, ns); js_register_cocos2dx_EventMouse(cx, ns); js_register_cocos2dx_GLView(cx, ns); - js_register_cocos2dx_EaseRateAction(cx, ns); - js_register_cocos2dx_EaseOut(cx, ns); + js_register_cocos2dx_EaseBezierAction(cx, ns); js_register_cocos2dx_ParticleFireworks(cx, ns); js_register_cocos2dx_MenuItem(cx, ns); js_register_cocos2dx_MenuItemSprite(cx, ns); js_register_cocos2dx_MenuItemImage(cx, ns); js_register_cocos2dx_ParticleFire(cx, ns); js_register_cocos2dx_ProgressTo(cx, ns); + js_register_cocos2dx_ParticleSmoke(cx, ns); js_register_cocos2dx_TransitionZoomFlipAngular(cx, ns); + js_register_cocos2dx_EaseRateAction(cx, ns); js_register_cocos2dx_EaseIn(cx, ns); js_register_cocos2dx_EaseExponentialInOut(cx, ns); - js_register_cocos2dx_EaseBackInOut(cx, ns); + js_register_cocos2dx_CardinalSplineTo(cx, ns); + js_register_cocos2dx_CatmullRomTo(cx, ns); js_register_cocos2dx_Waves3D(cx, ns); js_register_cocos2dx_EaseExponentialOut(cx, ns); js_register_cocos2dx_SpriteBatchNode(cx, ns); @@ -66017,13 +66376,13 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_ParticleSnow(cx, ns); js_register_cocos2dx_EaseElasticIn(cx, ns); js_register_cocos2dx_EaseCircleActionInOut(cx, ns); + js_register_cocos2dx_TransitionFadeTR(cx, ns); js_register_cocos2dx_EaseQuarticActionOut(cx, ns); js_register_cocos2dx_EventAcceleration(cx, ns); js_register_cocos2dx_EaseCubicActionIn(cx, ns); js_register_cocos2dx_TextureCache(cx, ns); js_register_cocos2dx_Configuration(cx, ns); js_register_cocos2dx_ActionTween(cx, ns); - js_register_cocos2dx_TransitionFadeTR(cx, ns); js_register_cocos2dx_TransitionFadeDown(cx, ns); js_register_cocos2dx_ParticleSun(cx, ns); js_register_cocos2dx_TransitionProgressHorizontal(cx, ns); @@ -66032,7 +66391,7 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_FlipX(cx, ns); js_register_cocos2dx_FlipY(cx, ns); js_register_cocos2dx_TransitionSplitCols(cx, ns); - js_register_cocos2dx_Repeat(cx, ns); + js_register_cocos2dx_RepeatForever(cx, ns); js_register_cocos2dx_Place(cx, ns); js_register_cocos2dx_EventListenerAcceleration(cx, ns); js_register_cocos2dx_TiledGrid3D(cx, ns); @@ -66042,9 +66401,9 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_TransitionShrinkGrow(cx, ns); js_register_cocos2dx_LabelTTF(cx, ns); js_register_cocos2dx_ClippingNode(cx, ns); + js_register_cocos2dx_ActionFloat(cx, ns); js_register_cocos2dx_ParticleFlower(cx, ns); js_register_cocos2dx_EaseCircleActionIn(cx, ns); - js_register_cocos2dx_ParticleSmoke(cx, ns); js_register_cocos2dx_Image(cx, ns); js_register_cocos2dx_LayerMultiplex(cx, ns); js_register_cocos2dx_Blink(cx, ns); @@ -66053,11 +66412,12 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_TransitionJumpZoom(cx, ns); js_register_cocos2dx_Touch(cx, ns); js_register_cocos2dx_SAXParser(cx, ns); - js_register_cocos2dx_AnimationFrame(cx, ns); + js_register_cocos2dx_CardinalSplineBy(cx, ns); + js_register_cocos2dx_CatmullRomBy(cx, ns); js_register_cocos2dx_NodeGrid(cx, ns); js_register_cocos2dx_TMXLayerInfo(cx, ns); js_register_cocos2dx_EaseSineIn(cx, ns); - js_register_cocos2dx_EaseBounceIn(cx, ns); + js_register_cocos2dx_EventListenerMouse(cx, ns); js_register_cocos2dx_Camera(cx, ns); js_register_cocos2dx_GLProgram(cx, ns); js_register_cocos2dx_ParticleGalaxy(cx, ns); @@ -66069,13 +66429,11 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_LayerGradient(cx, ns); js_register_cocos2dx_EventListenerTouchAllAtOnce(cx, ns); js_register_cocos2dx_ToggleVisibility(cx, ns); - js_register_cocos2dx_RepeatForever(cx, ns); - js_register_cocos2dx_CardinalSplineTo(cx, ns); - js_register_cocos2dx_CardinalSplineBy(cx, ns); + js_register_cocos2dx_Repeat(cx, ns); js_register_cocos2dx_TransitionFlipY(cx, ns); js_register_cocos2dx_TurnOffTiles(cx, ns); js_register_cocos2dx_TintTo(cx, ns); - js_register_cocos2dx_CatmullRomTo(cx, ns); + js_register_cocos2dx_EaseBackInOut(cx, ns); js_register_cocos2dx_TransitionFadeBL(cx, ns); js_register_cocos2dx_TargetedAction(cx, ns); js_register_cocos2dx_DrawNode(cx, ns); @@ -66088,10 +66446,10 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_TransitionPageTurn(cx, ns); js_register_cocos2dx_BezierBy(cx, ns); js_register_cocos2dx_BezierTo(cx, ns); - js_register_cocos2dx_Menu(cx, ns); - js_register_cocos2dx_Texture2D(cx, ns); - js_register_cocos2dx_ActionManager(cx, ns); - js_register_cocos2dx_TransitionFade(cx, ns); + js_register_cocos2dx_ParticleMeteor(cx, ns); + js_register_cocos2dx_SpriteFrame(cx, ns); + js_register_cocos2dx_Liquid(cx, ns); + js_register_cocos2dx_ParticleBatchNode(cx, ns); js_register_cocos2dx_TransitionZoomFlipX(cx, ns); js_register_cocos2dx_EventFocus(cx, ns); js_register_cocos2dx_EaseQuinticActionInOut(cx, ns); @@ -66108,6 +66466,7 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_TransitionSlideInL(cx, ns); js_register_cocos2dx_TransitionSlideInT(cx, ns); js_register_cocos2dx_Grid3D(cx, ns); + js_register_cocos2dx_SpritePolygonCache(cx, ns); js_register_cocos2dx_EaseCircleActionOut(cx, ns); js_register_cocos2dx_TransitionProgressInOut(cx, ns); js_register_cocos2dx_EaseCubicActionInOut(cx, ns); @@ -66118,8 +66477,8 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_ShuffleTiles(cx, ns); js_register_cocos2dx_ReverseTime(cx, ns); js_register_cocos2dx_ProgressTimer(cx, ns); - js_register_cocos2dx_ParticleMeteor(cx, ns); js_register_cocos2dx_EaseQuarticActionIn(cx, ns); + js_register_cocos2dx_Menu(cx, ns); js_register_cocos2dx_EaseInOut(cx, ns); js_register_cocos2dx_TransitionZoomFlipY(cx, ns); js_register_cocos2dx_ScaleBy(cx, ns); @@ -66128,21 +66487,20 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_TMXMapInfo(cx, ns); js_register_cocos2dx_EaseExponentialIn(cx, ns); js_register_cocos2dx_ReuseGrid(cx, ns); - js_register_cocos2dx_SpriteFrame(cx, ns); + js_register_cocos2dx_EaseQuinticActionOut(cx, ns); js_register_cocos2dx_EventDispatcher(cx, ns); js_register_cocos2dx_MenuItemAtlasFont(cx, ns); - js_register_cocos2dx_Liquid(cx, ns); + js_register_cocos2dx_ActionManager(cx, ns); js_register_cocos2dx_OrbitCamera(cx, ns); js_register_cocos2dx_ParallaxNode(cx, ns); - js_register_cocos2dx_ParticleBatchNode(cx, ns); + js_register_cocos2dx_TransitionFade(cx, ns); js_register_cocos2dx_Component(cx, ns); js_register_cocos2dx_EaseCubicActionOut(cx, ns); js_register_cocos2dx_EventListenerTouchOneByOne(cx, ns); js_register_cocos2dx_TextFieldTTF(cx, ns); js_register_cocos2dx_ParticleRain(cx, ns); js_register_cocos2dx_Waves(cx, ns); - js_register_cocos2dx_EaseQuinticActionOut(cx, ns); - js_register_cocos2dx_EaseBezierAction(cx, ns); + js_register_cocos2dx_EaseOut(cx, ns); js_register_cocos2dx_MenuItemFont(cx, ns); js_register_cocos2dx_TransitionFadeUp(cx, ns); js_register_cocos2dx_EaseSineOut(cx, ns); @@ -66157,7 +66515,7 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_Sprite(cx, ns); js_register_cocos2dx_CallFuncN(cx, ns); js_register_cocos2dx_TransitionProgressOutIn(cx, ns); - js_register_cocos2dx_CatmullRomBy(cx, ns); + js_register_cocos2dx_AnimationFrame(cx, ns); js_register_cocos2dx_Sequence(cx, ns); js_register_cocos2dx_Shaky3D(cx, ns); js_register_cocos2dx_TransitionProgressRadialCW(cx, ns); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp index 2bfb031764..a82ee08eaa 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp @@ -5,65 +5,6 @@ #include "jsfriendapi.h" -extern JSClass *jsb_cocos2d_Action_class; -extern JSObject *jsb_cocos2d_Action_prototype; - -bool js_cocos2dx_Action_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_Action_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_Action(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Action_startWithTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_setOriginalTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_clone(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_getOriginalTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_stop(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_update(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_getTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_step(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_setTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_getTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_setTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_isDone(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Action_reverse(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_FiniteTimeAction_class; -extern JSObject *jsb_cocos2d_FiniteTimeAction_prototype; - -bool js_cocos2dx_FiniteTimeAction_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_FiniteTimeAction_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_FiniteTimeAction(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_FiniteTimeAction_setDuration(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_FiniteTimeAction_getDuration(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Speed_class; -extern JSObject *jsb_cocos2d_Speed_prototype; - -bool js_cocos2dx_Speed_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_Speed_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_Speed(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Speed_setInnerAction(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Speed_getSpeed(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Speed_setSpeed(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Speed_initWithAction(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Speed_getInnerAction(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Speed_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Speed_Speed(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Follow_class; -extern JSObject *jsb_cocos2d_Follow_prototype; - -bool js_cocos2dx_Follow_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_Follow_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_Follow(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Follow_setBoundarySet(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Follow_initWithTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Follow_isBoundarySet(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Follow_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Follow_Follow(JSContext *cx, uint32_t argc, jsval *vp); - extern JSClass *jsb_cocos2d_Texture2D_class; extern JSObject *jsb_cocos2d_Texture2D_prototype; @@ -189,13 +130,11 @@ bool js_cocos2dx_Node_setOnEnterCallback(JSContext *cx, uint32_t argc, jsval *vp bool js_cocos2dx_Node_setNormalizedPosition(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setonExitTransitionDidStartCallback(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_convertTouchToNodeSpace(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_getMaterial(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getRotationSkewX(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getNodeToWorldTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_isCascadeOpacityEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_setMaterial(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setParent(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getRotation3D(JSContext *cx, uint32_t argc, jsval *vp); @@ -303,6 +242,218 @@ void js_register_cocos2dx___NodeRGBA(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx___NodeRGBA___NodeRGBA(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_Scene_class; +extern JSObject *jsb_cocos2d_Scene_prototype; + +bool js_cocos2dx_Scene_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_Scene_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_Scene(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_Scene_setCameraOrderDirty(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scene_render(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scene_onProjectionChanged(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scene_initWithSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scene_getDefaultCamera(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scene_createWithSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scene_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scene_Scene(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_GLView_class; +extern JSObject *jsb_cocos2d_GLView_prototype; + +bool js_cocos2dx_GLView_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_GLView_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_GLView(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_GLView_setFrameSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getViewPortRect(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_setContentScaleFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getContentScaleFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_setIMEKeyboardState(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_setScissorInPoints(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getViewName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_isOpenGLReady(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_setCursorVisible(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getScaleY(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getScaleX(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getVisibleOrigin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getFrameSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_setFrameZoomFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getFrameZoomFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getDesignResolutionSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_windowShouldClose(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_setDesignResolutionSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getResolutionPolicy(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_isRetinaDisplay(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_setViewPortInPoints(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getScissorRect(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getRetinaFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_setViewName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getVisibleRect(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getVisibleSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_isScissorEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_pollEvents(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_setGLContextAttrs(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_GLView_getGLContextAttrs(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Director_class; +extern JSObject *jsb_cocos2d_Director_prototype; + +bool js_cocos2dx_Director_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_Director_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_Director(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_Director_pause(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setEventDispatcher(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setContentScaleFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getContentScaleFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getWinSizeInPixels(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getDeltaTime(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setGLDefaultValues(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setActionManager(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setAlphaBlending(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_popToRootScene(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_loadMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getNotificationNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getWinSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_end(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getTextureCache(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_isSendCleanupToScene(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getVisibleOrigin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_mainLoop(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setDepthTest(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getFrameRate(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getSecondsPerFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_resetMatrixStack(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_convertToUI(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_pushMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setDefaultValues(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setScheduler(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_startAnimation(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getOpenGLView(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getRunningScene(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setViewport(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_stopAnimation(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_popToSceneStackLevel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_resume(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_isNextDeltaTimeZero(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setClearColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setOpenGLView(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_convertToGL(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_purgeCachedData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getTotalFrames(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_runWithScene(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setNotificationNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_drawScene(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_restart(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_popScene(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_loadIdentityMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_isDisplayStats(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setProjection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_multiplyMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getZEye(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setNextDeltaTimeZero(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_popMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getVisibleSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getScheduler(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_pushScene(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getAnimationInterval(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_isPaused(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setDisplayStats(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getEventDispatcher(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_replaceScene(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_setAnimationInterval(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getActionManager(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Director_getInstance(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Scheduler_class; +extern JSObject *jsb_cocos2d_Scheduler_prototype; + +bool js_cocos2dx_Scheduler_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_Scheduler_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_Scheduler(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_Scheduler_setTimeScale(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scheduler_unscheduleAllWithMinPriority(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scheduler_update(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scheduler_unscheduleScriptEntry(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scheduler_performFunctionInCocosThread(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scheduler_unscheduleAll(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scheduler_getTimeScale(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Scheduler_Scheduler(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_AsyncTaskPool_class; +extern JSObject *jsb_cocos2d_AsyncTaskPool_prototype; + +bool js_cocos2dx_AsyncTaskPool_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_AsyncTaskPool_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_AsyncTaskPool(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_AsyncTaskPool_stopTasks(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_AsyncTaskPool_destoryInstance(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_AsyncTaskPool_getInstance(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Action_class; +extern JSObject *jsb_cocos2d_Action_prototype; + +bool js_cocos2dx_Action_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_Action_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_Action(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_Action_startWithTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_setOriginalTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_clone(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_getOriginalTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_stop(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_update(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_getTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_step(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_setTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_getTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_setTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_isDone(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Action_reverse(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_FiniteTimeAction_class; +extern JSObject *jsb_cocos2d_FiniteTimeAction_prototype; + +bool js_cocos2dx_FiniteTimeAction_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_FiniteTimeAction_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_FiniteTimeAction(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_FiniteTimeAction_setDuration(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_FiniteTimeAction_getDuration(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Speed_class; +extern JSObject *jsb_cocos2d_Speed_prototype; + +bool js_cocos2dx_Speed_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_Speed_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_Speed(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_Speed_setInnerAction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Speed_getSpeed(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Speed_setSpeed(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Speed_initWithAction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Speed_getInnerAction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Speed_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Speed_Speed(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Follow_class; +extern JSObject *jsb_cocos2d_Follow_prototype; + +bool js_cocos2dx_Follow_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_Follow_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_Follow(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_Follow_setBoundarySet(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Follow_initWithTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Follow_isBoundarySet(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Follow_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Follow_Follow(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_SpriteFrame_class; extern JSObject *jsb_cocos2d_SpriteFrame_prototype; @@ -677,6 +828,17 @@ bool js_cocos2dx_TargetedAction_setForcedTarget(JSContext *cx, uint32_t argc, js bool js_cocos2dx_TargetedAction_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TargetedAction_TargetedAction(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_ActionFloat_class; +extern JSObject *jsb_cocos2d_ActionFloat_prototype; + +bool js_cocos2dx_ActionFloat_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ActionFloat_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ActionFloat(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ActionFloat_initWithDuration(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionFloat_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionFloat_ActionFloat(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_Configuration_class; extern JSObject *jsb_cocos2d_Configuration_prototype; @@ -709,148 +871,6 @@ bool js_cocos2dx_Configuration_gatherGPUInfo(JSContext *cx, uint32_t argc, jsval bool js_cocos2dx_Configuration_destroyInstance(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Configuration_getInstance(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_Scene_class; -extern JSObject *jsb_cocos2d_Scene_prototype; - -bool js_cocos2dx_Scene_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_Scene_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_Scene(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Scene_setCameraOrderDirty(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scene_render(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scene_onProjectionChanged(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scene_initWithSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scene_getDefaultCamera(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scene_createWithSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scene_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scene_Scene(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_GLView_class; -extern JSObject *jsb_cocos2d_GLView_prototype; - -bool js_cocos2dx_GLView_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_GLView_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_GLView(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_GLView_setFrameSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getViewPortRect(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_setContentScaleFactor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getContentScaleFactor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_setIMEKeyboardState(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_setScissorInPoints(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getViewName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_isOpenGLReady(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_setCursorVisible(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getScaleY(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getScaleX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getVisibleOrigin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getFrameSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_setFrameZoomFactor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getFrameZoomFactor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getDesignResolutionSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_windowShouldClose(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_setDesignResolutionSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getResolutionPolicy(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_isRetinaDisplay(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_setViewPortInPoints(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getScissorRect(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getRetinaFactor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_setViewName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getVisibleRect(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getVisibleSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_isScissorEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_pollEvents(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_setGLContextAttrs(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_GLView_getGLContextAttrs(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Director_class; -extern JSObject *jsb_cocos2d_Director_prototype; - -bool js_cocos2dx_Director_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_Director_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_Director(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Director_pause(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setEventDispatcher(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setContentScaleFactor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getContentScaleFactor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getWinSizeInPixels(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getDeltaTime(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setGLDefaultValues(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setActionManager(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setAlphaBlending(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_popToRootScene(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_loadMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getNotificationNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getWinSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_end(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getTextureCache(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_isSendCleanupToScene(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getVisibleOrigin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_mainLoop(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setDepthTest(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getFrameRate(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getSecondsPerFrame(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_resetMatrixStack(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_convertToUI(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_pushMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setDefaultValues(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setScheduler(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_startAnimation(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getOpenGLView(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getRunningScene(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setViewport(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_stopAnimation(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_popToSceneStackLevel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_resume(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_isNextDeltaTimeZero(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setClearColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setOpenGLView(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_convertToGL(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_purgeCachedData(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getTotalFrames(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_runWithScene(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setNotificationNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_drawScene(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_restart(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_popScene(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_loadIdentityMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_isDisplayStats(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setProjection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_multiplyMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getZEye(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setNextDeltaTimeZero(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_popMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getVisibleSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getScheduler(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_pushScene(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getAnimationInterval(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_isPaused(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setDisplayStats(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getEventDispatcher(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_replaceScene(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_setAnimationInterval(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getActionManager(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Director_getInstance(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Scheduler_class; -extern JSObject *jsb_cocos2d_Scheduler_prototype; - -bool js_cocos2dx_Scheduler_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_Scheduler_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_Scheduler(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Scheduler_setTimeScale(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scheduler_unscheduleAllWithMinPriority(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scheduler_update(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scheduler_unscheduleScriptEntry(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scheduler_performFunctionInCocosThread(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scheduler_unscheduleAll(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scheduler_getTimeScale(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Scheduler_Scheduler(JSContext *cx, uint32_t argc, jsval *vp); - extern JSClass *jsb_cocos2d_FileUtils_class; extern JSObject *jsb_cocos2d_FileUtils_prototype; @@ -890,6 +910,25 @@ bool js_cocos2dx_FileUtils_getWritablePath(JSContext *cx, uint32_t argc, jsval * bool js_cocos2dx_FileUtils_setDelegate(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_FileUtils_getInstance(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_EventAcceleration_class; +extern JSObject *jsb_cocos2d_EventAcceleration_prototype; + +bool js_cocos2dx_EventAcceleration_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_EventAcceleration_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_EventAcceleration(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_EventAcceleration_EventAcceleration(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_EventCustom_class; +extern JSObject *jsb_cocos2d_EventCustom_prototype; + +bool js_cocos2dx_EventCustom_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_EventCustom_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_EventCustom(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_EventCustom_getEventName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventCustom_EventCustom(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_EventListener_class; extern JSObject *jsb_cocos2d_EventListener_prototype; @@ -924,27 +963,45 @@ bool js_cocos2dx_EventDispatcher_removeEventListener(JSContext *cx, uint32_t arg bool js_cocos2dx_EventDispatcher_isEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_EventDispatcher_EventDispatcher(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_EventListenerTouchOneByOne_class; -extern JSObject *jsb_cocos2d_EventListenerTouchOneByOne_prototype; +extern JSClass *jsb_cocos2d_EventFocus_class; +extern JSObject *jsb_cocos2d_EventFocus_prototype; -bool js_cocos2dx_EventListenerTouchOneByOne_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_EventListenerTouchOneByOne_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_EventListenerTouchOneByOne(JSContext *cx, JS::HandleObject global); +bool js_cocos2dx_EventFocus_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_EventFocus_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_EventFocus(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_EventListenerTouchOneByOne_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_EventListenerTouchOneByOne_EventListenerTouchOneByOne(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventFocus_EventFocus(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_EventListenerTouchAllAtOnce_class; -extern JSObject *jsb_cocos2d_EventListenerTouchAllAtOnce_prototype; +extern JSClass *jsb_cocos2d_EventListenerAcceleration_class; +extern JSObject *jsb_cocos2d_EventListenerAcceleration_prototype; -bool js_cocos2dx_EventListenerTouchAllAtOnce_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_EventListenerTouchAllAtOnce_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_EventListenerTouchAllAtOnce(JSContext *cx, JS::HandleObject global); +bool js_cocos2dx_EventListenerAcceleration_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_EventListenerAcceleration_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_EventListenerAcceleration(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_EventListenerTouchAllAtOnce_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_EventListenerTouchAllAtOnce_EventListenerTouchAllAtOnce(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerAcceleration_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerAcceleration_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerAcceleration_EventListenerAcceleration(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_EventListenerCustom_class; +extern JSObject *jsb_cocos2d_EventListenerCustom_prototype; + +bool js_cocos2dx_EventListenerCustom_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_EventListenerCustom_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_EventListenerCustom(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_EventListenerCustom_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerCustom_EventListenerCustom(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_EventListenerFocus_class; +extern JSObject *jsb_cocos2d_EventListenerFocus_prototype; + +bool js_cocos2dx_EventListenerFocus_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_EventListenerFocus_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_EventListenerFocus(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_EventListenerFocus_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerFocus_EventListenerFocus(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_EventListenerKeyboard_class; extern JSObject *jsb_cocos2d_EventListenerKeyboard_prototype; @@ -990,64 +1047,27 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_EventListenerMouse_init(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_EventListenerMouse_EventListenerMouse(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_EventAcceleration_class; -extern JSObject *jsb_cocos2d_EventAcceleration_prototype; +extern JSClass *jsb_cocos2d_EventListenerTouchOneByOne_class; +extern JSObject *jsb_cocos2d_EventListenerTouchOneByOne_prototype; -bool js_cocos2dx_EventAcceleration_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_EventAcceleration_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_EventAcceleration(JSContext *cx, JS::HandleObject global); +bool js_cocos2dx_EventListenerTouchOneByOne_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_EventListenerTouchOneByOne_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_EventListenerTouchOneByOne(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_EventAcceleration_EventAcceleration(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerTouchOneByOne_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerTouchOneByOne_EventListenerTouchOneByOne(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_EventListenerAcceleration_class; -extern JSObject *jsb_cocos2d_EventListenerAcceleration_prototype; +extern JSClass *jsb_cocos2d_EventListenerTouchAllAtOnce_class; +extern JSObject *jsb_cocos2d_EventListenerTouchAllAtOnce_prototype; -bool js_cocos2dx_EventListenerAcceleration_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_EventListenerAcceleration_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_EventListenerAcceleration(JSContext *cx, JS::HandleObject global); +bool js_cocos2dx_EventListenerTouchAllAtOnce_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_EventListenerTouchAllAtOnce_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_EventListenerTouchAllAtOnce(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_EventListenerAcceleration_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_EventListenerAcceleration_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_EventListenerAcceleration_EventListenerAcceleration(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_EventCustom_class; -extern JSObject *jsb_cocos2d_EventCustom_prototype; - -bool js_cocos2dx_EventCustom_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_EventCustom_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_EventCustom(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_EventCustom_getEventName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_EventCustom_EventCustom(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_EventListenerCustom_class; -extern JSObject *jsb_cocos2d_EventListenerCustom_prototype; - -bool js_cocos2dx_EventListenerCustom_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_EventListenerCustom_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_EventListenerCustom(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_EventListenerCustom_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_EventListenerCustom_EventListenerCustom(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_EventFocus_class; -extern JSObject *jsb_cocos2d_EventFocus_prototype; - -bool js_cocos2dx_EventFocus_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_EventFocus_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_EventFocus(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_EventFocus_EventFocus(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_EventListenerFocus_class; -extern JSObject *jsb_cocos2d_EventListenerFocus_prototype; - -bool js_cocos2dx_EventListenerFocus_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_EventListenerFocus_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_EventListenerFocus(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_EventListenerFocus_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_EventListenerFocus_EventListenerFocus(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerTouchAllAtOnce_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_EventListenerTouchAllAtOnce_EventListenerTouchAllAtOnce(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_ActionCamera_class; extern JSObject *jsb_cocos2d_ActionCamera_prototype; @@ -1076,27 +1096,41 @@ bool js_cocos2dx_OrbitCamera_initWithDuration(JSContext *cx, uint32_t argc, jsva bool js_cocos2dx_OrbitCamera_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_OrbitCamera_OrbitCamera(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_ActionManager_class; -extern JSObject *jsb_cocos2d_ActionManager_prototype; +extern JSClass *jsb_cocos2d_CardinalSplineTo_class; +extern JSObject *jsb_cocos2d_CardinalSplineTo_prototype; -bool js_cocos2dx_ActionManager_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ActionManager_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ActionManager(JSContext *cx, JS::HandleObject global); +bool js_cocos2dx_CardinalSplineTo_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_CardinalSplineTo_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_CardinalSplineTo(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_CardinalSplineTo_getPoints(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_CardinalSplineTo_updatePosition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_CardinalSplineTo_CardinalSplineTo(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_CardinalSplineBy_class; +extern JSObject *jsb_cocos2d_CardinalSplineBy_prototype; + +bool js_cocos2dx_CardinalSplineBy_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_CardinalSplineBy_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_CardinalSplineBy(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_CardinalSplineBy_CardinalSplineBy(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_CatmullRomTo_class; +extern JSObject *jsb_cocos2d_CatmullRomTo_prototype; + +bool js_cocos2dx_CatmullRomTo_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_CatmullRomTo_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_CatmullRomTo(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); + +extern JSClass *jsb_cocos2d_CatmullRomBy_class; +extern JSObject *jsb_cocos2d_CatmullRomBy_prototype; + +bool js_cocos2dx_CatmullRomBy_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_CatmullRomBy_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_CatmullRomBy(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ActionManager_getActionByTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_removeActionByTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_removeAllActions(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_addAction(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_resumeTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_update(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_pauseTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_removeAllActionsFromTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_resumeTargets(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_removeAction(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_removeAllActionsByTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_pauseAllRunningActions(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ActionManager_ActionManager(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_ActionEase_class; extern JSObject *jsb_cocos2d_ActionEase_prototype; @@ -1756,6 +1790,28 @@ bool js_cocos2dx_Twirl_getPosition(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Twirl_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Twirl_Twirl(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_ActionManager_class; +extern JSObject *jsb_cocos2d_ActionManager_prototype; + +bool js_cocos2dx_ActionManager_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ActionManager_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ActionManager(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ActionManager_getActionByTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_removeActionByTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_removeAllActions(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_addAction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_resumeTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_update(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_pauseTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_removeAllActionsFromTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_resumeTargets(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_removeAction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_removeAllActionsByTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_pauseAllRunningActions(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ActionManager_ActionManager(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_PageTurn3D_class; extern JSObject *jsb_cocos2d_PageTurn3D_prototype; @@ -1943,62 +1999,6 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_ActionTween_initWithDuration(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ActionTween_create(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_CardinalSplineTo_class; -extern JSObject *jsb_cocos2d_CardinalSplineTo_prototype; - -bool js_cocos2dx_CardinalSplineTo_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_CardinalSplineTo_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_CardinalSplineTo(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_CardinalSplineTo_getPoints(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_CardinalSplineTo_updatePosition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_CardinalSplineTo_CardinalSplineTo(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_CardinalSplineBy_class; -extern JSObject *jsb_cocos2d_CardinalSplineBy_prototype; - -bool js_cocos2dx_CardinalSplineBy_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_CardinalSplineBy_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_CardinalSplineBy(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_CardinalSplineBy_CardinalSplineBy(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_CatmullRomTo_class; -extern JSObject *jsb_cocos2d_CatmullRomTo_prototype; - -bool js_cocos2dx_CatmullRomTo_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_CatmullRomTo_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_CatmullRomTo(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); - -extern JSClass *jsb_cocos2d_CatmullRomBy_class; -extern JSObject *jsb_cocos2d_CatmullRomBy_prototype; - -bool js_cocos2dx_CatmullRomBy_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_CatmullRomBy_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_CatmullRomBy(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); - -extern JSClass *jsb_cocos2d_ProtectedNode_class; -extern JSObject *jsb_cocos2d_ProtectedNode_prototype; - -bool js_cocos2dx_ProtectedNode_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ProtectedNode_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ProtectedNode(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ProtectedNode_addProtectedChild(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_disableCascadeColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_removeProtectedChildByTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_reorderProtectedChild(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_disableCascadeOpacity(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_sortAllProtectedChildren(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_getProtectedChildByTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_removeProtectedChild(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_removeAllProtectedChildren(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProtectedNode_ProtectedNode(JSContext *cx, uint32_t argc, jsval *vp); - extern JSClass *jsb_cocos2d_GLProgramState_class; extern JSObject *jsb_cocos2d_GLProgramState_prototype; @@ -2053,6 +2053,23 @@ bool js_cocos2dx_AtlasNode_setQuadsToDraw(JSContext *cx, uint32_t argc, jsval *v bool js_cocos2dx_AtlasNode_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_AtlasNode_AtlasNode(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_ClippingNode_class; +extern JSObject *jsb_cocos2d_ClippingNode_prototype; + +bool js_cocos2dx_ClippingNode_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ClippingNode_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ClippingNode(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ClippingNode_hasContent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ClippingNode_setInverted(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ClippingNode_setStencil(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ClippingNode_getAlphaThreshold(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ClippingNode_getStencil(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ClippingNode_setAlphaThreshold(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ClippingNode_isInverted(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ClippingNode_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ClippingNode_ClippingNode(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_DrawNode_class; extern JSObject *jsb_cocos2d_DrawNode_prototype; @@ -2085,55 +2102,6 @@ bool js_cocos2dx_DrawNode_drawCubicBezier(JSContext *cx, uint32_t argc, jsval *v bool js_cocos2dx_DrawNode_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_DrawNode_DrawNode(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_LabelAtlas_class; -extern JSObject *jsb_cocos2d_LabelAtlas_prototype; - -bool js_cocos2dx_LabelAtlas_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_LabelAtlas_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_LabelAtlas(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_LabelAtlas_setString(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelAtlas_initWithString(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelAtlas_getString(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelAtlas_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelAtlas_LabelAtlas(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_LabelTTF_class; -extern JSObject *jsb_cocos2d_LabelTTF_prototype; - -bool js_cocos2dx_LabelTTF_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_LabelTTF_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_LabelTTF(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_LabelTTF_enableShadow(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setDimensions(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_getFontSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_getString(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setFlippedY(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setFlippedX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setTextDefinition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setFontName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_getHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_initWithStringAndTextDefinition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setString(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_initWithString(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setFontFillColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_enableStroke(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_getDimensions(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setFontSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_getVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_getTextDefinition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_getFontName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_setHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_disableShadow(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_disableStroke(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_createWithFontDefinition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_LabelTTF_LabelTTF(JSContext *cx, uint32_t argc, jsval *vp); - extern JSClass *jsb_cocos2d_SpriteBatchNode_class; extern JSObject *jsb_cocos2d_SpriteBatchNode_prototype; @@ -2219,6 +2187,19 @@ bool js_cocos2dx_Label_createWithCharMap(JSContext *cx, uint32_t argc, jsval *vp bool js_cocos2dx_Label_createWithSystemFont(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Label_Label(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_LabelAtlas_class; +extern JSObject *jsb_cocos2d_LabelAtlas_prototype; + +bool js_cocos2dx_LabelAtlas_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_LabelAtlas_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_LabelAtlas(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_LabelAtlas_setString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelAtlas_initWithString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelAtlas_getString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelAtlas_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelAtlas_LabelAtlas(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_LabelBMFont_class; extern JSObject *jsb_cocos2d_LabelBMFont_prototype; @@ -2240,6 +2221,42 @@ bool js_cocos2dx_LabelBMFont_setWidth(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_LabelBMFont_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_LabelBMFont_LabelBMFont(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_LabelTTF_class; +extern JSObject *jsb_cocos2d_LabelTTF_prototype; + +bool js_cocos2dx_LabelTTF_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_LabelTTF_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_LabelTTF(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_LabelTTF_enableShadow(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setDimensions(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_getFontSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_getString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setFlippedY(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setFlippedX(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setTextDefinition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setFontName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_getHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_initWithStringAndTextDefinition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_initWithString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setFontFillColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_enableStroke(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_getDimensions(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setFontSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_getVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_getTextDefinition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_getFontName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_setHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_disableShadow(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_disableStroke(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_createWithFontDefinition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_LabelTTF_LabelTTF(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_Layer_class; extern JSObject *jsb_cocos2d_Layer_prototype; @@ -2312,6 +2329,599 @@ bool js_cocos2dx_LayerMultiplex_addLayer(JSContext *cx, uint32_t argc, jsval *vp bool js_cocos2dx_LayerMultiplex_switchTo(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_LayerMultiplex_LayerMultiplex(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_MenuItem_class; +extern JSObject *jsb_cocos2d_MenuItem_prototype; + +bool js_cocos2dx_MenuItem_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_MenuItem_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_MenuItem(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_MenuItem_setEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItem_activate(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItem_initWithCallback(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItem_isEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItem_selected(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItem_isSelected(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItem_unselected(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItem_rect(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItem_MenuItem(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_MenuItemLabel_class; +extern JSObject *jsb_cocos2d_MenuItemLabel_prototype; + +bool js_cocos2dx_MenuItemLabel_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_MenuItemLabel_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_MenuItemLabel(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_MenuItemLabel_setLabel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemLabel_getDisabledColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemLabel_setString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemLabel_initWithLabel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemLabel_setDisabledColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemLabel_getLabel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemLabel_MenuItemLabel(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_MenuItemAtlasFont_class; +extern JSObject *jsb_cocos2d_MenuItemAtlasFont_prototype; + +bool js_cocos2dx_MenuItemAtlasFont_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_MenuItemAtlasFont_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_MenuItemAtlasFont(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_MenuItemAtlasFont_initWithString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemAtlasFont_MenuItemAtlasFont(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_MenuItemFont_class; +extern JSObject *jsb_cocos2d_MenuItemFont_prototype; + +bool js_cocos2dx_MenuItemFont_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_MenuItemFont_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_MenuItemFont(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_MenuItemFont_setFontNameObj(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemFont_getFontSizeObj(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemFont_setFontSizeObj(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemFont_initWithString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemFont_getFontNameObj(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemFont_setFontName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemFont_getFontSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemFont_getFontName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemFont_setFontSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemFont_MenuItemFont(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_MenuItemSprite_class; +extern JSObject *jsb_cocos2d_MenuItemSprite_prototype; + +bool js_cocos2dx_MenuItemSprite_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_MenuItemSprite_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_MenuItemSprite(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_MenuItemSprite_setEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_selected(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_setNormalImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_setDisabledImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_initWithNormalSprite(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_setSelectedImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_getDisabledImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_getSelectedImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_getNormalImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_unselected(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemSprite_MenuItemSprite(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_MenuItemImage_class; +extern JSObject *jsb_cocos2d_MenuItemImage_prototype; + +bool js_cocos2dx_MenuItemImage_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_MenuItemImage_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_MenuItemImage(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_MenuItemImage_setDisabledSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemImage_setSelectedSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemImage_setNormalSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemImage_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemImage_initWithNormalImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemImage_MenuItemImage(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_MenuItemToggle_class; +extern JSObject *jsb_cocos2d_MenuItemToggle_prototype; + +bool js_cocos2dx_MenuItemToggle_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_MenuItemToggle_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_MenuItemToggle(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_MenuItemToggle_setSubItems(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemToggle_initWithItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemToggle_getSelectedIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemToggle_addSubItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemToggle_getSelectedItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemToggle_setSelectedIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MenuItemToggle_MenuItemToggle(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Menu_class; +extern JSObject *jsb_cocos2d_Menu_prototype; + +bool js_cocos2dx_Menu_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_Menu_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_Menu(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_Menu_initWithArray(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Menu_setEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Menu_alignItemsVertically(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Menu_isEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Menu_alignItemsHorizontallyWithPadding(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Menu_alignItemsVerticallyWithPadding(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Menu_alignItemsHorizontally(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Menu_Menu(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_MotionStreak_class; +extern JSObject *jsb_cocos2d_MotionStreak_prototype; + +bool js_cocos2dx_MotionStreak_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_MotionStreak_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_MotionStreak(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_MotionStreak_reset(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_setTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_getTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_tintWithColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_setStartingPositionInitialized(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_isStartingPositionInitialized(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_isFastMode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_getStroke(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_initWithFade(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_setFastMode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_setStroke(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_MotionStreak_MotionStreak(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_NodeGrid_class; +extern JSObject *jsb_cocos2d_NodeGrid_prototype; + +bool js_cocos2dx_NodeGrid_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_NodeGrid_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_NodeGrid(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_NodeGrid_setTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_NodeGrid_getGrid(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_NodeGrid_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_NodeGrid_NodeGrid(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleBatchNode_class; +extern JSObject *jsb_cocos2d_ParticleBatchNode_prototype; + +bool js_cocos2dx_ParticleBatchNode_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleBatchNode_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleBatchNode(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleBatchNode_setTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_disableParticle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_getTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_setTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_getTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_insertChild(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_removeChildAtIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleBatchNode_ParticleBatchNode(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleSystem_class; +extern JSObject *jsb_cocos2d_ParticleSystem_prototype; + +bool js_cocos2dx_ParticleSystem_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleSystem_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleSystem(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleSystem_getStartSizeVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_isFull(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getBatchNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getStartColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getPositionType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setPosVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEndSpin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setRotatePerSecondVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getStartSpinVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getRadialAccelVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEndSizeVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setTangentialAccel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getRadialAccel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setStartRadius(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setRotatePerSecond(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEndSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getGravity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getTangentialAccel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEndRadius(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getSpeed(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getAngle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEndColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setStartSpin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setDuration(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getPosVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_updateWithNoTime(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_isBlendAdditive(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getSpeedVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setPositionType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_stopSystem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getSourcePosition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setLifeVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEndColorVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_updateQuadWithParticle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getStartSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setStartSpinVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_resetSystem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setTangentialAccelVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEndRadiusVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEndRadius(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_isActive(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setRadialAccelVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setStartSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setSpeed(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getStartSpin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getRotatePerSecond(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_initParticle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEmitterMode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getDuration(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setSourcePosition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEndSpinVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setBlendAdditive(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setLife(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setAngleVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setRotationIsDir(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEndSizeVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setAngle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setBatchNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getTangentialAccelVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEmitterMode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEndSpinVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getAngleVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setStartColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getRotatePerSecondVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEndSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getLife(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setSpeedVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setGravity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_postStep(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEmissionRate(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEndColorVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getRotationIsDir(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEmissionRate(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEndColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getLifeVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setStartSizeVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_addParticle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getStartRadius(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getParticleCount(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getStartRadiusVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setStartColorVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setEndSpin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setRadialAccel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_initWithDictionary(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setStartRadiusVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getEndRadiusVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_getStartColorVar(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystem_ParticleSystem(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleSystemQuad_class; +extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; + +bool js_cocos2dx_ParticleSystemQuad_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleSystemQuad_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleSystemQuad(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleSystemQuad_setDisplayFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystemQuad_setTextureWithRect(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystemQuad_listenRendererRecreated(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystemQuad_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystemQuad_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSystemQuad_ParticleSystemQuad(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleFire_class; +extern JSObject *jsb_cocos2d_ParticleFire_prototype; + +bool js_cocos2dx_ParticleFire_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleFire_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleFire(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleFire_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFire_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFire_ParticleFire(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleFireworks_class; +extern JSObject *jsb_cocos2d_ParticleFireworks_prototype; + +bool js_cocos2dx_ParticleFireworks_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleFireworks_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleFireworks(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleFireworks_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFireworks_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFireworks_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFireworks_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFireworks_ParticleFireworks(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleSun_class; +extern JSObject *jsb_cocos2d_ParticleSun_prototype; + +bool js_cocos2dx_ParticleSun_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleSun_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleSun(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleSun_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSun_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSun_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSun_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSun_ParticleSun(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleGalaxy_class; +extern JSObject *jsb_cocos2d_ParticleGalaxy_prototype; + +bool js_cocos2dx_ParticleGalaxy_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleGalaxy_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleGalaxy(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleGalaxy_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleGalaxy_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleGalaxy_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleGalaxy_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleGalaxy_ParticleGalaxy(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleFlower_class; +extern JSObject *jsb_cocos2d_ParticleFlower_prototype; + +bool js_cocos2dx_ParticleFlower_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleFlower_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleFlower(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleFlower_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFlower_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFlower_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFlower_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleFlower_ParticleFlower(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleMeteor_class; +extern JSObject *jsb_cocos2d_ParticleMeteor_prototype; + +bool js_cocos2dx_ParticleMeteor_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleMeteor_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleMeteor(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleMeteor_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleMeteor_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleMeteor_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleMeteor_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleMeteor_ParticleMeteor(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleSpiral_class; +extern JSObject *jsb_cocos2d_ParticleSpiral_prototype; + +bool js_cocos2dx_ParticleSpiral_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleSpiral_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleSpiral(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleSpiral_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSpiral_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSpiral_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSpiral_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSpiral_ParticleSpiral(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleExplosion_class; +extern JSObject *jsb_cocos2d_ParticleExplosion_prototype; + +bool js_cocos2dx_ParticleExplosion_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleExplosion_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleExplosion(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleExplosion_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleExplosion_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleExplosion_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleExplosion_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleExplosion_ParticleExplosion(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleSmoke_class; +extern JSObject *jsb_cocos2d_ParticleSmoke_prototype; + +bool js_cocos2dx_ParticleSmoke_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleSmoke_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleSmoke(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleSmoke_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSmoke_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSmoke_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSmoke_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSmoke_ParticleSmoke(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleSnow_class; +extern JSObject *jsb_cocos2d_ParticleSnow_prototype; + +bool js_cocos2dx_ParticleSnow_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleSnow_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleSnow(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleSnow_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSnow_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSnow_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSnow_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleSnow_ParticleSnow(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ParticleRain_class; +extern JSObject *jsb_cocos2d_ParticleRain_prototype; + +bool js_cocos2dx_ParticleRain_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParticleRain_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParticleRain(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParticleRain_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleRain_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleRain_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleRain_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParticleRain_ParticleRain(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ProgressTimer_class; +extern JSObject *jsb_cocos2d_ProgressTimer_prototype; + +bool js_cocos2dx_ProgressTimer_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ProgressTimer_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ProgressTimer(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ProgressTimer_initWithSprite(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_isReverseDirection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_setBarChangeRate(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_getPercentage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_setSprite(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_getType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_getSprite(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_setMidpoint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_getBarChangeRate(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_setReverseDirection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_getMidpoint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_setPercentage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_setType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProgressTimer_ProgressTimer(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ProtectedNode_class; +extern JSObject *jsb_cocos2d_ProtectedNode_prototype; + +bool js_cocos2dx_ProtectedNode_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ProtectedNode_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ProtectedNode(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ProtectedNode_addProtectedChild(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_disableCascadeColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_removeProtectedChildByTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_reorderProtectedChild(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_disableCascadeOpacity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_sortAllProtectedChildren(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_getProtectedChildByTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_removeProtectedChild(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_removeAllProtectedChildren(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ProtectedNode_ProtectedNode(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Sprite_class; +extern JSObject *jsb_cocos2d_Sprite_prototype; + +bool js_cocos2dx_Sprite_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_Sprite_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_Sprite(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_getTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setFlippedY(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setFlippedX(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setRotationSkewX(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_getBatchNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_getOffsetPosition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_initWithSpriteFrameName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_isFrameDisplayed(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_getAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setBatchNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setDisplayFrameWithAnimationName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_getSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_isDirty(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setDirty(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_isTextureRectRotated(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_getTextureRect(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_getTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_initWithSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_isFlippedX(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_isFlippedY(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_setVertexRect(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_createWithSpriteFrameName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_createWithSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Sprite_Sprite(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Image_class; +extern JSObject *jsb_cocos2d_Image_prototype; + +bool js_cocos2dx_Image_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_Image_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_Image(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_Image_hasPremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_getDataLen(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_saveToFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_hasAlpha(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_isCompressed(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_getHeight(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_initWithImageFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_getWidth(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_getBitPerPixel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_getFileType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_getNumberOfMipmaps(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_getRenderFormat(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_getData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_getMipmaps(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_initWithRawData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Image_Image(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_RenderTexture_class; +extern JSObject *jsb_cocos2d_RenderTexture_prototype; + +bool js_cocos2dx_RenderTexture_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_RenderTexture_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_RenderTexture(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_RenderTexture_setVirtualViewport(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_clearStencil(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_getClearDepth(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_getClearStencil(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_end(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_setClearStencil(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_setSprite(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_getSprite(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_isAutoDraw(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_setKeepMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_setClearFlags(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_begin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_setAutoDraw(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_setClearColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_endToLua(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_beginWithClear(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_clearDepth(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_getClearColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_clear(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_getClearFlags(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_newImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_setClearDepth(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_initWithWidthAndHeight(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_RenderTexture_RenderTexture(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_TransitionEaseScene_class; extern JSObject *jsb_cocos2d_TransitionEaseScene_prototype; @@ -2700,595 +3310,35 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_TransitionProgressOutIn_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TransitionProgressOutIn_TransitionProgressOutIn(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_MenuItem_class; -extern JSObject *jsb_cocos2d_MenuItem_prototype; +extern JSClass *jsb_cocos2d_Camera_class; +extern JSObject *jsb_cocos2d_Camera_prototype; -bool js_cocos2dx_MenuItem_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_MenuItem_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_MenuItem(JSContext *cx, JS::HandleObject global); +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_MenuItem_setEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItem_activate(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItem_initWithCallback(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItem_isEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItem_selected(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItem_isSelected(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItem_unselected(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItem_rect(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItem_MenuItem(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_MenuItemLabel_class; -extern JSObject *jsb_cocos2d_MenuItemLabel_prototype; - -bool js_cocos2dx_MenuItemLabel_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_MenuItemLabel_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_MenuItemLabel(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_MenuItemLabel_setLabel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemLabel_getDisabledColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemLabel_setString(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemLabel_initWithLabel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemLabel_setDisabledColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemLabel_getLabel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemLabel_MenuItemLabel(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_MenuItemAtlasFont_class; -extern JSObject *jsb_cocos2d_MenuItemAtlasFont_prototype; - -bool js_cocos2dx_MenuItemAtlasFont_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_MenuItemAtlasFont_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_MenuItemAtlasFont(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_MenuItemAtlasFont_initWithString(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemAtlasFont_MenuItemAtlasFont(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_MenuItemFont_class; -extern JSObject *jsb_cocos2d_MenuItemFont_prototype; - -bool js_cocos2dx_MenuItemFont_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_MenuItemFont_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_MenuItemFont(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_MenuItemFont_setFontNameObj(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemFont_getFontSizeObj(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemFont_setFontSizeObj(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemFont_initWithString(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemFont_getFontNameObj(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemFont_setFontName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemFont_getFontSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemFont_getFontName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemFont_setFontSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemFont_MenuItemFont(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_MenuItemSprite_class; -extern JSObject *jsb_cocos2d_MenuItemSprite_prototype; - -bool js_cocos2dx_MenuItemSprite_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_MenuItemSprite_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_MenuItemSprite(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_MenuItemSprite_setEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_selected(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_setNormalImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_setDisabledImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_initWithNormalSprite(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_setSelectedImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_getDisabledImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_getSelectedImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_getNormalImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_unselected(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemSprite_MenuItemSprite(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_MenuItemImage_class; -extern JSObject *jsb_cocos2d_MenuItemImage_prototype; - -bool js_cocos2dx_MenuItemImage_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_MenuItemImage_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_MenuItemImage(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_MenuItemImage_setDisabledSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemImage_setSelectedSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemImage_setNormalSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemImage_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemImage_initWithNormalImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemImage_MenuItemImage(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_MenuItemToggle_class; -extern JSObject *jsb_cocos2d_MenuItemToggle_prototype; - -bool js_cocos2dx_MenuItemToggle_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_MenuItemToggle_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_MenuItemToggle(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_MenuItemToggle_setSubItems(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemToggle_initWithItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemToggle_getSelectedIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemToggle_addSubItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemToggle_getSelectedItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemToggle_setSelectedIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MenuItemToggle_MenuItemToggle(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Menu_class; -extern JSObject *jsb_cocos2d_Menu_prototype; - -bool js_cocos2dx_Menu_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_Menu_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_Menu(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Menu_initWithArray(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Menu_setEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Menu_alignItemsVertically(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Menu_isEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Menu_alignItemsHorizontallyWithPadding(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Menu_alignItemsVerticallyWithPadding(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Menu_alignItemsHorizontally(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Menu_Menu(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ClippingNode_class; -extern JSObject *jsb_cocos2d_ClippingNode_prototype; - -bool js_cocos2dx_ClippingNode_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ClippingNode_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ClippingNode(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ClippingNode_hasContent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ClippingNode_setInverted(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ClippingNode_setStencil(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ClippingNode_getAlphaThreshold(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ClippingNode_getStencil(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ClippingNode_setAlphaThreshold(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ClippingNode_isInverted(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ClippingNode_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ClippingNode_ClippingNode(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_MotionStreak_class; -extern JSObject *jsb_cocos2d_MotionStreak_prototype; - -bool js_cocos2dx_MotionStreak_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_MotionStreak_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_MotionStreak(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_MotionStreak_reset(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_setTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_getTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_tintWithColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_setStartingPositionInitialized(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_isStartingPositionInitialized(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_isFastMode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_getStroke(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_initWithFade(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_setFastMode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_setStroke(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_MotionStreak_MotionStreak(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ProgressTimer_class; -extern JSObject *jsb_cocos2d_ProgressTimer_prototype; - -bool js_cocos2dx_ProgressTimer_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ProgressTimer_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ProgressTimer(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ProgressTimer_initWithSprite(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_isReverseDirection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_setBarChangeRate(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_getPercentage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_setSprite(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_getType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_getSprite(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_setMidpoint(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_getBarChangeRate(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_setReverseDirection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_getMidpoint(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_setPercentage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_setType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ProgressTimer_ProgressTimer(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Sprite_class; -extern JSObject *jsb_cocos2d_Sprite_prototype; - -bool js_cocos2dx_Sprite_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_Sprite_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_Sprite(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_getTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setFlippedY(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setFlippedX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setRotationSkewX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_getBatchNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_getOffsetPosition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_initWithSpriteFrameName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_isFrameDisplayed(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_getAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setBatchNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setDisplayFrameWithAnimationName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_getSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_isDirty(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setDirty(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_isTextureRectRotated(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_getTextureRect(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_getTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_initWithSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_isFlippedX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_isFlippedY(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_setVertexRect(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_createWithSpriteFrameName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_createWithSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_Sprite(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_Image_class; -extern JSObject *jsb_cocos2d_Image_prototype; - -bool js_cocos2dx_Image_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_Image_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_Image(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Image_hasPremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_getDataLen(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_saveToFile(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_hasAlpha(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_isCompressed(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_getHeight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_initWithImageFile(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_getWidth(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_getBitPerPixel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_getFileType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_getNumberOfMipmaps(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_getRenderFormat(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_getData(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_getMipmaps(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_initWithRawData(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Image_Image(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_RenderTexture_class; -extern JSObject *jsb_cocos2d_RenderTexture_prototype; - -bool js_cocos2dx_RenderTexture_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_RenderTexture_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_RenderTexture(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_RenderTexture_setVirtualViewport(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_clearStencil(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_getClearDepth(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_getClearStencil(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_end(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_setClearStencil(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_setSprite(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_getSprite(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_isAutoDraw(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_setKeepMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_setClearFlags(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_begin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_setAutoDraw(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_setClearColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_endToLua(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_beginWithClear(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_clearDepth(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_getClearColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_clear(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_getClearFlags(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_newImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_setClearDepth(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_initWithWidthAndHeight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_RenderTexture_RenderTexture(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_NodeGrid_class; -extern JSObject *jsb_cocos2d_NodeGrid_prototype; - -bool js_cocos2dx_NodeGrid_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_NodeGrid_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_NodeGrid(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_NodeGrid_setTarget(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_NodeGrid_getGrid(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_NodeGrid_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_NodeGrid_NodeGrid(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleBatchNode_class; -extern JSObject *jsb_cocos2d_ParticleBatchNode_prototype; - -bool js_cocos2dx_ParticleBatchNode_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleBatchNode_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleBatchNode(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleBatchNode_setTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_disableParticle(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_getTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_setTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_getTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_insertChild(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_removeChildAtIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleBatchNode_ParticleBatchNode(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleSystem_class; -extern JSObject *jsb_cocos2d_ParticleSystem_prototype; - -bool js_cocos2dx_ParticleSystem_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleSystem_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleSystem(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleSystem_getStartSizeVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_isFull(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getBatchNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getStartColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getPositionType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setPosVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEndSpin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setRotatePerSecondVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getStartSpinVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getRadialAccelVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEndSizeVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setTangentialAccel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getRadialAccel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setStartRadius(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setRotatePerSecond(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEndSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getGravity(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getTangentialAccel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEndRadius(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getSpeed(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getAngle(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEndColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setStartSpin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setDuration(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getPosVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_updateWithNoTime(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_isBlendAdditive(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getSpeedVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setPositionType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_stopSystem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getSourcePosition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setLifeVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEndColorVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_updateQuadWithParticle(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getStartSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setStartSpinVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_resetSystem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setTangentialAccelVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEndRadiusVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEndRadius(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_isActive(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setRadialAccelVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setStartSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setSpeed(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getStartSpin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getRotatePerSecond(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_initParticle(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEmitterMode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getDuration(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setSourcePosition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEndSpinVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setBlendAdditive(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setLife(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setAngleVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setRotationIsDir(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEndSizeVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setAngle(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setBatchNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getTangentialAccelVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEmitterMode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEndSpinVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getAngleVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setStartColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getRotatePerSecondVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEndSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getLife(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setSpeedVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setAutoRemoveOnFinish(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setGravity(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_postStep(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEmissionRate(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEndColorVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getRotationIsDir(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEmissionRate(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEndColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getLifeVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setStartSizeVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_addParticle(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getStartRadius(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getParticleCount(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getStartRadiusVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setStartColorVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setEndSpin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setRadialAccel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_initWithDictionary(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_isAutoRemoveOnFinish(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setStartRadiusVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getEndRadiusVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_getStartColorVar(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystem_ParticleSystem(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleSystemQuad_class; -extern JSObject *jsb_cocos2d_ParticleSystemQuad_prototype; - -bool js_cocos2dx_ParticleSystemQuad_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleSystemQuad_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleSystemQuad(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleSystemQuad_setDisplayFrame(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystemQuad_setTextureWithRect(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystemQuad_listenRendererRecreated(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystemQuad_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystemQuad_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSystemQuad_ParticleSystemQuad(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleFire_class; -extern JSObject *jsb_cocos2d_ParticleFire_prototype; - -bool js_cocos2dx_ParticleFire_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleFire_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleFire(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleFire_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFire_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFire_ParticleFire(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleFireworks_class; -extern JSObject *jsb_cocos2d_ParticleFireworks_prototype; - -bool js_cocos2dx_ParticleFireworks_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleFireworks_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleFireworks(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleFireworks_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFireworks_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFireworks_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFireworks_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFireworks_ParticleFireworks(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleSun_class; -extern JSObject *jsb_cocos2d_ParticleSun_prototype; - -bool js_cocos2dx_ParticleSun_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleSun_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleSun(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleSun_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSun_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSun_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSun_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSun_ParticleSun(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleGalaxy_class; -extern JSObject *jsb_cocos2d_ParticleGalaxy_prototype; - -bool js_cocos2dx_ParticleGalaxy_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleGalaxy_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleGalaxy(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleGalaxy_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleGalaxy_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleGalaxy_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleGalaxy_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleGalaxy_ParticleGalaxy(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleFlower_class; -extern JSObject *jsb_cocos2d_ParticleFlower_prototype; - -bool js_cocos2dx_ParticleFlower_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleFlower_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleFlower(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleFlower_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFlower_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFlower_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFlower_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleFlower_ParticleFlower(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleMeteor_class; -extern JSObject *jsb_cocos2d_ParticleMeteor_prototype; - -bool js_cocos2dx_ParticleMeteor_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleMeteor_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleMeteor(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleMeteor_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleMeteor_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleMeteor_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleMeteor_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleMeteor_ParticleMeteor(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleSpiral_class; -extern JSObject *jsb_cocos2d_ParticleSpiral_prototype; - -bool js_cocos2dx_ParticleSpiral_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleSpiral_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleSpiral(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleSpiral_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSpiral_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSpiral_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSpiral_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSpiral_ParticleSpiral(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleExplosion_class; -extern JSObject *jsb_cocos2d_ParticleExplosion_prototype; - -bool js_cocos2dx_ParticleExplosion_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleExplosion_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleExplosion(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleExplosion_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleExplosion_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleExplosion_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleExplosion_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleExplosion_ParticleExplosion(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleSmoke_class; -extern JSObject *jsb_cocos2d_ParticleSmoke_prototype; - -bool js_cocos2dx_ParticleSmoke_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleSmoke_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleSmoke(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleSmoke_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSmoke_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSmoke_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSmoke_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSmoke_ParticleSmoke(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleSnow_class; -extern JSObject *jsb_cocos2d_ParticleSnow_prototype; - -bool js_cocos2dx_ParticleSnow_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleSnow_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleSnow(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleSnow_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSnow_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSnow_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSnow_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleSnow_ParticleSnow(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParticleRain_class; -extern JSObject *jsb_cocos2d_ParticleRain_prototype; - -bool js_cocos2dx_ParticleRain_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParticleRain_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParticleRain(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParticleRain_init(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleRain_initWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleRain_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleRain_createWithTotalParticles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParticleRain_ParticleRain(JSContext *cx, uint32_t argc, jsval *vp); +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_getViewProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_getViewMatrix(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_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_initOrthographic(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_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); +bool js_cocos2dx_Camera_getDefaultCamera(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_getVisitingCamera(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_Camera(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_GridBase_class; extern JSObject *jsb_cocos2d_GridBase_prototype; @@ -3340,36 +3390,6 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_TiledGrid3D_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TiledGrid3D_TiledGrid3D(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_Camera_class; -extern JSObject *jsb_cocos2d_Camera_prototype; - -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_getViewProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_getViewMatrix(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_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_initOrthographic(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_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); -bool js_cocos2dx_Camera_getDefaultCamera(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_getVisitingCamera(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_Camera(JSContext *cx, uint32_t argc, jsval *vp); - extern JSClass *jsb_cocos2d_BaseLight_class; extern JSObject *jsb_cocos2d_BaseLight_prototype; @@ -3839,15 +3859,18 @@ bool js_cocos2dx_SimpleAudioEngine_resumeEffect(JSContext *cx, uint32_t argc, js bool js_cocos2dx_SimpleAudioEngine_end(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_SimpleAudioEngine_getInstance(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_AsyncTaskPool_class; -extern JSObject *jsb_cocos2d_AsyncTaskPool_prototype; +extern JSClass *jsb_cocos2d_SpritePolygonCache_class; +extern JSObject *jsb_cocos2d_SpritePolygonCache_prototype; -bool js_cocos2dx_AsyncTaskPool_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_AsyncTaskPool_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_AsyncTaskPool(JSContext *cx, JS::HandleObject global); +bool js_cocos2dx_SpritePolygonCache_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_SpritePolygonCache_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_SpritePolygonCache(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_AsyncTaskPool_stopTasks(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_AsyncTaskPool_destoryInstance(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_AsyncTaskPool_getInstance(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_SpritePolygonCache_removeSpritePolygonCache(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_SpritePolygonCache_destroyInstance(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_SpritePolygonCache_printInfo(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_SpritePolygonCache_getInstance(JSContext *cx, uint32_t argc, jsval *vp); #endif diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.cpp new file mode 100644 index 0000000000..6ef7dcf99c --- /dev/null +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.cpp @@ -0,0 +1,318 @@ +#include "jsb_cocos2dx_experimental.hpp" +#include "cocos2d_specifics.hpp" +#include "SpritePolygon.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_SpritePolygon_class; +JSObject *jsb_cocos2d_experimental_SpritePolygon_prototype; + +bool js_cocos2dx_experimental_SpritePolygon_setTexture(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::experimental::SpritePolygon* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_setTexture : Invalid Native Object"); + do { + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cobj->setTexture(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_setTexture : wrong number of arguments"); + return false; +} +bool js_cocos2dx_experimental_SpritePolygon_initWithTexture(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_initWithTexture : Invalid Native Object"); + if (argc == 1) { + cocos2d::Texture2D* 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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_SpritePolygon_initWithTexture : Error processing arguments"); + bool ret = cobj->initWithTexture(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_initWithTexture : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_experimental_SpritePolygon_showDebug(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_showDebug : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_SpritePolygon_showDebug : Error processing arguments"); + cobj->showDebug(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_showDebug : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_experimental_SpritePolygon_getTexture(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_getTexture : Invalid Native Object"); + if (argc == 0) { + cocos2d::Texture2D* ret = cobj->getTexture(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Texture2D*)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_SpritePolygon_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_SpritePolygon_getArea(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_getArea : Invalid Native Object"); + if (argc == 0) { + const float ret = cobj->getArea(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_getArea : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_SpritePolygon_initWithMarching(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_initWithMarching : Invalid Native Object"); + if (argc == 3) { + std::string arg0; + cocos2d::Rect arg1; + double arg2; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_ccrect(cx, args.get(1), &arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_SpritePolygon_initWithMarching : Error processing arguments"); + bool ret = cobj->initWithMarching(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_initWithMarching : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_experimental_SpritePolygon_getVertCount(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_getVertCount : Invalid Native Object"); + if (argc == 0) { + const ssize_t ret = cobj->getVertCount(); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_getVertCount : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_SpritePolygon_getTrianglesCount(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_getTrianglesCount : Invalid Native Object"); + if (argc == 0) { + const ssize_t ret = cobj->getTrianglesCount(); + jsval jsret = JSVAL_NULL; + jsret = ssize_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_getTrianglesCount : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_experimental_SpritePolygon_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (SpritePolygon)", obj); +} + +void js_register_cocos2dx_experimental_SpritePolygon(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_experimental_SpritePolygon_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_experimental_SpritePolygon_class->name = "SpritePolygon"; + jsb_cocos2d_experimental_SpritePolygon_class->addProperty = JS_PropertyStub; + jsb_cocos2d_experimental_SpritePolygon_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_experimental_SpritePolygon_class->getProperty = JS_PropertyStub; + jsb_cocos2d_experimental_SpritePolygon_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_experimental_SpritePolygon_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_experimental_SpritePolygon_class->resolve = JS_ResolveStub; + jsb_cocos2d_experimental_SpritePolygon_class->convert = JS_ConvertStub; + jsb_cocos2d_experimental_SpritePolygon_class->finalize = js_cocos2d_experimental_SpritePolygon_finalize; + jsb_cocos2d_experimental_SpritePolygon_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("setTexture", js_cocos2dx_experimental_SpritePolygon_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTexture", js_cocos2dx_experimental_SpritePolygon_initWithTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("showDebug", js_cocos2dx_experimental_SpritePolygon_showDebug, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTexture", js_cocos2dx_experimental_SpritePolygon_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getArea", js_cocos2dx_experimental_SpritePolygon_getArea, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithMarching", js_cocos2dx_experimental_SpritePolygon_initWithMarching, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVertCount", js_cocos2dx_experimental_SpritePolygon_getVertCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTrianglesCount", js_cocos2dx_experimental_SpritePolygon_getTrianglesCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_experimental_SpritePolygon_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_experimental_SpritePolygon_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, "SpritePolygon", 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_SpritePolygon_class; + p->proto = jsb_cocos2d_experimental_SpritePolygon_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +void register_all_cocos2dx_experimental(JSContext* cx, JS::HandleObject obj) { + // Get the ns + JS::RootedObject ns(cx); + get_or_create_js_obj(cx, obj, "ccexp", &ns); + + js_register_cocos2dx_experimental_SpritePolygon(cx, ns); +} + diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.hpp new file mode 100644 index 0000000000..19d02f72e6 --- /dev/null +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.hpp @@ -0,0 +1,24 @@ +#ifndef __cocos2dx_experimental_h__ +#define __cocos2dx_experimental_h__ + +#include "jsapi.h" +#include "jsfriendapi.h" + + +extern JSClass *jsb_cocos2d_experimental_SpritePolygon_class; +extern JSObject *jsb_cocos2d_experimental_SpritePolygon_prototype; + +bool js_cocos2dx_experimental_SpritePolygon_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_experimental_SpritePolygon_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_experimental_SpritePolygon(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_experimental(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_experimental_SpritePolygon_setTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_SpritePolygon_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_SpritePolygon_showDebug(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_SpritePolygon_getTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_SpritePolygon_getArea(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_SpritePolygon_initWithMarching(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_SpritePolygon_getVertCount(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_SpritePolygon_getTrianglesCount(JSContext *cx, uint32_t argc, jsval *vp); +#endif + diff --git a/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_manual.cpp b/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_manual.cpp new file mode 100644 index 0000000000..eba2af0574 --- /dev/null +++ b/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_manual.cpp @@ -0,0 +1,253 @@ +/**************************************************************************** + 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_experimental_manual.h" +#include "cocos2d_specifics.hpp" +#include "2d/SpritePolygon.h" + +bool jsval_to_vector_vec2(JSContext* cx, JS::HandleValue v, std::vector* ret) +{ + JS::RootedObject jsArr(cx); + bool ok = v.isObject() && JS_ValueToObject( cx, v, &jsArr ); + JSB_PRECONDITION3( ok, cx, false, "Error converting value to object"); + JSB_PRECONDITION3( jsArr && JS_IsArrayObject( cx, jsArr), cx, false, "Object must be an array"); + + uint32_t len = 0; + JS_GetArrayLength(cx, jsArr, &len); + ret->reserve(len); + + for (uint32_t i=0; i < len; i++) + { + JS::RootedValue value(cx); + if (JS_GetElement(cx, jsArr, i, &value)) + { + cocos2d::Vec2 vec2; + ok &= jsval_to_vector2(cx, value, &vec2); + ret->push_back(vec2); + } + } + return ok; +} + +bool jsval_to_vector_unsigned_short(JSContext* cx, JS::HandleValue v, std::vector* ret) +{ + JS::RootedObject jsArr(cx); + bool ok = v.isObject() && JS_ValueToObject( cx, v, &jsArr ); + JSB_PRECONDITION3( ok, cx, false, "Error converting value to object"); + JSB_PRECONDITION3( jsArr && JS_IsArrayObject( cx, jsArr), cx, false, "Object must be an array"); + + uint32_t len = 0; + JS_GetArrayLength(cx, jsArr, &len); + ret->reserve(len); + + for (uint32_t i=0; i < len; i++) + { + JS::RootedValue value(cx); + if (JS_GetElement(cx, jsArr, i, &value)) + { + unsigned short index; + ok &= jsval_to_uint16(cx, value, &index); + ret->push_back(index); + } + } + return ok; +} + +bool jsval_to_cctex2f(JSContext* cx, JS::HandleValue vp, cocos2d::Tex2F* ret) +{ + JS::RootedObject tmp(cx); + JS::RootedValue jsx(cx); + JS::RootedValue jsy(cx); + double x, y; + bool ok = vp.isObject() && + JS_ValueToObject(cx, vp, &tmp) && + JS_GetProperty(cx, tmp, "x", &jsx) && + JS_GetProperty(cx, tmp, "y", &jsy) && + JS::ToNumber(cx, jsx, &x) && + JS::ToNumber(cx, jsy, &y) && + !isnan(x) && !isnan(y); + + JSB_PRECONDITION3(ok, cx, false, "Error processing arguments"); + + ret->u = (GLfloat)x; + ret->v = (GLfloat)y; + return true; +} + +bool jsval_to_v3fc4bt2f(JSContext* cx, JS::HandleValue v, cocos2d::V3F_C4B_T2F* ret) +{ + JS::RootedObject object(cx, v.toObjectOrNull()); + + cocos2d::Vec3 v3; + cocos2d::Color4B color; + cocos2d::Tex2F t2; + + JS::RootedValue jsv3(cx); + JS::RootedValue jscolor(cx); + JS::RootedValue jst2(cx); + + bool ok = JS_GetProperty(cx, object, "v3f", &jsv3) && + JS_GetProperty(cx, object, "c4b", &jscolor) && + JS_GetProperty(cx, object, "t2f", &jst2) && + jsval_to_vector3(cx, jsv3, &v3) && + jsval_to_cccolor4b(cx, jscolor, &color) && + jsval_to_cctex2f(cx, jst2, &t2); + + JSB_PRECONDITION3(ok, cx, false, "Error processing arguments"); + + ret->vertices = v3; + ret->colors = color; + ret->texCoords = t2; + return true; +} + +bool jsval_to_vector_v3fc4bt2f(JSContext* cx, JS::HandleValue v, std::vector* ret) +{ + JS::RootedObject jsArr(cx); + bool ok = v.isObject() && JS_ValueToObject( cx, v, &jsArr ); + JSB_PRECONDITION3( ok, cx, false, "Error converting value to object"); + JSB_PRECONDITION3( jsArr && JS_IsArrayObject( cx, jsArr), cx, false, "Object must be an array"); + + uint32_t len = 0; + JS_GetArrayLength(cx, jsArr, &len); + ret->reserve(len); + + for (uint32_t i=0; i < len; i++) + { + JS::RootedValue value(cx); + if (JS_GetElement(cx, jsArr, i, &value)) + { + cocos2d::V3F_C4B_T2F vert; + ok &= jsval_to_v3fc4bt2f(cx, value, &vert); + ret->push_back(vert); + } + } + return ok; +} + +bool js_cocos2dx_SpritePolygon_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + if(argc == 1) + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + std::string file; + bool ok = jsval_to_std_string(cx, args.get(0), &file); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_SpritePolygon_create : Error processing arguments"); + + auto sprite = cocos2d::experimental::SpritePolygon::create(file); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, sprite); + JS::RootedValue ret(cx, OBJECT_TO_JSVAL(jsProxy->obj)); + + args.rval().set(ret); + return true; + } + + + if(argc == 2) + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + std::string file; + std::vector verts; + bool ok = jsval_to_std_string(cx, args.get(0), &file); + ok &= jsval_to_vector_vec2(cx, args.get(1), &verts); + + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_SpritePolygon_create : Error processing arguments"); + + auto sprite = cocos2d::experimental::SpritePolygon::create(file, verts); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, sprite); + JS::RootedValue ret(cx, OBJECT_TO_JSVAL(jsProxy->obj)); + + args.rval().set(ret); + return true; + + } + + if(argc == 3) + { + do + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + std::string file; + std::vector verts; + std::vector indices; + + bool ok = jsval_to_std_string(cx, args.get(0), &file); + ok &= jsval_to_vector_vec2(cx, args.get(1), &verts); + ok &= jsval_to_vector_unsigned_short(cx, args.get(2), &indices); + + if(!ok) + break; + + auto sprite = cocos2d::experimental::SpritePolygon::create(file, verts, indices); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, sprite); + JS::RootedValue ret(cx, OBJECT_TO_JSVAL(jsProxy->obj)); + + args.rval().set(ret); + return true; + }while (0); + + do + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + std::string file; + std::vector verts; + std::vector indices; + + bool ok = jsval_to_std_string(cx, args.get(0), &file); + ok &= jsval_to_vector_v3fc4bt2f(cx, args.get(1), &verts); + ok &= jsval_to_vector_unsigned_short(cx, args.get(2), &indices); + + if(!ok) + break; + + auto sprite = cocos2d::experimental::SpritePolygon::create(file, verts, indices); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, sprite); + JS::RootedValue ret(cx, OBJECT_TO_JSVAL(jsProxy->obj)); + + args.rval().set(ret); + return true; + }while(0); + + JS_ReportError(cx, "js_cocos2dx_SpritePolygon_create : Error processing arguments"); + } + + JS_ReportError(cx, "js_cocos2dx_SpritePolygon_create : wrong number of arguments: %d", argc); + return false; +} + +void register_all_cocos2dx_experimental_manual(JSContext *cx, JS::HandleObject global) +{ + + JS::RootedObject ccObj(cx); + get_or_create_js_obj(cx, global, "ccexp", &ccObj); + + JS::RootedValue tmpVal(cx); + JS_GetProperty(cx, ccObj, "SpritePolygon", &tmpVal); + JS::RootedObject tmpObj(cx, tmpVal.toObjectOrNull()); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_SpritePolygon_create, 1, JSPROP_READONLY | JSPROP_PERMANENT); + +} \ No newline at end of file diff --git a/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_manual.h b/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_manual.h new file mode 100644 index 0000000000..d75484d697 --- /dev/null +++ b/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_manual.h @@ -0,0 +1,35 @@ +/**************************************************************************** + 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. + ****************************************************************************/ +#ifndef __jsb_cococs2dx_experimental_h__ +#define __jsb_cococs2dx_experimental_h__ + + +#include "jsapi.h" + +void register_all_cocos2dx_experimental_manual(JSContext *cx, JS::HandleObject global); + +#endif \ No newline at end of file diff --git a/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp b/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp index ff324bb62c..187ddadab5 100644 --- a/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp +++ b/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp @@ -1445,7 +1445,8 @@ bool jsval_to_vector2(JSContext *cx, JS::HandleValue vp, cocos2d::Vec2* ret) JS_GetProperty(cx, tmp, "x", &jsx) && JS_GetProperty(cx, tmp, "y", &jsy) && JS::ToNumber(cx, jsx, &x) && - JS::ToNumber(cx, jsy, &y); + JS::ToNumber(cx, jsy, &y) && + !isnan(x) && !isnan(y); JSB_PRECONDITION3(ok, cx, false, "Error processing arguments"); diff --git a/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.cpp b/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.cpp index 6fe52144c3..590e26f198 100644 --- a/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.cpp +++ b/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.cpp @@ -69,5 +69,15 @@ bool JSB_localStorageSetItem(JSContext *cx, uint32_t argc, jsval *vp) { return true; } +// Arguments: char*, char* +// Ret value: void +bool JSB_localStorageClear(JSContext *cx, uint32_t argc, jsval *vp) { + JSB_PRECONDITION2( argc == 0, cx, false, "Invalid number of arguments" ); + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + + localStorageClear(); + args.rval().setUndefined(); + return true; +} //#endif // JSB_INCLUDE_SYSTEM diff --git a/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.h b/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.h index 85f9ea55c3..6560d0b2d3 100644 --- a/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.h +++ b/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.h @@ -12,6 +12,7 @@ extern "C" { bool JSB_localStorageGetItem(JSContext *cx, uint32_t argc, jsval *vp); bool JSB_localStorageRemoveItem(JSContext *cx, uint32_t argc, jsval *vp); bool JSB_localStorageSetItem(JSContext *cx, uint32_t argc, jsval *vp); +bool JSB_localStorageClear(JSContext *cx, uint32_t argc, jsval *vp); #ifdef __cplusplus } diff --git a/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions_registration.h b/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions_registration.h index 5774403878..c3798dd7f2 100644 --- a/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions_registration.h +++ b/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions_registration.h @@ -10,6 +10,7 @@ JS_DefineFunction(_cx, system, "getItem", JSB_localStorageGetItem, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE ); JS_DefineFunction(_cx, system, "removeItem", JSB_localStorageRemoveItem, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE ); JS_DefineFunction(_cx, system, "setItem", JSB_localStorageSetItem, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE ); +JS_DefineFunction(_cx, system, "clear", JSB_localStorageClear, 0, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE ); //#endif // JSB_INCLUDE_SYSTEM diff --git a/cocos/scripting/js-bindings/manual/spine/jsb_cocos2dx_spine_manual.cpp b/cocos/scripting/js-bindings/manual/spine/jsb_cocos2dx_spine_manual.cpp index 22881421c7..c015e9c70d 100644 --- a/cocos/scripting/js-bindings/manual/spine/jsb_cocos2dx_spine_manual.cpp +++ b/cocos/scripting/js-bindings/manual/spine/jsb_cocos2dx_spine_manual.cpp @@ -69,7 +69,7 @@ jsval spbonedata_to_jsval(JSContext* cx, const spBoneData* v) // root haven't parent JS::RootedValue parentVal(cx); - if (strcmp(v->name, "root")) + if (strcmp(v->name, "root") && v->parent) parentVal = spbonedata_to_jsval(cx, v->parent); bool ok = JS_DefineProperty(cx, tmp, "name", JS::RootedValue(cx, c_string_to_jsval(cx, v->name)), JSPROP_ENUMERATE | JSPROP_PERMANENT) && @@ -98,7 +98,7 @@ jsval spbone_to_jsval(JSContext* cx, spBone& v) // root haven't parent JS::RootedValue parentVal(cx); - if (strcmp(v.data->name, "root")) + if (strcmp(v.data->name, "root") && v.parent) parentVal = spbone_to_jsval(cx, *v.parent); bool ok = JS_DefineProperty(cx, tmp, "data", JS::RootedValue(cx, spbonedata_to_jsval(cx, v.data)), JSPROP_ENUMERATE | JSPROP_PERMANENT) && diff --git a/cocos/scripting/js-bindings/proj.android/Android.mk b/cocos/scripting/js-bindings/proj.android/Android.mk index 328a7a1cb1..1246b0259f 100755 --- a/cocos/scripting/js-bindings/proj.android/Android.mk +++ b/cocos/scripting/js-bindings/proj.android/Android.mk @@ -43,6 +43,7 @@ LOCAL_SRC_FILES := ../auto/jsb_cocos2dx_3d_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 \ ../manual/ScriptingCore.cpp \ \ ../manual/cocos2d_specifics.cpp \ ../manual/js_manual_conversions.cpp \ @@ -67,7 +68,8 @@ LOCAL_SRC_FILES := ../auto/jsb_cocos2dx_3d_auto.cpp \ ../manual/network/jsb_websocket.cpp \ ../manual/network/XMLHTTPRequest.cpp \ ../manual/spine/jsb_cocos2dx_spine_manual.cpp \ - ../manual/ui/jsb_cocos2dx_ui_manual.cpp + ../manual/ui/jsb_cocos2dx_ui_manual.cpp \ + ../manual/experimental/jsb_cocos2dx_experimental_manual.cpp LOCAL_CFLAGS := -DCOCOS2D_JAVASCRIPT 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 1cb63bee57..e47c621376 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 */; }; + 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 */; }; + 42AD256F1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 42AD256B1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp */; }; + 42AD25731AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42AD25711AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.cpp */; }; + 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 */; }; 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 */; }; @@ -255,6 +263,10 @@ 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 = ""; }; + 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 = ""; }; 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 = ""; }; @@ -322,6 +334,8 @@ 1A119E2E18BDF19200352BAA /* auto */ = { isa = PBXGroup; children = ( + 42AD256A1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.cpp */, + 42AD256B1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp */, 420BBCEE1AA48EDE00493976 /* jsb_cocos2dx_3d_auto.cpp */, 420BBCEF1AA48EDE00493976 /* jsb_cocos2dx_3d_auto.hpp */, BAEE4D6F1AC3FFAD003BEB0F /* jsb_cocos2dx_3d_extension_auto.cpp */, @@ -348,6 +362,7 @@ 1A119E4118BDF19200352BAA /* manual */ = { isa = PBXGroup; children = ( + 42AD25701AFF9DFC000176E2 /* experimental */, 420BBCF41AA48EE900493976 /* 3d */, 0541A74C1973876100E45470 /* ios */, 1A119E4218BDF19200352BAA /* chipmunk */, @@ -523,6 +538,15 @@ path = 3d; sourceTree = ""; }; + 42AD25701AFF9DFC000176E2 /* experimental */ = { + isa = PBXGroup; + children = ( + 42AD25711AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.cpp */, + 42AD25721AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h */, + ); + name = experimental; + sourceTree = ""; + }; BA623DFB191A192700761F37 /* pluginx */ = { isa = PBXGroup; children = ( @@ -575,8 +599,10 @@ 1A119EEF18BDF19200352BAA /* js_bindings_system_functions.h in Headers */, 1A119EDD18BDF19200352BAA /* js_manual_conversions.h in Headers */, 1A119EFD18BDF19200352BAA /* XMLHTTPRequest.h in Headers */, + 42AD25751AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h in Headers */, 1AB5E63518D05BF30088DAA4 /* jsb_cocos2dx_ui_manual.h in Headers */, 1A119EE318BDF19200352BAA /* jsb_opengl_functions.h in Headers */, + 42AD256E1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp in Headers */, 0541A74F1973876100E45470 /* JavaScriptObjCBridge.h in Headers */, 1AB5E62D18D05BC80088DAA4 /* jsb_cocos2dx_ui_auto.hpp in Headers */, 420BBCF91AA48EE900493976 /* jsb_cocos2dx_3d_manual.h in Headers */, @@ -611,6 +637,7 @@ 1A119EB618BDF19200352BAA /* js_bindings_chipmunk_manual.h in Headers */, 1A119EFA18BDF19200352BAA /* jsb_websocket.h in Headers */, 1A119E9218BDF19200352BAA /* jsb_cocos2dx_extension_auto.hpp in Headers */, + 42AD25761AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h in Headers */, 1A119E8C18BDF19200352BAA /* jsb_cocos2dx_builder_auto.hpp in Headers */, BA623E19191A196F00761F37 /* jsb_cocos2dx_pluginx_auto.hpp in Headers */, 1A119EAA18BDF19200352BAA /* js_bindings_chipmunk_auto_classes.h in Headers */, @@ -625,6 +652,7 @@ 1A119ECC18BDF19200352BAA /* jsb_cocos2dx_extension_manual.h in Headers */, 1A119EF018BDF19200352BAA /* js_bindings_system_functions.h in Headers */, 1A119EDE18BDF19200352BAA /* js_manual_conversions.h in Headers */, + 42AD256F1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp in Headers */, 1A119EFE18BDF19200352BAA /* XMLHTTPRequest.h in Headers */, 1AB5E63618D05BF30088DAA4 /* jsb_cocos2dx_ui_manual.h in Headers */, 1A119EE418BDF19200352BAA /* jsb_opengl_functions.h in Headers */, @@ -724,11 +752,13 @@ 0541A7501973876100E45470 /* JavaScriptObjCBridge.mm in Sources */, 1A119EB318BDF19200352BAA /* js_bindings_chipmunk_manual.cpp in Sources */, 1A119EE918BDF19200352BAA /* jsb_opengl_registration.cpp in Sources */, + 42AD25731AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.cpp in Sources */, 1A119EF718BDF19200352BAA /* jsb_websocket.cpp in Sources */, 1A119ED318BDF19200352BAA /* js_bindings_core.cpp in Sources */, 1A119EC118BDF19200352BAA /* js_bindings_ccbreader.cpp in Sources */, 1A119EFB18BDF19200352BAA /* XMLHTTPRequest.cpp in Sources */, BAEE4D711AC3FFAD003BEB0F /* jsb_cocos2dx_3d_extension_auto.cpp in Sources */, + 42AD256C1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.cpp in Sources */, 1A119EC518BDF19200352BAA /* jsb_cocos2dx_studio_manual.cpp in Sources */, 1A119E8F18BDF19200352BAA /* jsb_cocos2dx_extension_auto.cpp in Sources */, 1A119ED718BDF19200352BAA /* js_bindings_opengl.cpp in Sources */, @@ -777,10 +807,12 @@ 1AB5E62C18D05BC80088DAA4 /* jsb_cocos2dx_ui_auto.cpp in Sources */, 1A119E9C18BDF19200352BAA /* jsb_cocos2dx_spine_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 */, 1A119EE618BDF19200352BAA /* jsb_opengl_manual.cpp in Sources */, 1A119F0618BDF19200352BAA /* jsb_cocos2dx_spine_manual.cpp in Sources */, BA623E0F191A195F00761F37 /* jsb_pluginx_manual_protocols.cpp in Sources */, + 42AD25741AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.cpp in Sources */, BA623E13191A195F00761F37 /* pluginxUTF8.cpp in Sources */, BAEE4D721AC3FFAD003BEB0F /* jsb_cocos2dx_3d_extension_auto.cpp in Sources */, 1A119EB818BDF19200352BAA /* js_bindings_chipmunk_registration.cpp in Sources */, diff --git a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj b/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj index d1b868739e..a950a577ab 100644 --- a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj +++ b/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj @@ -15,6 +15,7 @@ + @@ -28,6 +29,7 @@ + @@ -50,6 +52,7 @@ + @@ -66,6 +69,7 @@ + @@ -102,21 +106,19 @@ StaticLibrary true Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp StaticLibrary false Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp diff --git a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters b/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters index 889f76b99f..45f154340e 100644 --- a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters +++ b/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters @@ -36,6 +36,9 @@ {3d1a97d2-47a9-4fc2-8458-a58c4f1fc111} + + {9f37ec66-1e00-4015-baa6-dabdf755f0ff} + @@ -137,6 +140,12 @@ manual\3d + + auto + + + manual\experimental + @@ -259,5 +268,11 @@ manual\3d + + auto + + + manual\experimental + \ 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 1a1d65f4a9..62ccfa022d 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 @@ -18,6 +18,7 @@ + @@ -34,6 +35,7 @@ + @@ -61,6 +63,7 @@ + @@ -74,6 +77,7 @@ + @@ -103,4 +107,4 @@ - + \ No newline at end of file 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 73f33d2237..e83c0ca52b 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 @@ -122,6 +122,12 @@ auto + + auto + + + manual\experimental + @@ -223,6 +229,12 @@ auto + + auto + + + manual\experimental + @@ -261,6 +273,9 @@ {d5fa188f-db09-4c4b-a366-682bf76fcea2} + + {ddd3651e-c6e7-4dea-80c1-a0a3dc51a740} + 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 86bd8f6ab7..f29af54e8d 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 @@ -150,7 +150,7 @@ cc.Scale9Sprite.prototype._ctor = function(file, rect, capInsets){ this.initWithFile(file, rect, capInsets); } }else{ - this.init(); + cc.Node.prototype.init.call(this); } }; diff --git a/cocos/scripting/js-bindings/script/debugger/actors/script.js b/cocos/scripting/js-bindings/script/debugger/actors/script.js index 871a76d56e..853fc1ce7a 100644 --- a/cocos/scripting/js-bindings/script/debugger/actors/script.js +++ b/cocos/scripting/js-bindings/script/debugger/actors/script.js @@ -2679,9 +2679,9 @@ ObjectActor.prototype = { "type": "object", "class": this.obj.class, "actor": this.actorID, - "extensible": this.obj.isExtensible(), - "frozen": this.obj.isFrozen(), - "sealed": this.obj.isSealed() + "extensible": this.obj.isExtensible && typeof this.obj.isExtensible == 'function' ? this.obj.isExtensible() : true, + "frozen": this.obj.isFrozen && typeof this.obj.isFrozen == 'function' ? this.obj.isFrozen() : false, + "sealed": this.obj.isSealed && typeof this.obj.isSealed == 'function' ? this.obj.isSealed() : false }; // Add additional properties for functions. diff --git a/cocos/scripting/js-bindings/script/jsb_cocos2d.js b/cocos/scripting/js-bindings/script/jsb_cocos2d.js index f97e120f39..f3ede487b4 100644 --- a/cocos/scripting/js-bindings/script/jsb_cocos2d.js +++ b/cocos/scripting/js-bindings/script/jsb_cocos2d.js @@ -246,8 +246,8 @@ cc.EventMouse.UP = 2; cc.EventMouse.MOVE = 3; cc.EventMouse.SCROLL = 4; cc.EventMouse.BUTTON_LEFT = 0; -cc.EventMouse.BUTTON_RIGHT = 2; -cc.EventMouse.BUTTON_MIDDLE = 1; +cc.EventMouse.BUTTON_RIGHT = 1; +cc.EventMouse.BUTTON_MIDDLE = 2; cc.EventMouse.BUTTON_4 = 3; cc.EventMouse.BUTTON_5 = 4; cc.EventMouse.BUTTON_6 = 5; diff --git a/cocos/scripting/js-bindings/script/jsb_property_apis.js b/cocos/scripting/js-bindings/script/jsb_property_apis.js index e80bc6aa33..41860118c3 100644 --- a/cocos/scripting/js-bindings/script/jsb_property_apis.js +++ b/cocos/scripting/js-bindings/script/jsb_property_apis.js @@ -250,7 +250,6 @@ cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture); _proto = cc.Texture2D.prototype; cc.defineGetterSetter(_proto, "name", _proto.getName); cc.defineGetterSetter(_proto, "pixelFormat", _proto.getPixelFormat); -cc.defineGetterSetter(_proto, "defaultPixelFormat", _proto.getDefaultAlphaPixelFormat, _proto.setDefaultAlphaPixelFormat); cc.defineGetterSetter(_proto, "pixelsWidth", _proto.getPixelsWide); cc.defineGetterSetter(_proto, "pixelsHeight", _proto.getPixelsHigh); cc.defineGetterSetter(_proto, "width", _proto._getWidth); @@ -258,6 +257,7 @@ cc.defineGetterSetter(_proto, "height", _proto._getHeight); cc.defineGetterSetter(_proto, "shaderProgram", _proto.getShaderProgram, _proto.setShaderProgram); cc.defineGetterSetter(_proto, "maxS", _proto.getMaxS, _proto.setMaxS); cc.defineGetterSetter(_proto, "maxT", _proto.getMaxT, _proto.setMaxT); +cc.defineGetterSetter(cc.Texture2D, "defaultPixelFormat", cc.Texture2D.getDefaultAlphaPixelFormat, cc.Texture2D.setDefaultAlphaPixelFormat); _proto = cc.LabelAtlas.prototype; cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString); diff --git a/cocos/scripting/lua-bindings/auto/api/ActionFloat.lua b/cocos/scripting/lua-bindings/auto/api/ActionFloat.lua new file mode 100644 index 0000000000..6491dc7cbb --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/ActionFloat.lua @@ -0,0 +1,65 @@ + +-------------------------------- +-- @module ActionFloat +-- @extend ActionInterval +-- @parent_module cc + +-------------------------------- +-- +-- @function [parent=#ActionFloat] initWithDuration +-- @param self +-- @param #float duration +-- @param #float from +-- @param #float to +-- @param #function callback +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Creates FloatAction with specified duration, from value, to value and callback to report back
+-- results
+-- param duration of the action
+-- param from value to start from
+-- param to value to be at the end of the action
+-- param callback to report back result
+-- return An autoreleased ActionFloat object +-- @function [parent=#ActionFloat] create +-- @param self +-- @param #float duration +-- @param #float from +-- @param #float to +-- @param #function callback +-- @return ActionFloat#ActionFloat ret (return value: cc.ActionFloat) + +-------------------------------- +-- Overrided ActionInterval methods +-- @function [parent=#ActionFloat] startWithTarget +-- @param self +-- @param #cc.Node target +-- @return ActionFloat#ActionFloat self (return value: cc.ActionFloat) + +-------------------------------- +-- +-- @function [parent=#ActionFloat] clone +-- @param self +-- @return ActionFloat#ActionFloat ret (return value: cc.ActionFloat) + +-------------------------------- +-- +-- @function [parent=#ActionFloat] update +-- @param self +-- @param #float delta +-- @return ActionFloat#ActionFloat self (return value: cc.ActionFloat) + +-------------------------------- +-- +-- @function [parent=#ActionFloat] reverse +-- @param self +-- @return ActionFloat#ActionFloat ret (return value: cc.ActionFloat) + +-------------------------------- +-- +-- @function [parent=#ActionFloat] ActionFloat +-- @param self +-- @return ActionFloat#ActionFloat self (return value: cc.ActionFloat) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua index 30c62788d0..3019ac3e3f 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua @@ -46,13 +46,13 @@ -- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState) -------------------------------- --- @overload self, int, vec4_table, long --- @overload self, string, vec4_table, long +-- @overload self, int, long, vec4_table +-- @overload self, string, long, vec4_table -- @function [parent=#GLProgramState] setUniformVec4v -- @param self -- @param #string uniformName --- @param #vec4_table pointer -- @param #long size +-- @param #vec4_table pointer -- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState) -------------------------------- @@ -73,13 +73,13 @@ -- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState) -------------------------------- --- @overload self, int, vec2_table, long --- @overload self, string, vec2_table, long +-- @overload self, int, long, vec2_table +-- @overload self, string, long, vec2_table -- @function [parent=#GLProgramState] setUniformVec2v -- @param self -- @param #string uniformName --- @param #vec2_table pointer -- @param #long size +-- @param #vec2_table pointer -- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState) -------------------------------- @@ -110,13 +110,13 @@ -- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState) -------------------------------- --- @overload self, int, float, long --- @overload self, string, float, long +-- @overload self, int, long, float +-- @overload self, string, long, float -- @function [parent=#GLProgramState] setUniformFloatv -- @param self -- @param #string uniformName --- @param #float pointer -- @param #long size +-- @param #float pointer -- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState) -------------------------------- @@ -161,13 +161,13 @@ -- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState) -------------------------------- --- @overload self, int, vec3_table, long --- @overload self, string, vec3_table, long +-- @overload self, int, long, vec3_table +-- @overload self, string, long, vec3_table -- @function [parent=#GLProgramState] setUniformVec3v -- @param self -- @param #string uniformName --- @param #vec3_table pointer -- @param #long size +-- @param #vec3_table pointer -- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index 540eb0b25a..7fd90a8953 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -336,12 +336,6 @@ -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) --------------------------------- --- Returns the Material used for this Node --- @function [parent=#Node] getMaterial --- @param self --- @return Material#Material ret (return value: cc.Material) - -------------------------------- -- @overload self, bool -- @overload self @@ -362,13 +356,6 @@ -- @param self -- @return bool#bool ret (return value: bool) --------------------------------- --- Sets the Material used for this Node --- @function [parent=#Node] setMaterial --- @param self --- @param #cc.Material material --- @return Node#Node self (return value: cc.Node) - -------------------------------- -- Sets the parent node.
-- param parent A pointer to the parent node. diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua index c0d06c03e5..5032ba5568 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua @@ -25,6 +25,15 @@ -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) +-------------------------------- +-- Adds a new material to a particular mesh of the sprite.
+-- meshIndex is the mesh that will be applied to.
+-- if meshIndex == -1, then it will be applied to all the meshes that belong to the sprite. +-- @function [parent=#Sprite3D] getMaterial +-- @param self +-- @param #int meshIndex +-- @return Material#Material ret (return value: cc.Material) + -------------------------------- -- -- @function [parent=#Sprite3D] setCullFace diff --git a/cocos/scripting/lua-bindings/auto/api/Terrain.lua b/cocos/scripting/lua-bindings/auto/api/Terrain.lua index c2cad4facf..492776496f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Terrain.lua +++ b/cocos/scripting/lua-bindings/auto/api/Terrain.lua @@ -11,6 +11,44 @@ -- @param #char heightMap -- @return bool#bool ret (return value: bool) +-------------------------------- +-- set the MaxDetailAmount. +-- @function [parent=#Terrain] setMaxDetailMapAmount +-- @param self +-- @param #int maxValue +-- @return Terrain#Terrain self (return value: cc.Terrain) + +-------------------------------- +-- show the wireline instead of the surface,Debug Use only.
+-- Note only support desktop platform +-- @function [parent=#Terrain] setDrawWire +-- @param self +-- @param #bool boolValue +-- @return Terrain#Terrain self (return value: cc.Terrain) + +-------------------------------- +-- Switch frustum Culling Flag
+-- Note frustum culling will remarkable improve your terrain rendering performance. +-- @function [parent=#Terrain] setIsEnableFrustumCull +-- @param self +-- @param #bool boolValue +-- @return Terrain#Terrain self (return value: cc.Terrain) + +-------------------------------- +-- set the Detail Map +-- @function [parent=#Terrain] setDetailMap +-- @param self +-- @param #unsigned int index +-- @param #cc.Terrain::DetailMap detailMap +-- @return Terrain#Terrain self (return value: cc.Terrain) + +-------------------------------- +-- reset the heightmap data. +-- @function [parent=#Terrain] resetHeightMap +-- @param self +-- @param #char heightMap +-- @return Terrain#Terrain self (return value: cc.Terrain) + -------------------------------- -- set the alpha map -- @function [parent=#Terrain] setAlphaMap @@ -44,6 +82,22 @@ -- @param self -- @return bool#bool ret (return value: bool) +-------------------------------- +-- Set threshold distance of each LOD level,must equal or gereater than the chunk size
+-- Note when invoke initHeightMap, the LOD distance will be automatic calculated. +-- @function [parent=#Terrain] setLODDistance +-- @param self +-- @param #float lod1 +-- @param #float lod2 +-- @param #float lod3 +-- @return Terrain#Terrain self (return value: cc.Terrain) + +-------------------------------- +-- get the terrain's size +-- @function [parent=#Terrain] getTerrainSize +-- @param self +-- @return size_table#size_table ret (return value: size_table) + -------------------------------- -- get the normal of the specified pistion in terrain
-- return the normal vector of the specified position of the terrain.
@@ -54,28 +108,12 @@ -- @param #int pixelY -- @return vec3_table#vec3_table ret (return value: vec3_table) --------------------------------- --- show the wireline instead of the surface,Debug Use only.
--- Note only support desktop platform --- @function [parent=#Terrain] setDrawWire --- @param self --- @param #bool boolValue --- @return Terrain#Terrain self (return value: cc.Terrain) - -------------------------------- -- -- @function [parent=#Terrain] reload -- @param self -- @return Terrain#Terrain self (return value: cc.Terrain) --------------------------------- --- set the Detail Map --- @function [parent=#Terrain] setDetailMap --- @param self --- @param #unsigned int index --- @param #cc.Terrain::DetailMap detailMap --- @return Terrain#Terrain self (return value: cc.Terrain) - -------------------------------- -- get height from the raw height filed -- @function [parent=#Terrain] getImageHeight @@ -84,29 +122,6 @@ -- @param #int pixelY -- @return float#float ret (return value: float) --------------------------------- --- get the terrain's mininal height. --- @function [parent=#Terrain] getMinHeight --- @param self --- @return float#float ret (return value: float) - --------------------------------- --- Set threshold distance of each LOD level,must equal or gereater than the chunk size
--- Note when invoke initHeightMap, the LOD distance will be automatic calculated. --- @function [parent=#Terrain] setLODDistance --- @param self --- @param #float lod1 --- @param #float lod2 --- @param #float lod3 --- @return Terrain#Terrain self (return value: cc.Terrain) - --------------------------------- --- reset the heightmap data. --- @function [parent=#Terrain] resetHeightMap --- @param self --- @param #char heightMap --- @return Terrain#Terrain self (return value: cc.Terrain) - -------------------------------- -- get the terrain's maximum height. -- @function [parent=#Terrain] getMaxHeight @@ -114,19 +129,10 @@ -- @return float#float ret (return value: float) -------------------------------- --- set the MaxDetailAmount. --- @function [parent=#Terrain] setMaxDetailMapAmount +-- get the terrain's mininal height. +-- @function [parent=#Terrain] getMinHeight -- @param self --- @param #int maxValue --- @return Terrain#Terrain self (return value: cc.Terrain) - --------------------------------- --- Switch frustum Culling Flag
--- Note frustum culling will remarkable improve your terrain rendering performance. --- @function [parent=#Terrain] setIsEnableFrustumCull --- @param self --- @param #bool boolValue --- @return Terrain#Terrain self (return value: cc.Terrain) +-- @return float#float ret (return value: float) -------------------------------- -- 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 33e6e9aeab..6cb399eff6 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 @@ -11,11 +11,31 @@ -- @field [parent=#cc] Animate3D#Animate3D Animate3D preloaded module +-------------------------------------------------------- +-- the cc AttachNode +-- @field [parent=#cc] AttachNode#AttachNode AttachNode preloaded module + + +-------------------------------------------------------- +-- the cc BillBoard +-- @field [parent=#cc] BillBoard#BillBoard BillBoard preloaded module + + +-------------------------------------------------------- +-- the cc Mesh +-- @field [parent=#cc] Mesh#Mesh Mesh preloaded module + + -------------------------------------------------------- -- the cc Skeleton3D -- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module +-------------------------------------------------------- +-- the cc Skybox +-- @field [parent=#cc] Skybox#Skybox Skybox preloaded module + + -------------------------------------------------------- -- the cc Sprite3D -- @field [parent=#cc] Sprite3D#Sprite3D Sprite3D preloaded module @@ -27,18 +47,8 @@ -------------------------------------------------------- --- the cc Mesh --- @field [parent=#cc] Mesh#Mesh Mesh preloaded module - - --------------------------------------------------------- --- the cc AttachNode --- @field [parent=#cc] AttachNode#AttachNode AttachNode preloaded module - - --------------------------------------------------------- --- the cc BillBoard --- @field [parent=#cc] BillBoard#BillBoard BillBoard preloaded module +-- the cc Terrain +-- @field [parent=#cc] Terrain#Terrain Terrain preloaded module -------------------------------------------------------- @@ -46,14 +56,4 @@ -- @field [parent=#cc] TextureCube#TextureCube TextureCube preloaded module --------------------------------------------------------- --- the cc Skybox --- @field [parent=#cc] Skybox#Skybox Skybox preloaded module - - --------------------------------------------------------- --- the cc Terrain --- @field [parent=#cc] Terrain#Terrain Terrain 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 2ee26644e7..ae55f75851 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 @@ -11,26 +11,6 @@ -- @field [parent=#cc] Console#Console Console preloaded module --------------------------------------------------------- --- the cc Action --- @field [parent=#cc] Action#Action Action preloaded module - - --------------------------------------------------------- --- the cc FiniteTimeAction --- @field [parent=#cc] FiniteTimeAction#FiniteTimeAction FiniteTimeAction preloaded module - - --------------------------------------------------------- --- the cc Speed --- @field [parent=#cc] Speed#Speed Speed preloaded module - - --------------------------------------------------------- --- the cc Follow --- @field [parent=#cc] Follow#Follow Follow preloaded module - - -------------------------------------------------------- -- the cc Texture2D -- @field [parent=#cc] Texture2D#Texture2D Texture2D preloaded module @@ -61,6 +41,56 @@ -- @field [parent=#cc] Node#Node Node preloaded module +-------------------------------------------------------- +-- the cc Scene +-- @field [parent=#cc] Scene#Scene Scene preloaded module + + +-------------------------------------------------------- +-- the cc GLView +-- @field [parent=#cc] GLView#GLView GLView preloaded module + + +-------------------------------------------------------- +-- the cc Director +-- @field [parent=#cc] Director#Director Director preloaded module + + +-------------------------------------------------------- +-- the cc Timer +-- @field [parent=#cc] Timer#Timer Timer preloaded module + + +-------------------------------------------------------- +-- the cc Scheduler +-- @field [parent=#cc] Scheduler#Scheduler Scheduler preloaded module + + +-------------------------------------------------------- +-- the cc AsyncTaskPool +-- @field [parent=#cc] AsyncTaskPool#AsyncTaskPool AsyncTaskPool preloaded module + + +-------------------------------------------------------- +-- the cc Action +-- @field [parent=#cc] Action#Action Action preloaded module + + +-------------------------------------------------------- +-- the cc FiniteTimeAction +-- @field [parent=#cc] FiniteTimeAction#FiniteTimeAction FiniteTimeAction preloaded module + + +-------------------------------------------------------- +-- the cc Speed +-- @field [parent=#cc] Speed#Speed Speed preloaded module + + +-------------------------------------------------------- +-- the cc Follow +-- @field [parent=#cc] Follow#Follow Follow preloaded module + + -------------------------------------------------------- -- the cc SpriteFrame -- @field [parent=#cc] SpriteFrame#SpriteFrame SpriteFrame preloaded module @@ -207,28 +237,13 @@ -------------------------------------------------------- --- the cc Scene --- @field [parent=#cc] Scene#Scene Scene preloaded module +-- the cc ActionFloat +-- @field [parent=#cc] ActionFloat#ActionFloat ActionFloat preloaded module -------------------------------------------------------- --- the cc GLView --- @field [parent=#cc] GLView#GLView GLView preloaded module - - --------------------------------------------------------- --- the cc Director --- @field [parent=#cc] Director#Director Director preloaded module - - --------------------------------------------------------- --- the cc Timer --- @field [parent=#cc] Timer#Timer Timer preloaded module - - --------------------------------------------------------- --- the cc Scheduler --- @field [parent=#cc] Scheduler#Scheduler Scheduler preloaded module +-- the cc UserDefault +-- @field [parent=#cc] UserDefault#UserDefault UserDefault preloaded module -------------------------------------------------------- @@ -237,8 +252,13 @@ -------------------------------------------------------- --- the cc UserDefault --- @field [parent=#cc] UserDefault#UserDefault UserDefault preloaded module +-- the cc EventAcceleration +-- @field [parent=#cc] EventAcceleration#EventAcceleration EventAcceleration preloaded module + + +-------------------------------------------------------- +-- the cc EventCustom +-- @field [parent=#cc] EventCustom#EventCustom EventCustom preloaded module -------------------------------------------------------- @@ -252,13 +272,23 @@ -------------------------------------------------------- --- the cc EventListenerTouchOneByOne --- @field [parent=#cc] EventListenerTouchOneByOne#EventListenerTouchOneByOne EventListenerTouchOneByOne preloaded module +-- the cc EventFocus +-- @field [parent=#cc] EventFocus#EventFocus EventFocus preloaded module -------------------------------------------------------- --- the cc EventListenerTouchAllAtOnce --- @field [parent=#cc] EventListenerTouchAllAtOnce#EventListenerTouchAllAtOnce EventListenerTouchAllAtOnce preloaded module +-- the cc EventListenerAcceleration +-- @field [parent=#cc] EventListenerAcceleration#EventListenerAcceleration EventListenerAcceleration preloaded module + + +-------------------------------------------------------- +-- the cc EventListenerCustom +-- @field [parent=#cc] EventListenerCustom#EventListenerCustom EventListenerCustom preloaded module + + +-------------------------------------------------------- +-- the cc EventListenerFocus +-- @field [parent=#cc] EventListenerFocus#EventListenerFocus EventListenerFocus preloaded module -------------------------------------------------------- @@ -277,33 +307,13 @@ -------------------------------------------------------- --- the cc EventAcceleration --- @field [parent=#cc] EventAcceleration#EventAcceleration EventAcceleration preloaded module +-- the cc EventListenerTouchOneByOne +-- @field [parent=#cc] EventListenerTouchOneByOne#EventListenerTouchOneByOne EventListenerTouchOneByOne preloaded module -------------------------------------------------------- --- the cc EventListenerAcceleration --- @field [parent=#cc] EventListenerAcceleration#EventListenerAcceleration EventListenerAcceleration preloaded module - - --------------------------------------------------------- --- the cc EventCustom --- @field [parent=#cc] EventCustom#EventCustom EventCustom preloaded module - - --------------------------------------------------------- --- the cc EventListenerCustom --- @field [parent=#cc] EventListenerCustom#EventListenerCustom EventListenerCustom preloaded module - - --------------------------------------------------------- --- the cc EventFocus --- @field [parent=#cc] EventFocus#EventFocus EventFocus preloaded module - - --------------------------------------------------------- --- the cc EventListenerFocus --- @field [parent=#cc] EventListenerFocus#EventListenerFocus EventListenerFocus preloaded module +-- the cc EventListenerTouchAllAtOnce +-- @field [parent=#cc] EventListenerTouchAllAtOnce#EventListenerTouchAllAtOnce EventListenerTouchAllAtOnce preloaded module -------------------------------------------------------- @@ -317,8 +327,23 @@ -------------------------------------------------------- --- the cc ActionManager --- @field [parent=#cc] ActionManager#ActionManager ActionManager preloaded module +-- the cc CardinalSplineTo +-- @field [parent=#cc] CardinalSplineTo#CardinalSplineTo CardinalSplineTo preloaded module + + +-------------------------------------------------------- +-- the cc CardinalSplineBy +-- @field [parent=#cc] CardinalSplineBy#CardinalSplineBy CardinalSplineBy preloaded module + + +-------------------------------------------------------- +-- the cc CatmullRomTo +-- @field [parent=#cc] CatmullRomTo#CatmullRomTo CatmullRomTo preloaded module + + +-------------------------------------------------------- +-- the cc CatmullRomBy +-- @field [parent=#cc] CatmullRomBy#CatmullRomBy CatmullRomBy preloaded module -------------------------------------------------------- @@ -626,6 +651,11 @@ -- @field [parent=#cc] Twirl#Twirl Twirl preloaded module +-------------------------------------------------------- +-- the cc ActionManager +-- @field [parent=#cc] ActionManager#ActionManager ActionManager preloaded module + + -------------------------------------------------------- -- the cc PageTurn3D -- @field [parent=#cc] PageTurn3D#PageTurn3D PageTurn3D preloaded module @@ -706,31 +736,6 @@ -- @field [parent=#cc] ActionTween#ActionTween ActionTween preloaded module --------------------------------------------------------- --- the cc CardinalSplineTo --- @field [parent=#cc] CardinalSplineTo#CardinalSplineTo CardinalSplineTo preloaded module - - --------------------------------------------------------- --- the cc CardinalSplineBy --- @field [parent=#cc] CardinalSplineBy#CardinalSplineBy CardinalSplineBy preloaded module - - --------------------------------------------------------- --- the cc CatmullRomTo --- @field [parent=#cc] CatmullRomTo#CatmullRomTo CatmullRomTo preloaded module - - --------------------------------------------------------- --- the cc CatmullRomBy --- @field [parent=#cc] CatmullRomBy#CatmullRomBy CatmullRomBy preloaded module - - --------------------------------------------------------- --- the cc ProtectedNode --- @field [parent=#cc] ProtectedNode#ProtectedNode ProtectedNode preloaded module - - -------------------------------------------------------- -- the cc GLProgramState -- @field [parent=#cc] GLProgramState#GLProgramState GLProgramState preloaded module @@ -742,13 +747,18 @@ -------------------------------------------------------- --- the cc DrawNode --- @field [parent=#cc] DrawNode#DrawNode DrawNode preloaded module +-- the cc ClippingNode +-- @field [parent=#cc] ClippingNode#ClippingNode ClippingNode preloaded module -------------------------------------------------------- --- the cc LabelAtlas --- @field [parent=#cc] LabelAtlas#LabelAtlas LabelAtlas preloaded module +-- the cc ClippingRectangleNode +-- @field [parent=#cc] ClippingRectangleNode#ClippingRectangleNode ClippingRectangleNode preloaded module + + +-------------------------------------------------------- +-- the cc DrawNode +-- @field [parent=#cc] DrawNode#DrawNode DrawNode preloaded module -------------------------------------------------------- @@ -761,6 +771,11 @@ -- @field [parent=#cc] Label#Label Label preloaded module +-------------------------------------------------------- +-- the cc LabelAtlas +-- @field [parent=#cc] LabelAtlas#LabelAtlas LabelAtlas preloaded module + + -------------------------------------------------------- -- the cc Layer -- @field [parent=#cc] Layer#Layer Layer preloaded module @@ -781,6 +796,151 @@ -- @field [parent=#cc] LayerMultiplex#LayerMultiplex LayerMultiplex preloaded module +-------------------------------------------------------- +-- the cc MenuItem +-- @field [parent=#cc] MenuItem#MenuItem MenuItem preloaded module + + +-------------------------------------------------------- +-- the cc MenuItemLabel +-- @field [parent=#cc] MenuItemLabel#MenuItemLabel MenuItemLabel preloaded module + + +-------------------------------------------------------- +-- the cc MenuItemAtlasFont +-- @field [parent=#cc] MenuItemAtlasFont#MenuItemAtlasFont MenuItemAtlasFont preloaded module + + +-------------------------------------------------------- +-- the cc MenuItemFont +-- @field [parent=#cc] MenuItemFont#MenuItemFont MenuItemFont preloaded module + + +-------------------------------------------------------- +-- the cc MenuItemSprite +-- @field [parent=#cc] MenuItemSprite#MenuItemSprite MenuItemSprite preloaded module + + +-------------------------------------------------------- +-- the cc MenuItemImage +-- @field [parent=#cc] MenuItemImage#MenuItemImage MenuItemImage preloaded module + + +-------------------------------------------------------- +-- the cc MenuItemToggle +-- @field [parent=#cc] MenuItemToggle#MenuItemToggle MenuItemToggle preloaded module + + +-------------------------------------------------------- +-- the cc Menu +-- @field [parent=#cc] Menu#Menu Menu preloaded module + + +-------------------------------------------------------- +-- the cc MotionStreak +-- @field [parent=#cc] MotionStreak#MotionStreak MotionStreak preloaded module + + +-------------------------------------------------------- +-- the cc NodeGrid +-- @field [parent=#cc] NodeGrid#NodeGrid NodeGrid preloaded module + + +-------------------------------------------------------- +-- the cc ParticleBatchNode +-- @field [parent=#cc] ParticleBatchNode#ParticleBatchNode ParticleBatchNode preloaded module + + +-------------------------------------------------------- +-- the cc ParticleSystem +-- @field [parent=#cc] ParticleSystem#ParticleSystem ParticleSystem preloaded module + + +-------------------------------------------------------- +-- the cc ParticleSystemQuad +-- @field [parent=#cc] ParticleSystemQuad#ParticleSystemQuad ParticleSystemQuad preloaded module + + +-------------------------------------------------------- +-- the cc ParticleFire +-- @field [parent=#cc] ParticleFire#ParticleFire ParticleFire preloaded module + + +-------------------------------------------------------- +-- the cc ParticleFireworks +-- @field [parent=#cc] ParticleFireworks#ParticleFireworks ParticleFireworks preloaded module + + +-------------------------------------------------------- +-- the cc ParticleSun +-- @field [parent=#cc] ParticleSun#ParticleSun ParticleSun preloaded module + + +-------------------------------------------------------- +-- the cc ParticleGalaxy +-- @field [parent=#cc] ParticleGalaxy#ParticleGalaxy ParticleGalaxy preloaded module + + +-------------------------------------------------------- +-- the cc ParticleFlower +-- @field [parent=#cc] ParticleFlower#ParticleFlower ParticleFlower preloaded module + + +-------------------------------------------------------- +-- the cc ParticleMeteor +-- @field [parent=#cc] ParticleMeteor#ParticleMeteor ParticleMeteor preloaded module + + +-------------------------------------------------------- +-- the cc ParticleSpiral +-- @field [parent=#cc] ParticleSpiral#ParticleSpiral ParticleSpiral preloaded module + + +-------------------------------------------------------- +-- the cc ParticleExplosion +-- @field [parent=#cc] ParticleExplosion#ParticleExplosion ParticleExplosion preloaded module + + +-------------------------------------------------------- +-- the cc ParticleSmoke +-- @field [parent=#cc] ParticleSmoke#ParticleSmoke ParticleSmoke preloaded module + + +-------------------------------------------------------- +-- the cc ParticleSnow +-- @field [parent=#cc] ParticleSnow#ParticleSnow ParticleSnow preloaded module + + +-------------------------------------------------------- +-- the cc ParticleRain +-- @field [parent=#cc] ParticleRain#ParticleRain ParticleRain preloaded module + + +-------------------------------------------------------- +-- the cc ProgressTimer +-- @field [parent=#cc] ProgressTimer#ProgressTimer ProgressTimer preloaded module + + +-------------------------------------------------------- +-- the cc ProtectedNode +-- @field [parent=#cc] ProtectedNode#ProtectedNode ProtectedNode preloaded module + + +-------------------------------------------------------- +-- the cc Sprite +-- @field [parent=#cc] Sprite#Sprite Sprite preloaded module + + +-------------------------------------------------------- +-- the cc Image +-- @field [parent=#cc] Image#Image Image preloaded module + + +-------------------------------------------------------- +-- the cc RenderTexture +-- @field [parent=#cc] RenderTexture#RenderTexture RenderTexture preloaded module + + -------------------------------------------------------- -- the cc TransitionEaseScene -- @field [parent=#cc] TransitionEaseScene#TransitionEaseScene TransitionEaseScene preloaded module @@ -967,153 +1127,8 @@ -------------------------------------------------------- --- the cc MenuItem --- @field [parent=#cc] MenuItem#MenuItem MenuItem preloaded module - - --------------------------------------------------------- --- the cc MenuItemLabel --- @field [parent=#cc] MenuItemLabel#MenuItemLabel MenuItemLabel preloaded module - - --------------------------------------------------------- --- the cc MenuItemAtlasFont --- @field [parent=#cc] MenuItemAtlasFont#MenuItemAtlasFont MenuItemAtlasFont preloaded module - - --------------------------------------------------------- --- the cc MenuItemFont --- @field [parent=#cc] MenuItemFont#MenuItemFont MenuItemFont preloaded module - - --------------------------------------------------------- --- the cc MenuItemSprite --- @field [parent=#cc] MenuItemSprite#MenuItemSprite MenuItemSprite preloaded module - - --------------------------------------------------------- --- the cc MenuItemImage --- @field [parent=#cc] MenuItemImage#MenuItemImage MenuItemImage preloaded module - - --------------------------------------------------------- --- the cc MenuItemToggle --- @field [parent=#cc] MenuItemToggle#MenuItemToggle MenuItemToggle preloaded module - - --------------------------------------------------------- --- the cc Menu --- @field [parent=#cc] Menu#Menu Menu preloaded module - - --------------------------------------------------------- --- the cc ClippingNode --- @field [parent=#cc] ClippingNode#ClippingNode ClippingNode preloaded module - - --------------------------------------------------------- --- the cc ClippingRectangleNode --- @field [parent=#cc] ClippingRectangleNode#ClippingRectangleNode ClippingRectangleNode preloaded module - - --------------------------------------------------------- --- the cc MotionStreak --- @field [parent=#cc] MotionStreak#MotionStreak MotionStreak preloaded module - - --------------------------------------------------------- --- the cc ProgressTimer --- @field [parent=#cc] ProgressTimer#ProgressTimer ProgressTimer preloaded module - - --------------------------------------------------------- --- the cc Sprite --- @field [parent=#cc] Sprite#Sprite Sprite preloaded module - - --------------------------------------------------------- --- the cc Image --- @field [parent=#cc] Image#Image Image preloaded module - - --------------------------------------------------------- --- the cc RenderTexture --- @field [parent=#cc] RenderTexture#RenderTexture RenderTexture preloaded module - - --------------------------------------------------------- --- the cc NodeGrid --- @field [parent=#cc] NodeGrid#NodeGrid NodeGrid preloaded module - - --------------------------------------------------------- --- the cc ParticleBatchNode --- @field [parent=#cc] ParticleBatchNode#ParticleBatchNode ParticleBatchNode preloaded module - - --------------------------------------------------------- --- the cc ParticleSystem --- @field [parent=#cc] ParticleSystem#ParticleSystem ParticleSystem preloaded module - - --------------------------------------------------------- --- the cc ParticleSystemQuad --- @field [parent=#cc] ParticleSystemQuad#ParticleSystemQuad ParticleSystemQuad preloaded module - - --------------------------------------------------------- --- the cc ParticleFire --- @field [parent=#cc] ParticleFire#ParticleFire ParticleFire preloaded module - - --------------------------------------------------------- --- the cc ParticleFireworks --- @field [parent=#cc] ParticleFireworks#ParticleFireworks ParticleFireworks preloaded module - - --------------------------------------------------------- --- the cc ParticleSun --- @field [parent=#cc] ParticleSun#ParticleSun ParticleSun preloaded module - - --------------------------------------------------------- --- the cc ParticleGalaxy --- @field [parent=#cc] ParticleGalaxy#ParticleGalaxy ParticleGalaxy preloaded module - - --------------------------------------------------------- --- the cc ParticleFlower --- @field [parent=#cc] ParticleFlower#ParticleFlower ParticleFlower preloaded module - - --------------------------------------------------------- --- the cc ParticleMeteor --- @field [parent=#cc] ParticleMeteor#ParticleMeteor ParticleMeteor preloaded module - - --------------------------------------------------------- --- the cc ParticleSpiral --- @field [parent=#cc] ParticleSpiral#ParticleSpiral ParticleSpiral preloaded module - - --------------------------------------------------------- --- the cc ParticleExplosion --- @field [parent=#cc] ParticleExplosion#ParticleExplosion ParticleExplosion preloaded module - - --------------------------------------------------------- --- the cc ParticleSmoke --- @field [parent=#cc] ParticleSmoke#ParticleSmoke ParticleSmoke preloaded module - - --------------------------------------------------------- --- the cc ParticleSnow --- @field [parent=#cc] ParticleSnow#ParticleSnow ParticleSnow preloaded module - - --------------------------------------------------------- --- the cc ParticleRain --- @field [parent=#cc] ParticleRain#ParticleRain ParticleRain preloaded module +-- the cc Camera +-- @field [parent=#cc] Camera#Camera Camera preloaded module -------------------------------------------------------- @@ -1131,11 +1146,6 @@ -- @field [parent=#cc] TiledGrid3D#TiledGrid3D TiledGrid3D preloaded module --------------------------------------------------------- --- the cc Camera --- @field [parent=#cc] Camera#Camera Camera preloaded module - - -------------------------------------------------------- -- the cc BaseLight -- @field [parent=#cc] BaseLight#BaseLight BaseLight preloaded module @@ -1246,11 +1256,6 @@ -- @field [parent=#cc] Component#Component Component preloaded module --------------------------------------------------------- --- the cc AsyncTaskPool --- @field [parent=#cc] AsyncTaskPool#AsyncTaskPool AsyncTaskPool preloaded module - - -------------------------------------------------------- -- the cc SpritePolygonCache -- @field [parent=#cc] SpritePolygonCache#SpritePolygonCache SpritePolygonCache preloaded module 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 5a8644d60f..39cde04239 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -1080,1160 +1080,46 @@ int lua_register_cocos2dx_3d_Animate3D(lua_State* tolua_S) return 1; } -int lua_cocos2dx_3d_Skeleton3D_removeAllBones(lua_State* tolua_S) +int lua_cocos2dx_3d_AttachNode_create(lua_State* tolua_S) { int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif - #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertable(tolua_S,1,"cc.AttachNode",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + argc = lua_gettop(tolua_S) - 1; -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_removeAllBones'", 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_Skeleton3D_removeAllBones'", nullptr); - return 0; - } - cobj->removeAllBones(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:removeAllBones",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_removeAllBones'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_addBone(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_addBone'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 1) { cocos2d::Bone3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_addBone'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_AttachNode_create'", nullptr); return 0; } - cobj->addBone(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:addBone",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_addBone'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", 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.Skeleton3D:getBoneByName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", nullptr); - return 0; - } - cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootBone(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", 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.Skeleton3D:getRootBone"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", nullptr); - return 0; - } - cocos2d::Bone3D* ret = cobj->getRootBone(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootBone",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", 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_Skeleton3D_updateBoneMatrix'", nullptr); - return 0; - } - cobj->updateBoneMatrix(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:updateBoneMatrix",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", 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.Skeleton3D:getBoneByIndex"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", nullptr); - return 0; - } - cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'", 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_Skeleton3D_getRootCount'", nullptr); - return 0; - } - ssize_t ret = cobj->getRootCount(); - 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.Skeleton3D:getRootCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Bone3D* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); - return 0; - } - int ret = cobj->getBoneIndex(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.Skeleton3D:getBoneIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", 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_Skeleton3D_getBoneCount'", nullptr); - return 0; - } - ssize_t ret = cobj->getBoneCount(); - 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.Skeleton3D:getBoneCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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_Skeleton3D_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::Skeleton3D(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Skeleton3D"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:Skeleton3D",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_3d_Skeleton3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Skeleton3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Skeleton3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Skeleton3D"); - tolua_cclass(tolua_S,"Skeleton3D","cc.Skeleton3D","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Skeleton3D"); - tolua_function(tolua_S,"new",lua_cocos2dx_3d_Skeleton3D_constructor); - tolua_function(tolua_S,"removeAllBones",lua_cocos2dx_3d_Skeleton3D_removeAllBones); - tolua_function(tolua_S,"addBone",lua_cocos2dx_3d_Skeleton3D_addBone); - tolua_function(tolua_S,"getBoneByName",lua_cocos2dx_3d_Skeleton3D_getBoneByName); - tolua_function(tolua_S,"getRootBone",lua_cocos2dx_3d_Skeleton3D_getRootBone); - tolua_function(tolua_S,"updateBoneMatrix",lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix); - tolua_function(tolua_S,"getBoneByIndex",lua_cocos2dx_3d_Skeleton3D_getBoneByIndex); - tolua_function(tolua_S,"getRootCount",lua_cocos2dx_3d_Skeleton3D_getRootCount); - tolua_function(tolua_S,"getBoneIndex",lua_cocos2dx_3d_Skeleton3D_getBoneIndex); - tolua_function(tolua_S,"getBoneCount",lua_cocos2dx_3d_Skeleton3D_getBoneCount); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Skeleton3D).name(); - g_luaType[typeName] = "cc.Skeleton3D"; - g_typeCast["Skeleton3D"] = "cc.Skeleton3D"; - return 1; -} - -int lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFaceEnabled"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); - return 0; - } - cobj->setCullFaceEnabled(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFaceEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - cobj->setTexture(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:setTexture"); - - if (!ok) { break; } - cobj->setTexture(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.Sprite3D:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getLightMask(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getLightMask'", 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_Sprite3D_getLightMask'", nullptr); - return 0; - } - unsigned int ret = cobj->getLightMask(); - 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.Sprite3D:getLightMask",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getLightMask'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", 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.Sprite3D:setCullFace"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); - return 0; - } - cobj->setCullFace(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'", 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_Sprite3D_removeAllAttachNode'", nullptr); - return 0; - } - cobj->removeAllAttachNode(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAllAttachNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setMaterial(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setMaterial'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Material* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Sprite3D:setMaterial"); - - if (!ok) { break; } - cobj->setMaterial(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Material* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0); - - if (!ok) { break; } - cobj->setMaterial(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.Sprite3D:setMaterial",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setMaterial'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMesh'", 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_Sprite3D_getMesh'", nullptr); - return 0; - } - cocos2d::Mesh* ret = cobj->getMesh(); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMesh",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMesh'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshCount'", 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_Sprite3D_getMeshCount'", nullptr); - return 0; - } - ssize_t ret = cobj->getMeshCount(); - 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.Sprite3D:getMeshCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", 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.Sprite3D:getMeshByIndex"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", nullptr); - return 0; - } - cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_isForceDepthWrite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_isForceDepthWrite'", 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_Sprite3D_isForceDepthWrite'", nullptr); - return 0; - } - bool ret = cobj->isForceDepthWrite(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:isForceDepthWrite",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_isForceDepthWrite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'", 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_Sprite3D_getBlendFunc'", nullptr); - return 0; - } - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setLightMask(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setLightMask'", 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.Sprite3D:setLightMask"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setLightMask'", nullptr); - return 0; - } - cobj->setLightMask(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setLightMask",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setLightMask'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", 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.Sprite3D:getAttachNode"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", nullptr); - return 0; - } - cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); + cocos2d::AttachNode* ret = cocos2d::AttachNode::create(arg0); object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getAttachNode",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AttachNode:create",argc, 1); return 0; - #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AttachNode_create'.",&tolua_err); #endif - return 0; } -int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) +int lua_cocos2dx_3d_AttachNode_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; + cocos2d::AttachNode* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -2241,49 +1127,57 @@ int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) #endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); - return 0; - } -#endif argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 0) { - cocos2d::BlendFunc arg0; - - ok &= luaval_to_blendfunc(tolua_S, 2, &arg0, "cc.Sprite3D:setBlendFunc"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_AttachNode_constructor'", nullptr); return 0; } - cobj->setBlendFunc(arg0); - lua_settop(tolua_S, 1); + cobj = new cocos2d::AttachNode(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.AttachNode"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setBlendFunc",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.AttachNode:AttachNode",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AttachNode_constructor'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) + +static int lua_cocos2dx_3d_AttachNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (AttachNode)"); + return 0; +} + +int lua_register_cocos2dx_3d_AttachNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.AttachNode"); + tolua_cclass(tolua_S,"AttachNode","cc.AttachNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"AttachNode"); + tolua_function(tolua_S,"new",lua_cocos2dx_3d_AttachNode_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_3d_AttachNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::AttachNode).name(); + g_luaType[typeName] = "cc.AttachNode"; + g_typeCast["AttachNode"] = "cc.AttachNode"; + return 1; +} + +int lua_cocos2dx_3d_BillBoard_getMode(lua_State* tolua_S) { int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; + cocos2d::BillBoard* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -2292,65 +1186,15 @@ int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.BillBoard",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::BillBoard*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", 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.Sprite3D:removeAttachNode"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", nullptr); - return 0; - } - cobj->removeAttachNode(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_BillBoard_getMode'", nullptr); return 0; } #endif @@ -2360,27 +1204,27 @@ int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_getMode'", nullptr); return 0; } - cocos2d::Skeleton3D* ret = cobj->getSkeleton(); - object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); + int ret = (int)cobj->getMode(); + 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.Sprite3D:getSkeleton",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.BillBoard:getMode",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_getMode'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_3d_Sprite3D_setForceDepthWrite(lua_State* tolua_S) +int lua_cocos2dx_3d_BillBoard_setMode(lua_State* tolua_S) { int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; + cocos2d::BillBoard* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -2389,15 +1233,15 @@ int lua_cocos2dx_3d_Sprite3D_setForceDepthWrite(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.BillBoard",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::BillBoard*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setForceDepthWrite'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_BillBoard_setMode'", nullptr); return 0; } #endif @@ -2405,79 +1249,29 @@ int lua_cocos2dx_3d_Sprite3D_setForceDepthWrite(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - bool arg0; + cocos2d::BillBoard::Mode arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setForceDepthWrite"); + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.BillBoard:setMode"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setForceDepthWrite'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_setMode'", nullptr); return 0; } - cobj->setForceDepthWrite(arg0); + cobj->setMode(arg0); lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setForceDepthWrite",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.BillBoard:setMode",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setForceDepthWrite'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_setMode'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_3d_Sprite3D_getMeshByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", 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.Sprite3D:getMeshByName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", nullptr); - return 0; - } - cocos2d::Mesh* ret = cobj->getMeshByName(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_create(lua_State* tolua_S) +int lua_cocos2dx_3d_BillBoard_create(lua_State* tolua_S) { int argc = 0; bool ok = true; @@ -2486,7 +1280,7 @@ int lua_cocos2dx_3d_Sprite3D_create(lua_State* tolua_S) #endif #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertable(tolua_S,1,"cc.BillBoard",0,&tolua_err)) goto tolua_lerror; #endif argc = lua_gettop(tolua_S)-1; @@ -2496,20 +1290,10 @@ int lua_cocos2dx_3d_Sprite3D_create(lua_State* tolua_S) if (argc == 1) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.BillBoard:create"); if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 0) - { - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0); + object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); return 1; } } while (0); @@ -2519,161 +1303,84 @@ int lua_cocos2dx_3d_Sprite3D_create(lua_State* tolua_S) if (argc == 2) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.BillBoard:create"); if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:create"); + cocos2d::BillBoard::Mode arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.BillBoard:create"); if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); return 1; } } while (0); ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Sprite3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Sprite3D"); - tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"Sprite3D"); - tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Sprite3D_setTexture); - tolua_function(tolua_S,"getLightMask",lua_cocos2dx_3d_Sprite3D_getLightMask); - tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace); - tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode); - tolua_function(tolua_S,"setMaterial",lua_cocos2dx_3d_Sprite3D_setMaterial); - tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh); - tolua_function(tolua_S,"getMeshCount",lua_cocos2dx_3d_Sprite3D_getMeshCount); - tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex); - tolua_function(tolua_S,"isForceDepthWrite",lua_cocos2dx_3d_Sprite3D_isForceDepthWrite); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Sprite3D_getBlendFunc); - tolua_function(tolua_S,"setLightMask",lua_cocos2dx_3d_Sprite3D_setLightMask); - tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Sprite3D_setBlendFunc); - tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_Sprite3D_removeAttachNode); - tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_Sprite3D_getSkeleton); - tolua_function(tolua_S,"setForceDepthWrite",lua_cocos2dx_3d_Sprite3D_setForceDepthWrite); - tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Sprite3D).name(); - g_luaType[typeName] = "cc.Sprite3D"; - g_typeCast["Sprite3D"] = "cc.Sprite3D"; - return 1; -} - -int lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3DCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3DCache",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3DCache*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) + do { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData'", 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.Sprite3DCache:removeSprite3DData"); - if(!ok) + if (argc == 0) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData'", nullptr); - return 0; + cocos2d::BillBoard* ret = cocos2d::BillBoard::create(); + object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); + return 1; } - cobj->removeSprite3DData(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3DCache:removeSprite3DData",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3DCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3DCache",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3DCache*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) + } while (0); + ok = true; + do { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) + if (argc == 1) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData'", nullptr); - return 0; + cocos2d::BillBoard::Mode arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.BillBoard:create"); + if (!ok) { break; } + cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0); + object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); + return 1; } - cobj->removeAllSprite3DData(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3DCache:removeAllSprite3DData",argc, 0); + } while (0); + ok = true; + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.BillBoard:create"); + if (!ok) { break; } + cocos2d::Rect arg1; + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.BillBoard:create"); + if (!ok) { break; } + cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.BillBoard:create"); + if (!ok) { break; } + cocos2d::Rect arg1; + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.BillBoard:create"); + if (!ok) { break; } + cocos2d::BillBoard::Mode arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.BillBoard:create"); + if (!ok) { break; } + cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.BillBoard:create",argc, 2); return 0; - #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_create'.",&tolua_err); #endif - return 0; } -int lua_cocos2dx_3d_Sprite3DCache_destroyInstance(lua_State* tolua_S) +int lua_cocos2dx_3d_BillBoard_createWithTexture(lua_State* tolua_S) { int argc = 0; bool ok = true; @@ -2683,68 +1390,51 @@ int lua_cocos2dx_3d_Sprite3DCache_destroyInstance(lua_State* tolua_S) #endif #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Sprite3DCache",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertable(tolua_S,1,"cc.BillBoard",0,&tolua_err)) goto tolua_lerror; #endif argc = lua_gettop(tolua_S) - 1; - if (argc == 0) + if (argc == 1) { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3DCache_destroyInstance'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_createWithTexture'", nullptr); return 0; } - cocos2d::Sprite3DCache::destroyInstance(); - lua_settop(tolua_S, 1); + cocos2d::BillBoard* ret = cocos2d::BillBoard::createWithTexture(arg0); + object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite3DCache:destroyInstance",argc, 0); + if (argc == 2) + { + cocos2d::Texture2D* arg0; + cocos2d::BillBoard::Mode arg1; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.BillBoard:createWithTexture"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_createWithTexture'", nullptr); + return 0; + } + cocos2d::BillBoard* ret = cocos2d::BillBoard::createWithTexture(arg0, arg1); + object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.BillBoard:createWithTexture",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_destroyInstance'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_createWithTexture'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_3d_Sprite3DCache_getInstance(lua_State* tolua_S) +int lua_cocos2dx_3d_BillBoard_constructor(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.Sprite3DCache",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_Sprite3DCache_getInstance'", nullptr); - return 0; - } - cocos2d::Sprite3DCache* ret = cocos2d::Sprite3DCache::getInstance(); - object_to_luaval(tolua_S, "cc.Sprite3DCache",(cocos2d::Sprite3DCache*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite3DCache:getInstance",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_getInstance'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_Sprite3DCache_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3DCache* cobj = nullptr; + cocos2d::BillBoard* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -2758,45 +1448,47 @@ int lua_cocos2dx_3d_Sprite3DCache_constructor(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3DCache_constructor'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_constructor'", nullptr); return 0; } - cobj = new cocos2d::Sprite3DCache(); - tolua_pushusertype(tolua_S,(void*)cobj,"cc.Sprite3DCache"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + cobj = new cocos2d::BillBoard(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.BillBoard"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3DCache:Sprite3DCache",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.BillBoard:BillBoard",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_constructor'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_constructor'.",&tolua_err); #endif return 0; } -static int lua_cocos2dx_3d_Sprite3DCache_finalize(lua_State* tolua_S) +static int lua_cocos2dx_3d_BillBoard_finalize(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (Sprite3DCache)"); + printf("luabindings: finalizing LUA object (BillBoard)"); return 0; } -int lua_register_cocos2dx_3d_Sprite3DCache(lua_State* tolua_S) +int lua_register_cocos2dx_3d_BillBoard(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.Sprite3DCache"); - tolua_cclass(tolua_S,"Sprite3DCache","cc.Sprite3DCache","",nullptr); + tolua_usertype(tolua_S,"cc.BillBoard"); + tolua_cclass(tolua_S,"BillBoard","cc.BillBoard","cc.Sprite",nullptr); - tolua_beginmodule(tolua_S,"Sprite3DCache"); - tolua_function(tolua_S,"new",lua_cocos2dx_3d_Sprite3DCache_constructor); - tolua_function(tolua_S,"removeSprite3DData",lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData); - tolua_function(tolua_S,"removeAllSprite3DData",lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData); - tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_3d_Sprite3DCache_destroyInstance); - tolua_function(tolua_S,"getInstance", lua_cocos2dx_3d_Sprite3DCache_getInstance); + tolua_beginmodule(tolua_S,"BillBoard"); + tolua_function(tolua_S,"new",lua_cocos2dx_3d_BillBoard_constructor); + tolua_function(tolua_S,"getMode",lua_cocos2dx_3d_BillBoard_getMode); + tolua_function(tolua_S,"setMode",lua_cocos2dx_3d_BillBoard_setMode); + tolua_function(tolua_S,"create", lua_cocos2dx_3d_BillBoard_create); + tolua_function(tolua_S,"createWithTexture", lua_cocos2dx_3d_BillBoard_createWithTexture); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Sprite3DCache).name(); - g_luaType[typeName] = "cc.Sprite3DCache"; - g_typeCast["Sprite3DCache"] = "cc.Sprite3DCache"; + std::string typeName = typeid(cocos2d::BillBoard).name(); + g_luaType[typeName] = "cc.BillBoard"; + g_typeCast["BillBoard"] = "cc.BillBoard"; return 1; } @@ -3774,104 +2466,107 @@ int lua_register_cocos2dx_3d_Mesh(lua_State* tolua_S) return 1; } -int lua_cocos2dx_3d_AttachNode_create(lua_State* tolua_S) +int lua_cocos2dx_3d_Skeleton3D_removeAllBones(lua_State* tolua_S) { int argc = 0; + cocos2d::Skeleton3D* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif + #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.AttachNode",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; #endif - argc = lua_gettop(tolua_S) - 1; + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - if (argc == 1) +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_removeAllBones'", 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_Skeleton3D_removeAllBones'", nullptr); + return 0; + } + cobj->removeAllBones(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:removeAllBones",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_removeAllBones'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_addBone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_addBone'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) { cocos2d::Bone3D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_AttachNode_create'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_addBone'", nullptr); return 0; } - cocos2d::AttachNode* ret = cocos2d::AttachNode::create(arg0); - object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); + cobj->addBone(arg0); + lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AttachNode:create",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:addBone",argc, 1); return 0; + #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AttachNode_create'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_addBone'.",&tolua_err); #endif + return 0; } -int lua_cocos2dx_3d_AttachNode_constructor(lua_State* tolua_S) +int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) { int argc = 0; - cocos2d::AttachNode* 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_AttachNode_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::AttachNode(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.AttachNode"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.AttachNode:AttachNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AttachNode_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_3d_AttachNode_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (AttachNode)"); - return 0; -} - -int lua_register_cocos2dx_3d_AttachNode(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.AttachNode"); - tolua_cclass(tolua_S,"AttachNode","cc.AttachNode","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"AttachNode"); - tolua_function(tolua_S,"new",lua_cocos2dx_3d_AttachNode_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_AttachNode_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::AttachNode).name(); - g_luaType[typeName] = "cc.AttachNode"; - g_typeCast["AttachNode"] = "cc.AttachNode"; - return 1; -} - -int lua_cocos2dx_3d_BillBoard_getMode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::BillBoard* cobj = nullptr; + cocos2d::Skeleton3D* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -3880,15 +2575,115 @@ int lua_cocos2dx_3d_BillBoard_getMode(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.BillBoard",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::BillBoard*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_BillBoard_getMode'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", 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.Skeleton3D:getBoneByName"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", nullptr); + return 0; + } + cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getRootBone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", 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.Skeleton3D:getRootBone"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", nullptr); + return 0; + } + cocos2d::Bone3D* ret = cobj->getRootBone(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootBone",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", nullptr); return 0; } #endif @@ -3898,27 +2693,124 @@ int lua_cocos2dx_3d_BillBoard_getMode(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_getMode'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", nullptr); return 0; } - int ret = (int)cobj->getMode(); + cobj->updateBoneMatrix(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:updateBoneMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", 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.Skeleton3D:getBoneByIndex"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", nullptr); + return 0; + } + cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getRootCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'", 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_Skeleton3D_getRootCount'", nullptr); + return 0; + } + ssize_t ret = cobj->getRootCount(); 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.BillBoard:getMode",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootCount",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_getMode'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_3d_BillBoard_setMode(lua_State* tolua_S) +int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) { int argc = 0; - cocos2d::BillBoard* cobj = nullptr; + cocos2d::Skeleton3D* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -3927,15 +2819,15 @@ int lua_cocos2dx_3d_BillBoard_setMode(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.BillBoard",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::BillBoard*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_BillBoard_setMode'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); return 0; } #endif @@ -3943,253 +2835,32 @@ int lua_cocos2dx_3d_BillBoard_setMode(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - cocos2d::BillBoard::Mode arg0; + cocos2d::Bone3D* arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.BillBoard:setMode"); + ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_setMode'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); return 0; } - cobj->setMode(arg0); - lua_settop(tolua_S, 1); + int ret = cobj->getBoneIndex(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.BillBoard:setMode",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneIndex",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_setMode'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_3d_BillBoard_create(lua_State* tolua_S) +int lua_cocos2dx_3d_Skeleton3D_getBoneCount(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.BillBoard",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.BillBoard:create"); - if (!ok) { break; } - cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0); - object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.BillBoard:create"); - if (!ok) { break; } - cocos2d::BillBoard::Mode arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.BillBoard:create"); - if (!ok) { break; } - cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 0) - { - cocos2d::BillBoard* ret = cocos2d::BillBoard::create(); - object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - cocos2d::BillBoard::Mode arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.BillBoard:create"); - if (!ok) { break; } - cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0); - object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.BillBoard:create"); - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.BillBoard:create"); - if (!ok) { break; } - cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.BillBoard:create"); - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.BillBoard:create"); - if (!ok) { break; } - cocos2d::BillBoard::Mode arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.BillBoard:create"); - if (!ok) { break; } - cocos2d::BillBoard* ret = cocos2d::BillBoard::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.BillBoard:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_BillBoard_createWithTexture(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.BillBoard",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_createWithTexture'", nullptr); - return 0; - } - cocos2d::BillBoard* ret = cocos2d::BillBoard::createWithTexture(arg0); - object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); - return 1; - } - if (argc == 2) - { - cocos2d::Texture2D* arg0; - cocos2d::BillBoard::Mode arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.BillBoard:createWithTexture"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_createWithTexture'", nullptr); - return 0; - } - cocos2d::BillBoard* ret = cocos2d::BillBoard::createWithTexture(arg0, arg1); - object_to_luaval(tolua_S, "cc.BillBoard",(cocos2d::BillBoard*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.BillBoard:createWithTexture",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_createWithTexture'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_BillBoard_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::BillBoard* 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_BillBoard_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::BillBoard(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.BillBoard"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.BillBoard:BillBoard",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_BillBoard_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_3d_BillBoard_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (BillBoard)"); - return 0; -} - -int lua_register_cocos2dx_3d_BillBoard(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.BillBoard"); - tolua_cclass(tolua_S,"BillBoard","cc.BillBoard","cc.Sprite",nullptr); - - tolua_beginmodule(tolua_S,"BillBoard"); - tolua_function(tolua_S,"new",lua_cocos2dx_3d_BillBoard_constructor); - tolua_function(tolua_S,"getMode",lua_cocos2dx_3d_BillBoard_getMode); - tolua_function(tolua_S,"setMode",lua_cocos2dx_3d_BillBoard_setMode); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_BillBoard_create); - tolua_function(tolua_S,"createWithTexture", lua_cocos2dx_3d_BillBoard_createWithTexture); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::BillBoard).name(); - g_luaType[typeName] = "cc.BillBoard"; - g_typeCast["BillBoard"] = "cc.BillBoard"; - return 1; -} - -int lua_cocos2dx_3d_TextureCube_reloadTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TextureCube* cobj = nullptr; + cocos2d::Skeleton3D* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -4198,15 +2869,15 @@ int lua_cocos2dx_3d_TextureCube_reloadTexture(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::TextureCube*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", nullptr); return 0; } #endif @@ -4216,123 +2887,27 @@ int lua_cocos2dx_3d_TextureCube_reloadTexture(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", nullptr); return 0; } - bool ret = cobj->reloadTexture(); - tolua_pushboolean(tolua_S,(bool)ret); + ssize_t ret = cobj->getBoneCount(); + 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.TextureCube:reloadTexture",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneCount",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_3d_TextureCube_setTexParameters(lua_State* tolua_S) +int lua_cocos2dx_3d_Skeleton3D_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::TextureCube* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TextureCube*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Texture2D::TexParams arg0; - - ok &= luaval_to_texparams(tolua_S, 2, &arg0, "cc.TextureCube:setTexParameters"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'", nullptr); - return 0; - } - cobj->setTexParameters(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:setTexParameters",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_TextureCube_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.TextureCube",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 6) - { - std::string arg0; - std::string arg1; - std::string arg2; - std::string arg3; - std::string arg4; - std::string arg5; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TextureCube:create"); - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.TextureCube:create"); - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.TextureCube:create"); - ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.TextureCube:create"); - ok &= luaval_to_std_string(tolua_S, 6,&arg4, "cc.TextureCube:create"); - ok &= luaval_to_std_string(tolua_S, 7,&arg5, "cc.TextureCube:create"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_create'", nullptr); - return 0; - } - cocos2d::TextureCube* ret = cocos2d::TextureCube::create(arg0, arg1, arg2, arg3, arg4, arg5); - object_to_luaval(tolua_S, "cc.TextureCube",(cocos2d::TextureCube*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TextureCube:create",argc, 6); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_TextureCube_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TextureCube* cobj = nullptr; + cocos2d::Skeleton3D* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -4346,46 +2921,52 @@ int lua_cocos2dx_3d_TextureCube_constructor(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_constructor'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_constructor'", nullptr); return 0; } - cobj = new cocos2d::TextureCube(); + cobj = new cocos2d::Skeleton3D(); cobj->autorelease(); int ID = (int)cobj->_ID ; int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TextureCube"); + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Skeleton3D"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:TextureCube",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:Skeleton3D",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_constructor'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_constructor'.",&tolua_err); #endif return 0; } -static int lua_cocos2dx_3d_TextureCube_finalize(lua_State* tolua_S) +static int lua_cocos2dx_3d_Skeleton3D_finalize(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (TextureCube)"); + printf("luabindings: finalizing LUA object (Skeleton3D)"); return 0; } -int lua_register_cocos2dx_3d_TextureCube(lua_State* tolua_S) +int lua_register_cocos2dx_3d_Skeleton3D(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.TextureCube"); - tolua_cclass(tolua_S,"TextureCube","cc.TextureCube","cc.Texture2D",nullptr); + tolua_usertype(tolua_S,"cc.Skeleton3D"); + tolua_cclass(tolua_S,"Skeleton3D","cc.Skeleton3D","cc.Ref",nullptr); - tolua_beginmodule(tolua_S,"TextureCube"); - tolua_function(tolua_S,"new",lua_cocos2dx_3d_TextureCube_constructor); - tolua_function(tolua_S,"reloadTexture",lua_cocos2dx_3d_TextureCube_reloadTexture); - tolua_function(tolua_S,"setTexParameters",lua_cocos2dx_3d_TextureCube_setTexParameters); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_TextureCube_create); + tolua_beginmodule(tolua_S,"Skeleton3D"); + tolua_function(tolua_S,"new",lua_cocos2dx_3d_Skeleton3D_constructor); + tolua_function(tolua_S,"removeAllBones",lua_cocos2dx_3d_Skeleton3D_removeAllBones); + tolua_function(tolua_S,"addBone",lua_cocos2dx_3d_Skeleton3D_addBone); + tolua_function(tolua_S,"getBoneByName",lua_cocos2dx_3d_Skeleton3D_getBoneByName); + tolua_function(tolua_S,"getRootBone",lua_cocos2dx_3d_Skeleton3D_getRootBone); + tolua_function(tolua_S,"updateBoneMatrix",lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix); + tolua_function(tolua_S,"getBoneByIndex",lua_cocos2dx_3d_Skeleton3D_getBoneByIndex); + tolua_function(tolua_S,"getRootCount",lua_cocos2dx_3d_Skeleton3D_getRootCount); + tolua_function(tolua_S,"getBoneIndex",lua_cocos2dx_3d_Skeleton3D_getBoneIndex); + tolua_function(tolua_S,"getBoneCount",lua_cocos2dx_3d_Skeleton3D_getBoneCount); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TextureCube).name(); - g_luaType[typeName] = "cc.TextureCube"; - g_typeCast["TextureCube"] = "cc.TextureCube"; + std::string typeName = typeid(cocos2d::Skeleton3D).name(); + g_luaType[typeName] = "cc.Skeleton3D"; + g_typeCast["Skeleton3D"] = "cc.Skeleton3D"; return 1; } @@ -4678,6 +3259,1273 @@ int lua_register_cocos2dx_3d_Skybox(lua_State* tolua_S) return 1; } +int lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFaceEnabled"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); + return 0; + } + cobj->setCullFaceEnabled(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFaceEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setTexture'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + + if (!ok) { break; } + cobj->setTexture(arg0); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:setTexture"); + + if (!ok) { break; } + cobj->setTexture(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.Sprite3D:setTexture",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getLightMask(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getLightMask'", 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_Sprite3D_getLightMask'", nullptr); + return 0; + } + unsigned int ret = cobj->getLightMask(); + 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.Sprite3D:getLightMask",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getLightMask'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMaterial(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMaterial'", 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.Sprite3D:getMaterial"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_getMaterial'", nullptr); + return 0; + } + cocos2d::Material* ret = cobj->getMaterial(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.Sprite3D:getMaterial",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMaterial'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", 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.Sprite3D:setCullFace"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); + return 0; + } + cobj->setCullFace(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'", 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_Sprite3D_removeAllAttachNode'", nullptr); + return 0; + } + cobj->removeAllAttachNode(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAllAttachNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setMaterial(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setMaterial'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Material* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Sprite3D:setMaterial"); + + if (!ok) { break; } + cobj->setMaterial(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Material* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0); + + if (!ok) { break; } + cobj->setMaterial(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.Sprite3D:setMaterial",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setMaterial'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMesh'", 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_Sprite3D_getMesh'", nullptr); + return 0; + } + cocos2d::Mesh* ret = cobj->getMesh(); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMesh",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMesh'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMeshCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshCount'", 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_Sprite3D_getMeshCount'", nullptr); + return 0; + } + ssize_t ret = cobj->getMeshCount(); + 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.Sprite3D:getMeshCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMeshByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", 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.Sprite3D:getMeshByIndex"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", nullptr); + return 0; + } + cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_isForceDepthWrite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_isForceDepthWrite'", 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_Sprite3D_isForceDepthWrite'", nullptr); + return 0; + } + bool ret = cobj->isForceDepthWrite(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:isForceDepthWrite",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_isForceDepthWrite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'", 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_Sprite3D_getBlendFunc'", nullptr); + return 0; + } + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + blendfunc_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getBlendFunc",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setLightMask(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setLightMask'", 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.Sprite3D:setLightMask"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setLightMask'", nullptr); + return 0; + } + cobj->setLightMask(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setLightMask",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setLightMask'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", 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.Sprite3D:getAttachNode"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", nullptr); + return 0; + } + cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); + object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getAttachNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::BlendFunc arg0; + + ok &= luaval_to_blendfunc(tolua_S, 2, &arg0, "cc.Sprite3D:setBlendFunc"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); + return 0; + } + cobj->setBlendFunc(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setBlendFunc",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", 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.Sprite3D:removeAttachNode"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", nullptr); + return 0; + } + cobj->removeAttachNode(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAttachNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", 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_Sprite3D_getSkeleton'", nullptr); + return 0; + } + cocos2d::Skeleton3D* ret = cobj->getSkeleton(); + object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getSkeleton",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setForceDepthWrite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setForceDepthWrite'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setForceDepthWrite"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setForceDepthWrite'", nullptr); + return 0; + } + cobj->setForceDepthWrite(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setForceDepthWrite",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setForceDepthWrite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMeshByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", 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.Sprite3D:getMeshByName"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", nullptr); + return 0; + } + cocos2d::Mesh* ret = cobj->getMeshByName(arg0); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + if (!ok) { break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); + object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 0) + { + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(); + object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:create"); + if (!ok) { break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Sprite3D)"); + return 0; +} + +int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Sprite3D"); + tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"Sprite3D"); + tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled); + tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Sprite3D_setTexture); + tolua_function(tolua_S,"getLightMask",lua_cocos2dx_3d_Sprite3D_getLightMask); + tolua_function(tolua_S,"getMaterial",lua_cocos2dx_3d_Sprite3D_getMaterial); + tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace); + tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode); + tolua_function(tolua_S,"setMaterial",lua_cocos2dx_3d_Sprite3D_setMaterial); + tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh); + tolua_function(tolua_S,"getMeshCount",lua_cocos2dx_3d_Sprite3D_getMeshCount); + tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex); + tolua_function(tolua_S,"isForceDepthWrite",lua_cocos2dx_3d_Sprite3D_isForceDepthWrite); + tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Sprite3D_getBlendFunc); + tolua_function(tolua_S,"setLightMask",lua_cocos2dx_3d_Sprite3D_setLightMask); + tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode); + tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Sprite3D_setBlendFunc); + tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_Sprite3D_removeAttachNode); + tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_Sprite3D_getSkeleton); + tolua_function(tolua_S,"setForceDepthWrite",lua_cocos2dx_3d_Sprite3D_setForceDepthWrite); + tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName); + tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Sprite3D).name(); + g_luaType[typeName] = "cc.Sprite3D"; + g_typeCast["Sprite3D"] = "cc.Sprite3D"; + return 1; +} + +int lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3DCache* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3DCache",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3DCache*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData'", 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.Sprite3DCache:removeSprite3DData"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData'", nullptr); + return 0; + } + cobj->removeSprite3DData(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3DCache:removeSprite3DData",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3DCache* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3DCache",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3DCache*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData'", 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_Sprite3DCache_removeAllSprite3DData'", nullptr); + return 0; + } + cobj->removeAllSprite3DData(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3DCache:removeAllSprite3DData",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3DCache_destroyInstance(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.Sprite3DCache",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_Sprite3DCache_destroyInstance'", nullptr); + return 0; + } + cocos2d::Sprite3DCache::destroyInstance(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite3DCache:destroyInstance",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_destroyInstance'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_3d_Sprite3DCache_getInstance(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.Sprite3DCache",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_Sprite3DCache_getInstance'", nullptr); + return 0; + } + cocos2d::Sprite3DCache* ret = cocos2d::Sprite3DCache::getInstance(); + object_to_luaval(tolua_S, "cc.Sprite3DCache",(cocos2d::Sprite3DCache*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite3DCache:getInstance",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_getInstance'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_3d_Sprite3DCache_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3DCache* 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_Sprite3DCache_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Sprite3DCache(); + tolua_pushusertype(tolua_S,(void*)cobj,"cc.Sprite3DCache"); + 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.Sprite3DCache:Sprite3DCache",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_3d_Sprite3DCache_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Sprite3DCache)"); + return 0; +} + +int lua_register_cocos2dx_3d_Sprite3DCache(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Sprite3DCache"); + tolua_cclass(tolua_S,"Sprite3DCache","cc.Sprite3DCache","",nullptr); + + tolua_beginmodule(tolua_S,"Sprite3DCache"); + tolua_function(tolua_S,"new",lua_cocos2dx_3d_Sprite3DCache_constructor); + tolua_function(tolua_S,"removeSprite3DData",lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData); + tolua_function(tolua_S,"removeAllSprite3DData",lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData); + tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_3d_Sprite3DCache_destroyInstance); + tolua_function(tolua_S,"getInstance", lua_cocos2dx_3d_Sprite3DCache_getInstance); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Sprite3DCache).name(); + g_luaType[typeName] = "cc.Sprite3DCache"; + g_typeCast["Sprite3DCache"] = "cc.Sprite3DCache"; + return 1; +} + int lua_cocos2dx_3d_Terrain_initHeightMap(lua_State* tolua_S) { int argc = 0; @@ -4728,6 +4576,260 @@ int lua_cocos2dx_3d_Terrain_initHeightMap(lua_State* tolua_S) return 0; } +int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Terrain:setMaxDetailMapAmount"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr); + return 0; + } + cobj->setMaxDetailMapAmount(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setMaxDetailMapAmount",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_setDrawWire(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setDrawWire"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr); + return 0; + } + cobj->setDrawWire(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDrawWire",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDrawWire'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setIsEnableFrustumCull"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr); + return 0; + } + cobj->setIsEnableFrustumCull(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setIsEnableFrustumCull",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + unsigned int arg0; + cocos2d::Terrain::DetailMap arg1; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Terrain:setDetailMap"); + + #pragma warning NO CONVERSION TO NATIVE FOR DetailMap + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr); + return 0; + } + cobj->setDetailMap(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDetailMap",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDetailMap'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_resetHeightMap(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:resetHeightMap"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr); + return 0; + } + cobj->resetHeightMap(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:resetHeightMap",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_3d_Terrain_setAlphaMap(lua_State* tolua_S) { int argc = 0; @@ -4972,6 +5074,109 @@ int lua_cocos2dx_3d_Terrain_initProperties(lua_State* tolua_S) return 0; } +int lua_cocos2dx_3d_Terrain_setLODDistance(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + double arg0; + double arg1; + double arg2; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setLODDistance"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Terrain:setLODDistance"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Terrain:setLODDistance"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr); + return 0; + } + cobj->setLODDistance(arg0, arg1, arg2); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setLODDistance",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setLODDistance'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_getTerrainSize(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_getTerrainSize'", 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_getTerrainSize'", nullptr); + return 0; + } + cocos2d::Size ret = cobj->getTerrainSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getTerrainSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getTerrainSize'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S) { int argc = 0; @@ -5025,56 +5230,6 @@ int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S) return 0; } -int lua_cocos2dx_3d_Terrain_setDrawWire(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setDrawWire"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr); - return 0; - } - cobj->setDrawWire(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDrawWire",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDrawWire'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_3d_Terrain_reload(lua_State* tolua_S) { int argc = 0; @@ -5122,60 +5277,6 @@ int lua_cocos2dx_3d_Terrain_reload(lua_State* tolua_S) return 0; } -int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - unsigned int arg0; - cocos2d::Terrain::DetailMap arg1; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Terrain:setDetailMap"); - - #pragma warning NO CONVERSION TO NATIVE FOR DetailMap - ok = false; - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr); - return 0; - } - cobj->setDetailMap(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDetailMap",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDetailMap'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S) { int argc = 0; @@ -5229,159 +5330,6 @@ int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S) return 0; } -int lua_cocos2dx_3d_Terrain_getMinHeight(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMinHeight'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getMinHeight'", nullptr); - return 0; - } - double ret = cobj->getMinHeight(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getMinHeight",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMinHeight'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Terrain_setLODDistance(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - double arg0; - double arg1; - double arg2; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setLODDistance"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Terrain:setLODDistance"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Terrain:setLODDistance"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr); - return 0; - } - cobj->setLODDistance(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setLODDistance",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setLODDistance'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Terrain_resetHeightMap(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - const char* arg0; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:resetHeightMap"); arg0 = arg0_tmp.c_str(); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr); - return 0; - } - cobj->resetHeightMap(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:resetHeightMap",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S) { int argc = 0; @@ -5429,7 +5377,7 @@ int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S) return 0; } -int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S) +int lua_cocos2dx_3d_Terrain_getMinHeight(lua_State* tolua_S) { int argc = 0; cocos2d::Terrain* cobj = nullptr; @@ -5449,82 +5397,29 @@ int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMinHeight'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 0) { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Terrain:setMaxDetailMapAmount"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getMinHeight'", nullptr); return 0; } - cobj->setMaxDetailMapAmount(arg0); - lua_settop(tolua_S, 1); + double ret = cobj->getMinHeight(); + tolua_pushnumber(tolua_S,(lua_Number)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setMaxDetailMapAmount",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getMinHeight",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setIsEnableFrustumCull"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr); - return 0; - } - cobj->setIsEnableFrustumCull(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setIsEnableFrustumCull",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMinHeight'.",&tolua_err); #endif return 0; @@ -5542,28 +5437,232 @@ int lua_register_cocos2dx_3d_Terrain(lua_State* tolua_S) tolua_beginmodule(tolua_S,"Terrain"); tolua_function(tolua_S,"initHeightMap",lua_cocos2dx_3d_Terrain_initHeightMap); + tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount); + tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire); + tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull); + tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap); + tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap); tolua_function(tolua_S,"setAlphaMap",lua_cocos2dx_3d_Terrain_setAlphaMap); tolua_function(tolua_S,"setSkirtHeightRatio",lua_cocos2dx_3d_Terrain_setSkirtHeightRatio); tolua_function(tolua_S,"convertToTerrainSpace",lua_cocos2dx_3d_Terrain_convertToTerrainSpace); tolua_function(tolua_S,"initTextures",lua_cocos2dx_3d_Terrain_initTextures); tolua_function(tolua_S,"initProperties",lua_cocos2dx_3d_Terrain_initProperties); - tolua_function(tolua_S,"getNormal",lua_cocos2dx_3d_Terrain_getNormal); - tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire); - tolua_function(tolua_S,"reload",lua_cocos2dx_3d_Terrain_reload); - tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap); - tolua_function(tolua_S,"getImageHeight",lua_cocos2dx_3d_Terrain_getImageHeight); - tolua_function(tolua_S,"getMinHeight",lua_cocos2dx_3d_Terrain_getMinHeight); tolua_function(tolua_S,"setLODDistance",lua_cocos2dx_3d_Terrain_setLODDistance); - tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap); + tolua_function(tolua_S,"getTerrainSize",lua_cocos2dx_3d_Terrain_getTerrainSize); + tolua_function(tolua_S,"getNormal",lua_cocos2dx_3d_Terrain_getNormal); + tolua_function(tolua_S,"reload",lua_cocos2dx_3d_Terrain_reload); + tolua_function(tolua_S,"getImageHeight",lua_cocos2dx_3d_Terrain_getImageHeight); tolua_function(tolua_S,"getMaxHeight",lua_cocos2dx_3d_Terrain_getMaxHeight); - tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount); - tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull); + tolua_function(tolua_S,"getMinHeight",lua_cocos2dx_3d_Terrain_getMinHeight); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Terrain).name(); g_luaType[typeName] = "cc.Terrain"; g_typeCast["Terrain"] = "cc.Terrain"; return 1; } + +int lua_cocos2dx_3d_TextureCube_reloadTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TextureCube* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TextureCube*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'", 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_TextureCube_reloadTexture'", nullptr); + return 0; + } + bool ret = cobj->reloadTexture(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:reloadTexture",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_TextureCube_setTexParameters(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TextureCube* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TextureCube*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Texture2D::TexParams arg0; + + ok &= luaval_to_texparams(tolua_S, 2, &arg0, "cc.TextureCube:setTexParameters"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'", nullptr); + return 0; + } + cobj->setTexParameters(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:setTexParameters",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_TextureCube_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.TextureCube",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 6) + { + std::string arg0; + std::string arg1; + std::string arg2; + std::string arg3; + std::string arg4; + std::string arg5; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TextureCube:create"); + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.TextureCube:create"); + ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.TextureCube:create"); + ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.TextureCube:create"); + ok &= luaval_to_std_string(tolua_S, 6,&arg4, "cc.TextureCube:create"); + ok &= luaval_to_std_string(tolua_S, 7,&arg5, "cc.TextureCube:create"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_create'", nullptr); + return 0; + } + cocos2d::TextureCube* ret = cocos2d::TextureCube::create(arg0, arg1, arg2, arg3, arg4, arg5); + object_to_luaval(tolua_S, "cc.TextureCube",(cocos2d::TextureCube*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TextureCube:create",argc, 6); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_3d_TextureCube_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TextureCube* 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_TextureCube_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TextureCube(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TextureCube"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:TextureCube",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_3d_TextureCube_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TextureCube)"); + return 0; +} + +int lua_register_cocos2dx_3d_TextureCube(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TextureCube"); + tolua_cclass(tolua_S,"TextureCube","cc.TextureCube","cc.Texture2D",nullptr); + + tolua_beginmodule(tolua_S,"TextureCube"); + tolua_function(tolua_S,"new",lua_cocos2dx_3d_TextureCube_constructor); + tolua_function(tolua_S,"reloadTexture",lua_cocos2dx_3d_TextureCube_reloadTexture); + tolua_function(tolua_S,"setTexParameters",lua_cocos2dx_3d_TextureCube_setTexParameters); + tolua_function(tolua_S,"create", lua_cocos2dx_3d_TextureCube_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TextureCube).name(); + g_luaType[typeName] = "cc.TextureCube"; + g_typeCast["TextureCube"] = "cc.TextureCube"; + return 1; +} TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S) { tolua_open(tolua_S); @@ -5578,10 +5677,10 @@ 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_BillBoard(tolua_S); lua_register_cocos2dx_3d_Skeleton3D(tolua_S); - lua_register_cocos2dx_3d_Mesh(tolua_S); + lua_register_cocos2dx_3d_BillBoard(tolua_S); lua_register_cocos2dx_3d_Animation3D(tolua_S); + lua_register_cocos2dx_3d_Mesh(tolua_S); tolua_endmodule(tolua_S); return 1; 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 21bc57f335..1204dc145d 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp @@ -127,6 +127,8 @@ int register_all_cocos2dx_3d(lua_State* tolua_S); + + diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 176c405c0f..8ab9cfbee0 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -442,1409 +442,6 @@ int lua_register_cocos2dx_Console(lua_State* tolua_S) return 1; } -int lua_cocos2dx_Action_startWithTarget(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_startWithTarget'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_startWithTarget'", nullptr); - return 0; - } - cobj->startWithTarget(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:startWithTarget",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_startWithTarget'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_setOriginalTarget(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_setOriginalTarget'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_setOriginalTarget'", nullptr); - return 0; - } - cobj->setOriginalTarget(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:setOriginalTarget",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_setOriginalTarget'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_clone(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_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_Action_clone'", nullptr); - return 0; - } - cocos2d::Action* ret = cobj->clone(); - object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:clone",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_clone'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_getOriginalTarget(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_getOriginalTarget'", 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_Action_getOriginalTarget'", nullptr); - return 0; - } - cocos2d::Node* ret = cobj->getOriginalTarget(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:getOriginalTarget",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_getOriginalTarget'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_stop(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_stop'", 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_Action_stop'", nullptr); - return 0; - } - cobj->stop(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:stop",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_stop'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_update(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_update'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Action:update"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_update'", nullptr); - return 0; - } - cobj->update(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:update",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_update'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_getTarget(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_getTarget'", 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_Action_getTarget'", nullptr); - return 0; - } - cocos2d::Node* ret = cobj->getTarget(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:getTarget",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_getTarget'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_step(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_step'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Action:step"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_step'", nullptr); - return 0; - } - cobj->step(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:step",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_step'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_setTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_setTag'", 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.Action:setTag"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_setTag'", nullptr); - return 0; - } - cobj->setTag(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:setTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_setTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_getTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_getTag'", 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_Action_getTag'", nullptr); - return 0; - } - int ret = cobj->getTag(); - 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.Action:getTag",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_getTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_setTarget(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_setTarget'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_setTarget'", nullptr); - return 0; - } - cobj->setTarget(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:setTarget",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_setTarget'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_isDone(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_isDone'", 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_Action_isDone'", nullptr); - return 0; - } - bool ret = cobj->isDone(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:isDone",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_isDone'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Action_reverse(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Action* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_reverse'", 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_Action_reverse'", nullptr); - return 0; - } - cocos2d::Action* ret = cobj->reverse(); - object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:reverse",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_reverse'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_Action_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Action)"); - return 0; -} - -int lua_register_cocos2dx_Action(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Action"); - tolua_cclass(tolua_S,"Action","cc.Action","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Action"); - tolua_function(tolua_S,"startWithTarget",lua_cocos2dx_Action_startWithTarget); - tolua_function(tolua_S,"setOriginalTarget",lua_cocos2dx_Action_setOriginalTarget); - tolua_function(tolua_S,"clone",lua_cocos2dx_Action_clone); - tolua_function(tolua_S,"getOriginalTarget",lua_cocos2dx_Action_getOriginalTarget); - tolua_function(tolua_S,"stop",lua_cocos2dx_Action_stop); - tolua_function(tolua_S,"update",lua_cocos2dx_Action_update); - tolua_function(tolua_S,"getTarget",lua_cocos2dx_Action_getTarget); - tolua_function(tolua_S,"step",lua_cocos2dx_Action_step); - tolua_function(tolua_S,"setTag",lua_cocos2dx_Action_setTag); - tolua_function(tolua_S,"getTag",lua_cocos2dx_Action_getTag); - tolua_function(tolua_S,"setTarget",lua_cocos2dx_Action_setTarget); - tolua_function(tolua_S,"isDone",lua_cocos2dx_Action_isDone); - tolua_function(tolua_S,"reverse",lua_cocos2dx_Action_reverse); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Action).name(); - g_luaType[typeName] = "cc.Action"; - g_typeCast["Action"] = "cc.Action"; - return 1; -} - -int lua_cocos2dx_FiniteTimeAction_setDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::FiniteTimeAction* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.FiniteTimeAction",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::FiniteTimeAction*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FiniteTimeAction_setDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.FiniteTimeAction:setDuration"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FiniteTimeAction_setDuration'", nullptr); - return 0; - } - cobj->setDuration(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FiniteTimeAction:setDuration",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FiniteTimeAction_setDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_FiniteTimeAction_getDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::FiniteTimeAction* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.FiniteTimeAction",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::FiniteTimeAction*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FiniteTimeAction_getDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FiniteTimeAction_getDuration'", nullptr); - return 0; - } - double ret = cobj->getDuration(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FiniteTimeAction:getDuration",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FiniteTimeAction_getDuration'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_FiniteTimeAction_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (FiniteTimeAction)"); - return 0; -} - -int lua_register_cocos2dx_FiniteTimeAction(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.FiniteTimeAction"); - tolua_cclass(tolua_S,"FiniteTimeAction","cc.FiniteTimeAction","cc.Action",nullptr); - - tolua_beginmodule(tolua_S,"FiniteTimeAction"); - tolua_function(tolua_S,"setDuration",lua_cocos2dx_FiniteTimeAction_setDuration); - tolua_function(tolua_S,"getDuration",lua_cocos2dx_FiniteTimeAction_getDuration); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::FiniteTimeAction).name(); - g_luaType[typeName] = "cc.FiniteTimeAction"; - g_typeCast["FiniteTimeAction"] = "cc.FiniteTimeAction"; - return 1; -} - -int lua_cocos2dx_Speed_setInnerAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Speed* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_setInnerAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionInterval* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Speed_setInnerAction'", nullptr); - return 0; - } - cobj->setInnerAction(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Speed:setInnerAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_setInnerAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Speed_getSpeed(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Speed* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_getSpeed'", 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_Speed_getSpeed'", nullptr); - return 0; - } - double ret = cobj->getSpeed(); - 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.Speed:getSpeed",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_getSpeed'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Speed_setSpeed(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Speed* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_setSpeed'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Speed:setSpeed"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Speed_setSpeed'", nullptr); - return 0; - } - cobj->setSpeed(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Speed:setSpeed",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_setSpeed'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Speed_initWithAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Speed* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_initWithAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::ActionInterval* arg0; - double arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Speed:initWithAction"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Speed_initWithAction'", nullptr); - return 0; - } - bool ret = cobj->initWithAction(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.Speed:initWithAction",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_initWithAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Speed_getInnerAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Speed* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_getInnerAction'", 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_Speed_getInnerAction'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->getInnerAction(); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Speed:getInnerAction",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_getInnerAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Speed_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.Speed",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - cocos2d::ActionInterval* arg0; - double arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Speed:create"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Speed_create'", nullptr); - return 0; - } - cocos2d::Speed* ret = cocos2d::Speed::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Speed",(cocos2d::Speed*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Speed:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Speed_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Speed* 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_Speed_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::Speed(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Speed"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Speed:Speed",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Speed_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Speed)"); - return 0; -} - -int lua_register_cocos2dx_Speed(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Speed"); - tolua_cclass(tolua_S,"Speed","cc.Speed","cc.Action",nullptr); - - tolua_beginmodule(tolua_S,"Speed"); - tolua_function(tolua_S,"new",lua_cocos2dx_Speed_constructor); - tolua_function(tolua_S,"setInnerAction",lua_cocos2dx_Speed_setInnerAction); - tolua_function(tolua_S,"getSpeed",lua_cocos2dx_Speed_getSpeed); - tolua_function(tolua_S,"setSpeed",lua_cocos2dx_Speed_setSpeed); - tolua_function(tolua_S,"initWithAction",lua_cocos2dx_Speed_initWithAction); - tolua_function(tolua_S,"getInnerAction",lua_cocos2dx_Speed_getInnerAction); - tolua_function(tolua_S,"create", lua_cocos2dx_Speed_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Speed).name(); - g_luaType[typeName] = "cc.Speed"; - g_typeCast["Speed"] = "cc.Speed"; - return 1; -} - -int lua_cocos2dx_Follow_setBoundarySet(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Follow* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Follow",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Follow*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Follow_setBoundarySet'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Follow:setBoundarySet"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_setBoundarySet'", nullptr); - return 0; - } - cobj->setBoundarySet(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Follow:setBoundarySet",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_setBoundarySet'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Follow_initWithTarget(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Follow* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Follow",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Follow*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Follow_initWithTarget'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_initWithTarget'", nullptr); - return 0; - } - bool ret = cobj->initWithTarget(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - if (argc == 2) - { - cocos2d::Node* arg0; - cocos2d::Rect arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Follow:initWithTarget"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_initWithTarget'", nullptr); - return 0; - } - bool ret = cobj->initWithTarget(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.Follow:initWithTarget",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_initWithTarget'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Follow_isBoundarySet(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Follow* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Follow",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Follow*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Follow_isBoundarySet'", 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_Follow_isBoundarySet'", nullptr); - return 0; - } - bool ret = cobj->isBoundarySet(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Follow:isBoundarySet",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_isBoundarySet'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Follow_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.Follow",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_create'", nullptr); - return 0; - } - cocos2d::Follow* ret = cocos2d::Follow::create(arg0); - object_to_luaval(tolua_S, "cc.Follow",(cocos2d::Follow*)ret); - return 1; - } - if (argc == 2) - { - cocos2d::Node* arg0; - cocos2d::Rect arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Follow:create"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_create'", nullptr); - return 0; - } - cocos2d::Follow* ret = cocos2d::Follow::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Follow",(cocos2d::Follow*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Follow:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Follow_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Follow* 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_Follow_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::Follow(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Follow"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Follow:Follow",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Follow_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Follow)"); - return 0; -} - -int lua_register_cocos2dx_Follow(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Follow"); - tolua_cclass(tolua_S,"Follow","cc.Follow","cc.Action",nullptr); - - tolua_beginmodule(tolua_S,"Follow"); - tolua_function(tolua_S,"new",lua_cocos2dx_Follow_constructor); - tolua_function(tolua_S,"setBoundarySet",lua_cocos2dx_Follow_setBoundarySet); - tolua_function(tolua_S,"initWithTarget",lua_cocos2dx_Follow_initWithTarget); - tolua_function(tolua_S,"isBoundarySet",lua_cocos2dx_Follow_isBoundarySet); - tolua_function(tolua_S,"create", lua_cocos2dx_Follow_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Follow).name(); - g_luaType[typeName] = "cc.Follow"; - g_typeCast["Follow"] = "cc.Follow"; - return 1; -} - int lua_cocos2dx_Texture2D_getMaxT(lua_State* tolua_S) { int argc = 0; @@ -6240,53 +4837,6 @@ int lua_cocos2dx_Node_convertTouchToNodeSpace(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Node_getMaterial(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getMaterial'", 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_Node_getMaterial'", nullptr); - return 0; - } - cocos2d::Material* ret = cobj->getMaterial(); - 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.Node:getMaterial",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getMaterial'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Node_removeAllChildrenWithCleanup(lua_State* tolua_S) { int argc = 0; @@ -6432,56 +4982,6 @@ int lua_cocos2dx_Node_isCascadeOpacityEnabled(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Node_setMaterial(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setMaterial'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Material* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setMaterial'", nullptr); - return 0; - } - cobj->setMaterial(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setMaterial",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setMaterial'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Node_setParent(lua_State* tolua_S) { int argc = 0; @@ -11090,11 +9590,9 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"setNormalizedPosition",lua_cocos2dx_Node_setNormalizedPosition); tolua_function(tolua_S,"setonExitTransitionDidStartCallback",lua_cocos2dx_Node_setonExitTransitionDidStartCallback); tolua_function(tolua_S,"convertTouchToNodeSpace",lua_cocos2dx_Node_convertTouchToNodeSpace); - tolua_function(tolua_S,"getMaterial",lua_cocos2dx_Node_getMaterial); tolua_function(tolua_S,"removeAllChildren",lua_cocos2dx_Node_removeAllChildrenWithCleanup); tolua_function(tolua_S,"getNodeToParentAffineTransform",lua_cocos2dx_Node_getNodeToParentAffineTransform); tolua_function(tolua_S,"isCascadeOpacityEnabled",lua_cocos2dx_Node_isCascadeOpacityEnabled); - tolua_function(tolua_S,"setMaterial",lua_cocos2dx_Node_setMaterial); tolua_function(tolua_S,"setParent",lua_cocos2dx_Node_setParent); tolua_function(tolua_S,"getName",lua_cocos2dx_Node_getName); tolua_function(tolua_S,"resume",lua_cocos2dx_Node_resume); @@ -11194,6 +9692,7234 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) return 1; } +int lua_cocos2dx_Scene_setCameraOrderDirty(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_setCameraOrderDirty'", 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_setCameraOrderDirty'", nullptr); + return 0; + } + cobj->setCameraOrderDirty(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:setCameraOrderDirty",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_setCameraOrderDirty'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Scene_render(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_render'", 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_render'", nullptr); + return 0; + } + cobj->render(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:render",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_render'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Scene_onProjectionChanged(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_onProjectionChanged'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::EventCustom* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.EventCustom",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_onProjectionChanged'", nullptr); + return 0; + } + cobj->onProjectionChanged(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:onProjectionChanged",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_onProjectionChanged'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Scene_initWithSize(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_initWithSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Size arg0; + + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.Scene:initWithSize"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_initWithSize'", nullptr); + return 0; + } + bool ret = cobj->initWithSize(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.Scene:initWithSize",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_initWithSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Scene_getDefaultCamera(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_getDefaultCamera'", 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_getDefaultCamera'", nullptr); + return 0; + } + cocos2d::Camera* ret = cobj->getDefaultCamera(); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:getDefaultCamera",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_getDefaultCamera'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Scene_createWithSize(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.Scene",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.Scene:createWithSize"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_createWithSize'", nullptr); + return 0; + } + cocos2d::Scene* ret = cocos2d::Scene::createWithSize(arg0); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:createWithSize",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_createWithSize'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Scene_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.Scene",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_Scene_create'", nullptr); + return 0; + } + cocos2d::Scene* ret = cocos2d::Scene::create(); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Scene_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Scene* 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_Scene_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Scene(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Scene"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:Scene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Scene_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Scene)"); + return 0; +} + +int lua_register_cocos2dx_Scene(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Scene"); + tolua_cclass(tolua_S,"Scene","cc.Scene","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"Scene"); + tolua_function(tolua_S,"new",lua_cocos2dx_Scene_constructor); + tolua_function(tolua_S,"setCameraOrderDirty",lua_cocos2dx_Scene_setCameraOrderDirty); + tolua_function(tolua_S,"render",lua_cocos2dx_Scene_render); + tolua_function(tolua_S,"onProjectionChanged",lua_cocos2dx_Scene_onProjectionChanged); + tolua_function(tolua_S,"initWithSize",lua_cocos2dx_Scene_initWithSize); + tolua_function(tolua_S,"getDefaultCamera",lua_cocos2dx_Scene_getDefaultCamera); + tolua_function(tolua_S,"createWithSize", lua_cocos2dx_Scene_createWithSize); + tolua_function(tolua_S,"create", lua_cocos2dx_Scene_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Scene).name(); + g_luaType[typeName] = "cc.Scene"; + g_typeCast["Scene"] = "cc.Scene"; + return 1; +} + +int lua_cocos2dx_GLView_setFrameSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setFrameSize'", 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.GLView:setFrameSize"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLView:setFrameSize"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setFrameSize'", nullptr); + return 0; + } + cobj->setFrameSize(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.GLView:setFrameSize",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setFrameSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getViewPortRect(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getViewPortRect'", 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_GLView_getViewPortRect'", nullptr); + return 0; + } + const cocos2d::Rect& ret = cobj->getViewPortRect(); + rect_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getViewPortRect",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getViewPortRect'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_setContentScaleFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setContentScaleFactor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.GLView:setContentScaleFactor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setContentScaleFactor'", nullptr); + return 0; + } + bool ret = cobj->setContentScaleFactor(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.GLView:setContentScaleFactor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setContentScaleFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getContentScaleFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getContentScaleFactor'", 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_GLView_getContentScaleFactor'", nullptr); + return 0; + } + double ret = cobj->getContentScaleFactor(); + 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.GLView:getContentScaleFactor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getContentScaleFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_setIMEKeyboardState(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setIMEKeyboardState'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLView:setIMEKeyboardState"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setIMEKeyboardState'", nullptr); + return 0; + } + cobj->setIMEKeyboardState(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setIMEKeyboardState",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setIMEKeyboardState'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_setScissorInPoints(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setScissorInPoints'", 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.GLView:setScissorInPoints"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLView:setScissorInPoints"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.GLView:setScissorInPoints"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.GLView:setScissorInPoints"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setScissorInPoints'", nullptr); + return 0; + } + cobj->setScissorInPoints(arg0, arg1, arg2, arg3); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setScissorInPoints",argc, 4); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setScissorInPoints'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getViewName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getViewName'", 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_GLView_getViewName'", nullptr); + return 0; + } + const std::string& ret = cobj->getViewName(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getViewName",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getViewName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_isOpenGLReady(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_isOpenGLReady'", 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_GLView_isOpenGLReady'", nullptr); + return 0; + } + bool ret = cobj->isOpenGLReady(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:isOpenGLReady",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_isOpenGLReady'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_setCursorVisible(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setCursorVisible'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLView:setCursorVisible"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setCursorVisible'", nullptr); + return 0; + } + cobj->setCursorVisible(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setCursorVisible",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setCursorVisible'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_end(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_end'", 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_GLView_end'", nullptr); + return 0; + } + cobj->end(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:end",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_end'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getScaleY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getScaleY'", 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_GLView_getScaleY'", nullptr); + return 0; + } + double ret = cobj->getScaleY(); + 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.GLView:getScaleY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getScaleY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getScaleX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getScaleX'", 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_GLView_getScaleX'", nullptr); + return 0; + } + double ret = cobj->getScaleX(); + 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.GLView:getScaleX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getScaleX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getVisibleOrigin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getVisibleOrigin'", 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_GLView_getVisibleOrigin'", nullptr); + return 0; + } + cocos2d::Vec2 ret = cobj->getVisibleOrigin(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getVisibleOrigin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getVisibleOrigin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getFrameSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getFrameSize'", 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_GLView_getFrameSize'", nullptr); + return 0; + } + const cocos2d::Size& ret = cobj->getFrameSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getFrameSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getFrameSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_setFrameZoomFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setFrameZoomFactor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.GLView:setFrameZoomFactor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setFrameZoomFactor'", nullptr); + return 0; + } + cobj->setFrameZoomFactor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setFrameZoomFactor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setFrameZoomFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getFrameZoomFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getFrameZoomFactor'", 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_GLView_getFrameZoomFactor'", nullptr); + return 0; + } + double ret = cobj->getFrameZoomFactor(); + 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.GLView:getFrameZoomFactor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getFrameZoomFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getDesignResolutionSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getDesignResolutionSize'", 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_GLView_getDesignResolutionSize'", nullptr); + return 0; + } + const cocos2d::Size& ret = cobj->getDesignResolutionSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getDesignResolutionSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getDesignResolutionSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_windowShouldClose(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_windowShouldClose'", 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_GLView_windowShouldClose'", nullptr); + return 0; + } + bool ret = cobj->windowShouldClose(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:windowShouldClose",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_windowShouldClose'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_swapBuffers(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_swapBuffers'", 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_GLView_swapBuffers'", nullptr); + return 0; + } + cobj->swapBuffers(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:swapBuffers",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_swapBuffers'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_setDesignResolutionSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setDesignResolutionSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + double arg0; + double arg1; + ResolutionPolicy arg2; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.GLView:setDesignResolutionSize"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLView:setDesignResolutionSize"); + + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.GLView:setDesignResolutionSize"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setDesignResolutionSize'", nullptr); + return 0; + } + cobj->setDesignResolutionSize(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.GLView:setDesignResolutionSize",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setDesignResolutionSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getResolutionPolicy(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getResolutionPolicy'", 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_GLView_getResolutionPolicy'", nullptr); + return 0; + } + int ret = (int)cobj->getResolutionPolicy(); + 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.GLView:getResolutionPolicy",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getResolutionPolicy'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_isRetinaDisplay(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_isRetinaDisplay'", 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_GLView_isRetinaDisplay'", nullptr); + return 0; + } + bool ret = cobj->isRetinaDisplay(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:isRetinaDisplay",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_isRetinaDisplay'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_setViewPortInPoints(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setViewPortInPoints'", 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.GLView:setViewPortInPoints"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLView:setViewPortInPoints"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.GLView:setViewPortInPoints"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.GLView:setViewPortInPoints"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setViewPortInPoints'", nullptr); + return 0; + } + cobj->setViewPortInPoints(arg0, arg1, arg2, arg3); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setViewPortInPoints",argc, 4); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setViewPortInPoints'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getScissorRect(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getScissorRect'", 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_GLView_getScissorRect'", nullptr); + return 0; + } + cocos2d::Rect ret = cobj->getScissorRect(); + rect_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getScissorRect",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getScissorRect'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getRetinaFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getRetinaFactor'", 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_GLView_getRetinaFactor'", nullptr); + return 0; + } + int ret = cobj->getRetinaFactor(); + 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.GLView:getRetinaFactor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getRetinaFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_setViewName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setViewName'", 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.GLView:setViewName"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setViewName'", nullptr); + return 0; + } + cobj->setViewName(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setViewName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setViewName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getVisibleRect(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getVisibleRect'", 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_GLView_getVisibleRect'", nullptr); + return 0; + } + cocos2d::Rect ret = cobj->getVisibleRect(); + rect_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getVisibleRect",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getVisibleRect'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_getVisibleSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getVisibleSize'", 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_GLView_getVisibleSize'", nullptr); + return 0; + } + cocos2d::Size ret = cobj->getVisibleSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getVisibleSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getVisibleSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_isScissorEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_isScissorEnabled'", 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_GLView_isScissorEnabled'", nullptr); + return 0; + } + bool ret = cobj->isScissorEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:isScissorEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_isScissorEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_pollEvents(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_pollEvents'", 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_GLView_pollEvents'", nullptr); + return 0; + } + cobj->pollEvents(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:pollEvents",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_pollEvents'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLView_setGLContextAttrs(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.GLView",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + GLContextAttrs arg0; + #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setGLContextAttrs'", nullptr); + return 0; + } + cocos2d::GLView::setGLContextAttrs(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLView:setGLContextAttrs",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setGLContextAttrs'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLView_getGLContextAttrs(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.GLView",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_GLView_getGLContextAttrs'", nullptr); + return 0; + } + GLContextAttrs ret = cocos2d::GLView::getGLContextAttrs(); + #pragma warning NO CONVERSION FROM NATIVE FOR GLContextAttrs; + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLView:getGLContextAttrs",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getGLContextAttrs'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_GLView_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (GLView)"); + return 0; +} + +int lua_register_cocos2dx_GLView(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.GLView"); + tolua_cclass(tolua_S,"GLView","cc.GLView","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"GLView"); + tolua_function(tolua_S,"setFrameSize",lua_cocos2dx_GLView_setFrameSize); + tolua_function(tolua_S,"getViewPortRect",lua_cocos2dx_GLView_getViewPortRect); + tolua_function(tolua_S,"setContentScaleFactor",lua_cocos2dx_GLView_setContentScaleFactor); + tolua_function(tolua_S,"getContentScaleFactor",lua_cocos2dx_GLView_getContentScaleFactor); + tolua_function(tolua_S,"setIMEKeyboardState",lua_cocos2dx_GLView_setIMEKeyboardState); + tolua_function(tolua_S,"setScissorInPoints",lua_cocos2dx_GLView_setScissorInPoints); + tolua_function(tolua_S,"getViewName",lua_cocos2dx_GLView_getViewName); + tolua_function(tolua_S,"isOpenGLReady",lua_cocos2dx_GLView_isOpenGLReady); + tolua_function(tolua_S,"setCursorVisible",lua_cocos2dx_GLView_setCursorVisible); + tolua_function(tolua_S,"end",lua_cocos2dx_GLView_end); + tolua_function(tolua_S,"getScaleY",lua_cocos2dx_GLView_getScaleY); + tolua_function(tolua_S,"getScaleX",lua_cocos2dx_GLView_getScaleX); + tolua_function(tolua_S,"getVisibleOrigin",lua_cocos2dx_GLView_getVisibleOrigin); + tolua_function(tolua_S,"getFrameSize",lua_cocos2dx_GLView_getFrameSize); + tolua_function(tolua_S,"setFrameZoomFactor",lua_cocos2dx_GLView_setFrameZoomFactor); + tolua_function(tolua_S,"getFrameZoomFactor",lua_cocos2dx_GLView_getFrameZoomFactor); + tolua_function(tolua_S,"getDesignResolutionSize",lua_cocos2dx_GLView_getDesignResolutionSize); + tolua_function(tolua_S,"windowShouldClose",lua_cocos2dx_GLView_windowShouldClose); + tolua_function(tolua_S,"swapBuffers",lua_cocos2dx_GLView_swapBuffers); + tolua_function(tolua_S,"setDesignResolutionSize",lua_cocos2dx_GLView_setDesignResolutionSize); + tolua_function(tolua_S,"getResolutionPolicy",lua_cocos2dx_GLView_getResolutionPolicy); + tolua_function(tolua_S,"isRetinaDisplay",lua_cocos2dx_GLView_isRetinaDisplay); + tolua_function(tolua_S,"setViewPortInPoints",lua_cocos2dx_GLView_setViewPortInPoints); + tolua_function(tolua_S,"getScissorRect",lua_cocos2dx_GLView_getScissorRect); + tolua_function(tolua_S,"getRetinaFactor",lua_cocos2dx_GLView_getRetinaFactor); + tolua_function(tolua_S,"setViewName",lua_cocos2dx_GLView_setViewName); + tolua_function(tolua_S,"getVisibleRect",lua_cocos2dx_GLView_getVisibleRect); + tolua_function(tolua_S,"getVisibleSize",lua_cocos2dx_GLView_getVisibleSize); + tolua_function(tolua_S,"isScissorEnabled",lua_cocos2dx_GLView_isScissorEnabled); + tolua_function(tolua_S,"pollEvents",lua_cocos2dx_GLView_pollEvents); + tolua_function(tolua_S,"setGLContextAttrs", lua_cocos2dx_GLView_setGLContextAttrs); + tolua_function(tolua_S,"getGLContextAttrs", lua_cocos2dx_GLView_getGLContextAttrs); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::GLView).name(); + g_luaType[typeName] = "cc.GLView"; + g_typeCast["GLView"] = "cc.GLView"; + return 1; +} + +int lua_cocos2dx_Director_pause(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_pause'", 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_Director_pause'", nullptr); + return 0; + } + cobj->pause(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:pause",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_pause'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setEventDispatcher(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setEventDispatcher'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::EventDispatcher* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.EventDispatcher",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setEventDispatcher'", nullptr); + return 0; + } + cobj->setEventDispatcher(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setEventDispatcher",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setEventDispatcher'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setContentScaleFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setContentScaleFactor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Director:setContentScaleFactor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setContentScaleFactor'", nullptr); + return 0; + } + cobj->setContentScaleFactor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setContentScaleFactor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setContentScaleFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getContentScaleFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getContentScaleFactor'", 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_Director_getContentScaleFactor'", nullptr); + return 0; + } + double ret = cobj->getContentScaleFactor(); + 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.Director:getContentScaleFactor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getContentScaleFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getWinSizeInPixels(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getWinSizeInPixels'", 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_Director_getWinSizeInPixels'", nullptr); + return 0; + } + cocos2d::Size ret = cobj->getWinSizeInPixels(); + size_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getWinSizeInPixels",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getWinSizeInPixels'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getDeltaTime(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getDeltaTime'", 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_Director_getDeltaTime'", nullptr); + return 0; + } + double ret = cobj->getDeltaTime(); + 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.Director:getDeltaTime",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getDeltaTime'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setGLDefaultValues(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setGLDefaultValues'", 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_Director_setGLDefaultValues'", nullptr); + return 0; + } + cobj->setGLDefaultValues(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setGLDefaultValues",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setGLDefaultValues'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setActionManager(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setActionManager'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionManager* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionManager",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setActionManager'", nullptr); + return 0; + } + cobj->setActionManager(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setActionManager",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setActionManager'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setAlphaBlending(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setAlphaBlending'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Director:setAlphaBlending"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setAlphaBlending'", nullptr); + return 0; + } + cobj->setAlphaBlending(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setAlphaBlending",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setAlphaBlending'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_popToRootScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_popToRootScene'", 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_Director_popToRootScene'", nullptr); + return 0; + } + cobj->popToRootScene(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:popToRootScene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_popToRootScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_loadMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_loadMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::MATRIX_STACK_TYPE arg0; + cocos2d::Mat4 arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:loadMatrix"); + + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Director:loadMatrix"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_loadMatrix'", nullptr); + return 0; + } + cobj->loadMatrix(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.Director:loadMatrix",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_loadMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getNotificationNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getNotificationNode'", 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_Director_getNotificationNode'", nullptr); + return 0; + } + cocos2d::Node* ret = cobj->getNotificationNode(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getNotificationNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getNotificationNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getWinSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getWinSize'", 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_Director_getWinSize'", nullptr); + return 0; + } + const cocos2d::Size& ret = cobj->getWinSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getWinSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getWinSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getTextureCache(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getTextureCache'", 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_Director_getTextureCache'", nullptr); + return 0; + } + cocos2d::TextureCache* ret = cobj->getTextureCache(); + object_to_luaval(tolua_S, "cc.TextureCache",(cocos2d::TextureCache*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getTextureCache",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getTextureCache'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_isSendCleanupToScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_isSendCleanupToScene'", 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_Director_isSendCleanupToScene'", nullptr); + return 0; + } + bool ret = cobj->isSendCleanupToScene(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:isSendCleanupToScene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_isSendCleanupToScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getVisibleOrigin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getVisibleOrigin'", 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_Director_getVisibleOrigin'", nullptr); + return 0; + } + cocos2d::Vec2 ret = cobj->getVisibleOrigin(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getVisibleOrigin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getVisibleOrigin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_mainLoop(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_mainLoop'", 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_Director_mainLoop'", nullptr); + return 0; + } + cobj->mainLoop(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:mainLoop",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_mainLoop'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setDepthTest(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setDepthTest'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Director:setDepthTest"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setDepthTest'", nullptr); + return 0; + } + cobj->setDepthTest(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setDepthTest",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setDepthTest'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getFrameRate(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getFrameRate'", 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_Director_getFrameRate'", nullptr); + return 0; + } + double ret = cobj->getFrameRate(); + 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.Director:getFrameRate",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getFrameRate'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getSecondsPerFrame(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getSecondsPerFrame'", 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_Director_getSecondsPerFrame'", nullptr); + return 0; + } + double ret = cobj->getSecondsPerFrame(); + 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.Director:getSecondsPerFrame",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getSecondsPerFrame'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_resetMatrixStack(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_resetMatrixStack'", 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_Director_resetMatrixStack'", nullptr); + return 0; + } + cobj->resetMatrixStack(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:resetMatrixStack",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_resetMatrixStack'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_convertToUI(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_convertToUI'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Director:convertToUI"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_convertToUI'", nullptr); + return 0; + } + cocos2d::Vec2 ret = cobj->convertToUI(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.Director:convertToUI",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_convertToUI'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_pushMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_pushMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::MATRIX_STACK_TYPE arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:pushMatrix"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_pushMatrix'", nullptr); + return 0; + } + cobj->pushMatrix(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:pushMatrix",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_pushMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setDefaultValues(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setDefaultValues'", 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_Director_setDefaultValues'", nullptr); + return 0; + } + cobj->setDefaultValues(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setDefaultValues",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setDefaultValues'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_init(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_init'", 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_Director_init'", nullptr); + return 0; + } + bool ret = cobj->init(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:init",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_init'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setScheduler(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setScheduler'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Scheduler* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Scheduler",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setScheduler'", nullptr); + return 0; + } + cobj->setScheduler(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setScheduler",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setScheduler'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::MATRIX_STACK_TYPE arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:getMatrix"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_getMatrix'", nullptr); + return 0; + } + const cocos2d::Mat4& ret = cobj->getMatrix(arg0); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getMatrix",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_startAnimation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_startAnimation'", 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_Director_startAnimation'", nullptr); + return 0; + } + cobj->startAnimation(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:startAnimation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_startAnimation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getOpenGLView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getOpenGLView'", 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_Director_getOpenGLView'", nullptr); + return 0; + } + cocos2d::GLView* ret = cobj->getOpenGLView(); + object_to_luaval(tolua_S, "cc.GLView",(cocos2d::GLView*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getOpenGLView",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getOpenGLView'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getRunningScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getRunningScene'", 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_Director_getRunningScene'", nullptr); + return 0; + } + cocos2d::Scene* ret = cobj->getRunningScene(); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getRunningScene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getRunningScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setViewport(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setViewport'", 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_Director_setViewport'", nullptr); + return 0; + } + cobj->setViewport(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setViewport",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setViewport'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_stopAnimation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_stopAnimation'", 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_Director_stopAnimation'", nullptr); + return 0; + } + cobj->stopAnimation(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:stopAnimation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_stopAnimation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_popToSceneStackLevel(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_popToSceneStackLevel'", 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.Director:popToSceneStackLevel"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_popToSceneStackLevel'", nullptr); + return 0; + } + cobj->popToSceneStackLevel(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:popToSceneStackLevel",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_popToSceneStackLevel'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_resume(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_resume'", 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_Director_resume'", nullptr); + return 0; + } + cobj->resume(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:resume",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_resume'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_isNextDeltaTimeZero(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_isNextDeltaTimeZero'", 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_Director_isNextDeltaTimeZero'", nullptr); + return 0; + } + bool ret = cobj->isNextDeltaTimeZero(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:isNextDeltaTimeZero",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_isNextDeltaTimeZero'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setClearColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setClearColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Color4F arg0; + + ok &=luaval_to_color4f(tolua_S, 2, &arg0, "cc.Director:setClearColor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setClearColor'", nullptr); + return 0; + } + cobj->setClearColor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setClearColor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setClearColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_end(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_end'", 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_Director_end'", nullptr); + return 0; + } + cobj->end(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:end",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_end'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setOpenGLView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setOpenGLView'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLView* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLView",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setOpenGLView'", nullptr); + return 0; + } + cobj->setOpenGLView(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setOpenGLView",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setOpenGLView'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_convertToGL(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_convertToGL'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Director:convertToGL"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_convertToGL'", nullptr); + return 0; + } + cocos2d::Vec2 ret = cobj->convertToGL(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.Director:convertToGL",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_convertToGL'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_purgeCachedData(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_purgeCachedData'", 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_Director_purgeCachedData'", nullptr); + return 0; + } + cobj->purgeCachedData(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:purgeCachedData",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_purgeCachedData'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getTotalFrames(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getTotalFrames'", 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_Director_getTotalFrames'", nullptr); + return 0; + } + unsigned int ret = cobj->getTotalFrames(); + 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.Director:getTotalFrames",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getTotalFrames'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_runWithScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_runWithScene'", 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_Director_runWithScene'", nullptr); + return 0; + } + cobj->runWithScene(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:runWithScene",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_runWithScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setNotificationNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setNotificationNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setNotificationNode'", nullptr); + return 0; + } + cobj->setNotificationNode(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setNotificationNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setNotificationNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_drawScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_drawScene'", 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_Director_drawScene'", nullptr); + return 0; + } + cobj->drawScene(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:drawScene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_drawScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_restart(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_restart'", 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_Director_restart'", nullptr); + return 0; + } + cobj->restart(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:restart",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_restart'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_popScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_popScene'", 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_Director_popScene'", nullptr); + return 0; + } + cobj->popScene(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:popScene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_popScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_loadIdentityMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_loadIdentityMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::MATRIX_STACK_TYPE arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:loadIdentityMatrix"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_loadIdentityMatrix'", nullptr); + return 0; + } + cobj->loadIdentityMatrix(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:loadIdentityMatrix",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_loadIdentityMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_isDisplayStats(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_isDisplayStats'", 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_Director_isDisplayStats'", nullptr); + return 0; + } + bool ret = cobj->isDisplayStats(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:isDisplayStats",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_isDisplayStats'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setProjection(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setProjection'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Director::Projection arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:setProjection"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setProjection'", nullptr); + return 0; + } + cobj->setProjection(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setProjection",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setProjection'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getConsole(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getConsole'", 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_Director_getConsole'", nullptr); + return 0; + } + cocos2d::Console* ret = cobj->getConsole(); + object_to_luaval(tolua_S, "cc.Console",(cocos2d::Console*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getConsole",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getConsole'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_multiplyMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_multiplyMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::MATRIX_STACK_TYPE arg0; + cocos2d::Mat4 arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:multiplyMatrix"); + + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Director:multiplyMatrix"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_multiplyMatrix'", nullptr); + return 0; + } + cobj->multiplyMatrix(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.Director:multiplyMatrix",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_multiplyMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getZEye(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getZEye'", 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_Director_getZEye'", nullptr); + return 0; + } + double ret = cobj->getZEye(); + 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.Director:getZEye",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getZEye'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setNextDeltaTimeZero(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setNextDeltaTimeZero'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Director:setNextDeltaTimeZero"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setNextDeltaTimeZero'", nullptr); + return 0; + } + cobj->setNextDeltaTimeZero(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setNextDeltaTimeZero",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setNextDeltaTimeZero'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_popMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_popMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::MATRIX_STACK_TYPE arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:popMatrix"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_popMatrix'", nullptr); + return 0; + } + cobj->popMatrix(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:popMatrix",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_popMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getVisibleSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getVisibleSize'", 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_Director_getVisibleSize'", nullptr); + return 0; + } + cocos2d::Size ret = cobj->getVisibleSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getVisibleSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getVisibleSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getScheduler(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getScheduler'", 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_Director_getScheduler'", nullptr); + return 0; + } + cocos2d::Scheduler* ret = cobj->getScheduler(); + object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getScheduler",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getScheduler'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_pushScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_pushScene'", 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_Director_pushScene'", nullptr); + return 0; + } + cobj->pushScene(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:pushScene",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_pushScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getAnimationInterval(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getAnimationInterval'", 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_Director_getAnimationInterval'", nullptr); + return 0; + } + double ret = cobj->getAnimationInterval(); + 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.Director:getAnimationInterval",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getAnimationInterval'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_isPaused(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_isPaused'", 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_Director_isPaused'", nullptr); + return 0; + } + bool ret = cobj->isPaused(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:isPaused",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_isPaused'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setDisplayStats(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setDisplayStats'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Director:setDisplayStats"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setDisplayStats'", nullptr); + return 0; + } + cobj->setDisplayStats(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setDisplayStats",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setDisplayStats'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getEventDispatcher(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getEventDispatcher'", 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_Director_getEventDispatcher'", nullptr); + return 0; + } + cocos2d::EventDispatcher* ret = cobj->getEventDispatcher(); + object_to_luaval(tolua_S, "cc.EventDispatcher",(cocos2d::EventDispatcher*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getEventDispatcher",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getEventDispatcher'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_replaceScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_replaceScene'", 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_Director_replaceScene'", nullptr); + return 0; + } + cobj->replaceScene(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:replaceScene",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_replaceScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_setAnimationInterval(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setAnimationInterval'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Director:setAnimationInterval"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setAnimationInterval'", nullptr); + return 0; + } + cobj->setAnimationInterval(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setAnimationInterval",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setAnimationInterval'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getActionManager(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Director* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getActionManager'", 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_Director_getActionManager'", nullptr); + return 0; + } + cocos2d::ActionManager* ret = cobj->getActionManager(); + object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getActionManager",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getActionManager'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Director_getInstance(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.Director",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_Director_getInstance'", nullptr); + return 0; + } + cocos2d::Director* ret = cocos2d::Director::getInstance(); + object_to_luaval(tolua_S, "cc.Director",(cocos2d::Director*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Director:getInstance",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getInstance'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Director_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Director)"); + return 0; +} + +int lua_register_cocos2dx_Director(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Director"); + tolua_cclass(tolua_S,"Director","cc.Director","",nullptr); + + tolua_beginmodule(tolua_S,"Director"); + tolua_function(tolua_S,"pause",lua_cocos2dx_Director_pause); + tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Director_setEventDispatcher); + tolua_function(tolua_S,"setContentScaleFactor",lua_cocos2dx_Director_setContentScaleFactor); + tolua_function(tolua_S,"getContentScaleFactor",lua_cocos2dx_Director_getContentScaleFactor); + tolua_function(tolua_S,"getWinSizeInPixels",lua_cocos2dx_Director_getWinSizeInPixels); + tolua_function(tolua_S,"getDeltaTime",lua_cocos2dx_Director_getDeltaTime); + tolua_function(tolua_S,"setGLDefaultValues",lua_cocos2dx_Director_setGLDefaultValues); + tolua_function(tolua_S,"setActionManager",lua_cocos2dx_Director_setActionManager); + tolua_function(tolua_S,"setAlphaBlending",lua_cocos2dx_Director_setAlphaBlending); + tolua_function(tolua_S,"popToRootScene",lua_cocos2dx_Director_popToRootScene); + tolua_function(tolua_S,"loadMatrix",lua_cocos2dx_Director_loadMatrix); + tolua_function(tolua_S,"getNotificationNode",lua_cocos2dx_Director_getNotificationNode); + tolua_function(tolua_S,"getWinSize",lua_cocos2dx_Director_getWinSize); + tolua_function(tolua_S,"getTextureCache",lua_cocos2dx_Director_getTextureCache); + tolua_function(tolua_S,"isSendCleanupToScene",lua_cocos2dx_Director_isSendCleanupToScene); + tolua_function(tolua_S,"getVisibleOrigin",lua_cocos2dx_Director_getVisibleOrigin); + tolua_function(tolua_S,"mainLoop",lua_cocos2dx_Director_mainLoop); + tolua_function(tolua_S,"setDepthTest",lua_cocos2dx_Director_setDepthTest); + tolua_function(tolua_S,"getFrameRate",lua_cocos2dx_Director_getFrameRate); + tolua_function(tolua_S,"getSecondsPerFrame",lua_cocos2dx_Director_getSecondsPerFrame); + tolua_function(tolua_S,"resetMatrixStack",lua_cocos2dx_Director_resetMatrixStack); + tolua_function(tolua_S,"convertToUI",lua_cocos2dx_Director_convertToUI); + tolua_function(tolua_S,"pushMatrix",lua_cocos2dx_Director_pushMatrix); + tolua_function(tolua_S,"setDefaultValues",lua_cocos2dx_Director_setDefaultValues); + tolua_function(tolua_S,"init",lua_cocos2dx_Director_init); + tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Director_setScheduler); + tolua_function(tolua_S,"getMatrix",lua_cocos2dx_Director_getMatrix); + tolua_function(tolua_S,"startAnimation",lua_cocos2dx_Director_startAnimation); + tolua_function(tolua_S,"getOpenGLView",lua_cocos2dx_Director_getOpenGLView); + tolua_function(tolua_S,"getRunningScene",lua_cocos2dx_Director_getRunningScene); + tolua_function(tolua_S,"setViewport",lua_cocos2dx_Director_setViewport); + tolua_function(tolua_S,"stopAnimation",lua_cocos2dx_Director_stopAnimation); + tolua_function(tolua_S,"popToSceneStackLevel",lua_cocos2dx_Director_popToSceneStackLevel); + tolua_function(tolua_S,"resume",lua_cocos2dx_Director_resume); + tolua_function(tolua_S,"isNextDeltaTimeZero",lua_cocos2dx_Director_isNextDeltaTimeZero); + tolua_function(tolua_S,"setClearColor",lua_cocos2dx_Director_setClearColor); + tolua_function(tolua_S,"endToLua",lua_cocos2dx_Director_end); + tolua_function(tolua_S,"setOpenGLView",lua_cocos2dx_Director_setOpenGLView); + tolua_function(tolua_S,"convertToGL",lua_cocos2dx_Director_convertToGL); + tolua_function(tolua_S,"purgeCachedData",lua_cocos2dx_Director_purgeCachedData); + tolua_function(tolua_S,"getTotalFrames",lua_cocos2dx_Director_getTotalFrames); + tolua_function(tolua_S,"runWithScene",lua_cocos2dx_Director_runWithScene); + tolua_function(tolua_S,"setNotificationNode",lua_cocos2dx_Director_setNotificationNode); + tolua_function(tolua_S,"drawScene",lua_cocos2dx_Director_drawScene); + tolua_function(tolua_S,"restart",lua_cocos2dx_Director_restart); + tolua_function(tolua_S,"popScene",lua_cocos2dx_Director_popScene); + tolua_function(tolua_S,"loadIdentityMatrix",lua_cocos2dx_Director_loadIdentityMatrix); + tolua_function(tolua_S,"isDisplayStats",lua_cocos2dx_Director_isDisplayStats); + tolua_function(tolua_S,"setProjection",lua_cocos2dx_Director_setProjection); + tolua_function(tolua_S,"getConsole",lua_cocos2dx_Director_getConsole); + tolua_function(tolua_S,"multiplyMatrix",lua_cocos2dx_Director_multiplyMatrix); + tolua_function(tolua_S,"getZEye",lua_cocos2dx_Director_getZEye); + tolua_function(tolua_S,"setNextDeltaTimeZero",lua_cocos2dx_Director_setNextDeltaTimeZero); + tolua_function(tolua_S,"popMatrix",lua_cocos2dx_Director_popMatrix); + tolua_function(tolua_S,"getVisibleSize",lua_cocos2dx_Director_getVisibleSize); + tolua_function(tolua_S,"getScheduler",lua_cocos2dx_Director_getScheduler); + tolua_function(tolua_S,"pushScene",lua_cocos2dx_Director_pushScene); + tolua_function(tolua_S,"getAnimationInterval",lua_cocos2dx_Director_getAnimationInterval); + tolua_function(tolua_S,"isPaused",lua_cocos2dx_Director_isPaused); + tolua_function(tolua_S,"setDisplayStats",lua_cocos2dx_Director_setDisplayStats); + tolua_function(tolua_S,"getEventDispatcher",lua_cocos2dx_Director_getEventDispatcher); + tolua_function(tolua_S,"replaceScene",lua_cocos2dx_Director_replaceScene); + tolua_function(tolua_S,"setAnimationInterval",lua_cocos2dx_Director_setAnimationInterval); + tolua_function(tolua_S,"getActionManager",lua_cocos2dx_Director_getActionManager); + tolua_function(tolua_S,"getInstance", lua_cocos2dx_Director_getInstance); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Director).name(); + g_luaType[typeName] = "cc.Director"; + g_typeCast["Director"] = "cc.Director"; + return 1; +} + +int lua_cocos2dx_Timer_getInterval(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Timer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_getInterval'", 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_Timer_getInterval'", nullptr); + return 0; + } + double ret = cobj->getInterval(); + 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.Timer:getInterval",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_getInterval'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Timer_setupTimerWithInterval(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Timer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_setupTimerWithInterval'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + double arg0; + unsigned int arg1; + double arg2; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Timer:setupTimerWithInterval"); + + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.Timer:setupTimerWithInterval"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Timer:setupTimerWithInterval"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Timer_setupTimerWithInterval'", nullptr); + return 0; + } + cobj->setupTimerWithInterval(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.Timer:setupTimerWithInterval",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_setupTimerWithInterval'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Timer_setInterval(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Timer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_setInterval'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Timer:setInterval"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Timer_setInterval'", nullptr); + return 0; + } + cobj->setInterval(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Timer:setInterval",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_setInterval'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Timer_update(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Timer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_update'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Timer:update"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Timer_update'", nullptr); + return 0; + } + cobj->update(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Timer:update",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_update'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Timer_trigger(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Timer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_trigger'", 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_Timer_trigger'", nullptr); + return 0; + } + cobj->trigger(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Timer:trigger",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_trigger'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Timer_cancel(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Timer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_cancel'", 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_Timer_cancel'", nullptr); + return 0; + } + cobj->cancel(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Timer:cancel",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_cancel'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_Timer_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Timer)"); + return 0; +} + +int lua_register_cocos2dx_Timer(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Timer"); + tolua_cclass(tolua_S,"Timer","cc.Timer","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Timer"); + tolua_function(tolua_S,"getInterval",lua_cocos2dx_Timer_getInterval); + tolua_function(tolua_S,"setupTimerWithInterval",lua_cocos2dx_Timer_setupTimerWithInterval); + tolua_function(tolua_S,"setInterval",lua_cocos2dx_Timer_setInterval); + tolua_function(tolua_S,"update",lua_cocos2dx_Timer_update); + tolua_function(tolua_S,"trigger",lua_cocos2dx_Timer_trigger); + tolua_function(tolua_S,"cancel",lua_cocos2dx_Timer_cancel); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Timer).name(); + g_luaType[typeName] = "cc.Timer"; + g_typeCast["Timer"] = "cc.Timer"; + return 1; +} + +int lua_cocos2dx_Scheduler_setTimeScale(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Scheduler* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Scheduler",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Scheduler*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scheduler_setTimeScale'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Scheduler:setTimeScale"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scheduler_setTimeScale'", nullptr); + return 0; + } + cobj->setTimeScale(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scheduler:setTimeScale",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scheduler_setTimeScale'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Scheduler_getTimeScale(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Scheduler* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Scheduler",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Scheduler*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scheduler_getTimeScale'", 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_Scheduler_getTimeScale'", nullptr); + return 0; + } + double ret = cobj->getTimeScale(); + 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.Scheduler:getTimeScale",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scheduler_getTimeScale'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Scheduler_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Scheduler* 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_Scheduler_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Scheduler(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Scheduler"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scheduler:Scheduler",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scheduler_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Scheduler_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Scheduler)"); + return 0; +} + +int lua_register_cocos2dx_Scheduler(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Scheduler"); + tolua_cclass(tolua_S,"Scheduler","cc.Scheduler","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Scheduler"); + tolua_function(tolua_S,"new",lua_cocos2dx_Scheduler_constructor); + tolua_function(tolua_S,"setTimeScale",lua_cocos2dx_Scheduler_setTimeScale); + tolua_function(tolua_S,"getTimeScale",lua_cocos2dx_Scheduler_getTimeScale); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Scheduler).name(); + g_luaType[typeName] = "cc.Scheduler"; + g_typeCast["Scheduler"] = "cc.Scheduler"; + return 1; +} + +int lua_cocos2dx_AsyncTaskPool_stopTasks(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AsyncTaskPool* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AsyncTaskPool",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AsyncTaskPool*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AsyncTaskPool_stopTasks'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::AsyncTaskPool::TaskType arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AsyncTaskPool:stopTasks"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_AsyncTaskPool_stopTasks'", nullptr); + return 0; + } + cobj->stopTasks(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.AsyncTaskPool:stopTasks",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AsyncTaskPool_stopTasks'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AsyncTaskPool_destoryInstance(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.AsyncTaskPool",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_AsyncTaskPool_destoryInstance'", nullptr); + return 0; + } + cocos2d::AsyncTaskPool::destoryInstance(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AsyncTaskPool:destoryInstance",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AsyncTaskPool_destoryInstance'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_AsyncTaskPool_getInstance(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.AsyncTaskPool",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_AsyncTaskPool_getInstance'", nullptr); + return 0; + } + cocos2d::AsyncTaskPool* ret = cocos2d::AsyncTaskPool::getInstance(); + object_to_luaval(tolua_S, "cc.AsyncTaskPool",(cocos2d::AsyncTaskPool*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AsyncTaskPool:getInstance",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AsyncTaskPool_getInstance'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_AsyncTaskPool_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AsyncTaskPool* 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_AsyncTaskPool_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::AsyncTaskPool(); + tolua_pushusertype(tolua_S,(void*)cobj,"cc.AsyncTaskPool"); + 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.AsyncTaskPool:AsyncTaskPool",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AsyncTaskPool_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_AsyncTaskPool_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (AsyncTaskPool)"); + return 0; +} + +int lua_register_cocos2dx_AsyncTaskPool(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.AsyncTaskPool"); + tolua_cclass(tolua_S,"AsyncTaskPool","cc.AsyncTaskPool","",nullptr); + + tolua_beginmodule(tolua_S,"AsyncTaskPool"); + tolua_function(tolua_S,"new",lua_cocos2dx_AsyncTaskPool_constructor); + tolua_function(tolua_S,"stopTasks",lua_cocos2dx_AsyncTaskPool_stopTasks); + tolua_function(tolua_S,"destoryInstance", lua_cocos2dx_AsyncTaskPool_destoryInstance); + tolua_function(tolua_S,"getInstance", lua_cocos2dx_AsyncTaskPool_getInstance); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::AsyncTaskPool).name(); + g_luaType[typeName] = "cc.AsyncTaskPool"; + g_typeCast["AsyncTaskPool"] = "cc.AsyncTaskPool"; + return 1; +} + +int lua_cocos2dx_Action_startWithTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_startWithTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_startWithTarget'", nullptr); + return 0; + } + cobj->startWithTarget(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:startWithTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_startWithTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_setOriginalTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_setOriginalTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_setOriginalTarget'", nullptr); + return 0; + } + cobj->setOriginalTarget(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:setOriginalTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_setOriginalTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_clone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_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_Action_clone'", nullptr); + return 0; + } + cocos2d::Action* ret = cobj->clone(); + object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:clone",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_clone'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_getOriginalTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_getOriginalTarget'", 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_Action_getOriginalTarget'", nullptr); + return 0; + } + cocos2d::Node* ret = cobj->getOriginalTarget(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:getOriginalTarget",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_getOriginalTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_stop(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_stop'", 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_Action_stop'", nullptr); + return 0; + } + cobj->stop(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:stop",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_stop'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_update(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_update'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Action:update"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_update'", nullptr); + return 0; + } + cobj->update(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:update",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_update'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_getTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_getTarget'", 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_Action_getTarget'", nullptr); + return 0; + } + cocos2d::Node* ret = cobj->getTarget(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:getTarget",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_getTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_step(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_step'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Action:step"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_step'", nullptr); + return 0; + } + cobj->step(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:step",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_step'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_setTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_setTag'", 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.Action:setTag"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_setTag'", nullptr); + return 0; + } + cobj->setTag(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:setTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_setTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_getTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_getTag'", 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_Action_getTag'", nullptr); + return 0; + } + int ret = cobj->getTag(); + 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.Action:getTag",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_getTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_setTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_setTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_setTarget'", nullptr); + return 0; + } + cobj->setTarget(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:setTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_setTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_isDone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_isDone'", 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_Action_isDone'", nullptr); + return 0; + } + bool ret = cobj->isDone(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:isDone",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_isDone'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Action_reverse(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Action* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Action",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Action*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Action_reverse'", 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_Action_reverse'", nullptr); + return 0; + } + cocos2d::Action* ret = cobj->reverse(); + object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Action:reverse",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Action_reverse'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_Action_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Action)"); + return 0; +} + +int lua_register_cocos2dx_Action(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Action"); + tolua_cclass(tolua_S,"Action","cc.Action","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Action"); + tolua_function(tolua_S,"startWithTarget",lua_cocos2dx_Action_startWithTarget); + tolua_function(tolua_S,"setOriginalTarget",lua_cocos2dx_Action_setOriginalTarget); + tolua_function(tolua_S,"clone",lua_cocos2dx_Action_clone); + tolua_function(tolua_S,"getOriginalTarget",lua_cocos2dx_Action_getOriginalTarget); + tolua_function(tolua_S,"stop",lua_cocos2dx_Action_stop); + tolua_function(tolua_S,"update",lua_cocos2dx_Action_update); + tolua_function(tolua_S,"getTarget",lua_cocos2dx_Action_getTarget); + tolua_function(tolua_S,"step",lua_cocos2dx_Action_step); + tolua_function(tolua_S,"setTag",lua_cocos2dx_Action_setTag); + tolua_function(tolua_S,"getTag",lua_cocos2dx_Action_getTag); + tolua_function(tolua_S,"setTarget",lua_cocos2dx_Action_setTarget); + tolua_function(tolua_S,"isDone",lua_cocos2dx_Action_isDone); + tolua_function(tolua_S,"reverse",lua_cocos2dx_Action_reverse); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Action).name(); + g_luaType[typeName] = "cc.Action"; + g_typeCast["Action"] = "cc.Action"; + return 1; +} + +int lua_cocos2dx_FiniteTimeAction_setDuration(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::FiniteTimeAction* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.FiniteTimeAction",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::FiniteTimeAction*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FiniteTimeAction_setDuration'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.FiniteTimeAction:setDuration"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FiniteTimeAction_setDuration'", nullptr); + return 0; + } + cobj->setDuration(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FiniteTimeAction:setDuration",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FiniteTimeAction_setDuration'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_FiniteTimeAction_getDuration(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::FiniteTimeAction* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.FiniteTimeAction",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::FiniteTimeAction*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FiniteTimeAction_getDuration'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FiniteTimeAction_getDuration'", nullptr); + return 0; + } + double ret = cobj->getDuration(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FiniteTimeAction:getDuration",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FiniteTimeAction_getDuration'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_FiniteTimeAction_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (FiniteTimeAction)"); + return 0; +} + +int lua_register_cocos2dx_FiniteTimeAction(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.FiniteTimeAction"); + tolua_cclass(tolua_S,"FiniteTimeAction","cc.FiniteTimeAction","cc.Action",nullptr); + + tolua_beginmodule(tolua_S,"FiniteTimeAction"); + tolua_function(tolua_S,"setDuration",lua_cocos2dx_FiniteTimeAction_setDuration); + tolua_function(tolua_S,"getDuration",lua_cocos2dx_FiniteTimeAction_getDuration); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::FiniteTimeAction).name(); + g_luaType[typeName] = "cc.FiniteTimeAction"; + g_typeCast["FiniteTimeAction"] = "cc.FiniteTimeAction"; + return 1; +} + +int lua_cocos2dx_Speed_setInnerAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Speed* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_setInnerAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionInterval* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Speed_setInnerAction'", nullptr); + return 0; + } + cobj->setInnerAction(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Speed:setInnerAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_setInnerAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Speed_getSpeed(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Speed* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_getSpeed'", 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_Speed_getSpeed'", nullptr); + return 0; + } + double ret = cobj->getSpeed(); + 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.Speed:getSpeed",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_getSpeed'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Speed_setSpeed(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Speed* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_setSpeed'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Speed:setSpeed"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Speed_setSpeed'", nullptr); + return 0; + } + cobj->setSpeed(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Speed:setSpeed",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_setSpeed'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Speed_initWithAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Speed* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_initWithAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::ActionInterval* arg0; + double arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Speed:initWithAction"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Speed_initWithAction'", nullptr); + return 0; + } + bool ret = cobj->initWithAction(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.Speed:initWithAction",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_initWithAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Speed_getInnerAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Speed* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Speed",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Speed*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Speed_getInnerAction'", 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_Speed_getInnerAction'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->getInnerAction(); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Speed:getInnerAction",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_getInnerAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Speed_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.Speed",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + cocos2d::ActionInterval* arg0; + double arg1; + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Speed:create"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Speed_create'", nullptr); + return 0; + } + cocos2d::Speed* ret = cocos2d::Speed::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Speed",(cocos2d::Speed*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Speed:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Speed_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Speed* 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_Speed_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Speed(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Speed"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Speed:Speed",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Speed_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Speed_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Speed)"); + return 0; +} + +int lua_register_cocos2dx_Speed(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Speed"); + tolua_cclass(tolua_S,"Speed","cc.Speed","cc.Action",nullptr); + + tolua_beginmodule(tolua_S,"Speed"); + tolua_function(tolua_S,"new",lua_cocos2dx_Speed_constructor); + tolua_function(tolua_S,"setInnerAction",lua_cocos2dx_Speed_setInnerAction); + tolua_function(tolua_S,"getSpeed",lua_cocos2dx_Speed_getSpeed); + tolua_function(tolua_S,"setSpeed",lua_cocos2dx_Speed_setSpeed); + tolua_function(tolua_S,"initWithAction",lua_cocos2dx_Speed_initWithAction); + tolua_function(tolua_S,"getInnerAction",lua_cocos2dx_Speed_getInnerAction); + tolua_function(tolua_S,"create", lua_cocos2dx_Speed_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Speed).name(); + g_luaType[typeName] = "cc.Speed"; + g_typeCast["Speed"] = "cc.Speed"; + return 1; +} + +int lua_cocos2dx_Follow_setBoundarySet(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Follow* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Follow",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Follow*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Follow_setBoundarySet'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Follow:setBoundarySet"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_setBoundarySet'", nullptr); + return 0; + } + cobj->setBoundarySet(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Follow:setBoundarySet",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_setBoundarySet'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Follow_initWithTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Follow* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Follow",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Follow*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Follow_initWithTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_initWithTarget'", nullptr); + return 0; + } + bool ret = cobj->initWithTarget(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + if (argc == 2) + { + cocos2d::Node* arg0; + cocos2d::Rect arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Follow:initWithTarget"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_initWithTarget'", nullptr); + return 0; + } + bool ret = cobj->initWithTarget(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.Follow:initWithTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_initWithTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Follow_isBoundarySet(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Follow* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Follow",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Follow*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Follow_isBoundarySet'", 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_Follow_isBoundarySet'", nullptr); + return 0; + } + bool ret = cobj->isBoundarySet(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Follow:isBoundarySet",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_isBoundarySet'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Follow_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.Follow",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_create'", nullptr); + return 0; + } + cocos2d::Follow* ret = cocos2d::Follow::create(arg0); + object_to_luaval(tolua_S, "cc.Follow",(cocos2d::Follow*)ret); + return 1; + } + if (argc == 2) + { + cocos2d::Node* arg0; + cocos2d::Rect arg1; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Follow:create"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_create'", nullptr); + return 0; + } + cocos2d::Follow* ret = cocos2d::Follow::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Follow",(cocos2d::Follow*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Follow:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Follow_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Follow* 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_Follow_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Follow(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Follow"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Follow:Follow",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Follow_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Follow_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Follow)"); + return 0; +} + +int lua_register_cocos2dx_Follow(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Follow"); + tolua_cclass(tolua_S,"Follow","cc.Follow","cc.Action",nullptr); + + tolua_beginmodule(tolua_S,"Follow"); + tolua_function(tolua_S,"new",lua_cocos2dx_Follow_constructor); + tolua_function(tolua_S,"setBoundarySet",lua_cocos2dx_Follow_setBoundarySet); + tolua_function(tolua_S,"initWithTarget",lua_cocos2dx_Follow_initWithTarget); + tolua_function(tolua_S,"isBoundarySet",lua_cocos2dx_Follow_isBoundarySet); + tolua_function(tolua_S,"create", lua_cocos2dx_Follow_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Follow).name(); + g_luaType[typeName] = "cc.Follow"; + g_typeCast["Follow"] = "cc.Follow"; + return 1; +} + int lua_cocos2dx_SpriteFrame_clone(lua_State* tolua_S) { int argc = 0; @@ -18387,10 +24113,10 @@ int lua_register_cocos2dx_TargetedAction(lua_State* tolua_S) return 1; } -int lua_cocos2dx_Scene_setCameraOrderDirty(lua_State* tolua_S) +int lua_cocos2dx_ActionFloat_initWithDuration(lua_State* tolua_S) { int argc = 0; - cocos2d::Scene* cobj = nullptr; + cocos2d::ActionFloat* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -18399,640 +24125,15 @@ int lua_cocos2dx_Scene_setCameraOrderDirty(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Scene",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.ActionFloat",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::Scene*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::ActionFloat*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scene_setCameraOrderDirty'", 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_setCameraOrderDirty'", nullptr); - return 0; - } - cobj->setCameraOrderDirty(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:setCameraOrderDirty",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_setCameraOrderDirty'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Scene_render(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_render'", 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_render'", nullptr); - return 0; - } - cobj->render(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:render",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_render'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Scene_onProjectionChanged(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_onProjectionChanged'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::EventCustom* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.EventCustom",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_onProjectionChanged'", nullptr); - return 0; - } - cobj->onProjectionChanged(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:onProjectionChanged",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_onProjectionChanged'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Scene_initWithSize(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_initWithSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Size arg0; - - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.Scene:initWithSize"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_initWithSize'", nullptr); - return 0; - } - bool ret = cobj->initWithSize(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.Scene:initWithSize",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_initWithSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Scene_getDefaultCamera(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_getDefaultCamera'", 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_getDefaultCamera'", nullptr); - return 0; - } - cocos2d::Camera* ret = cobj->getDefaultCamera(); - object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:getDefaultCamera",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_getDefaultCamera'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Scene_createWithSize(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.Scene",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Size arg0; - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.Scene:createWithSize"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_createWithSize'", nullptr); - return 0; - } - cocos2d::Scene* ret = cocos2d::Scene::createWithSize(arg0); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:createWithSize",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_createWithSize'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Scene_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.Scene",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_Scene_create'", nullptr); - return 0; - } - cocos2d::Scene* ret = cocos2d::Scene::create(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:create",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Scene_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Scene* 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_Scene_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::Scene(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Scene"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:Scene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Scene_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Scene)"); - return 0; -} - -int lua_register_cocos2dx_Scene(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Scene"); - tolua_cclass(tolua_S,"Scene","cc.Scene","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"Scene"); - tolua_function(tolua_S,"new",lua_cocos2dx_Scene_constructor); - tolua_function(tolua_S,"setCameraOrderDirty",lua_cocos2dx_Scene_setCameraOrderDirty); - tolua_function(tolua_S,"render",lua_cocos2dx_Scene_render); - tolua_function(tolua_S,"onProjectionChanged",lua_cocos2dx_Scene_onProjectionChanged); - tolua_function(tolua_S,"initWithSize",lua_cocos2dx_Scene_initWithSize); - tolua_function(tolua_S,"getDefaultCamera",lua_cocos2dx_Scene_getDefaultCamera); - tolua_function(tolua_S,"createWithSize", lua_cocos2dx_Scene_createWithSize); - tolua_function(tolua_S,"create", lua_cocos2dx_Scene_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Scene).name(); - g_luaType[typeName] = "cc.Scene"; - g_typeCast["Scene"] = "cc.Scene"; - return 1; -} - -int lua_cocos2dx_GLView_setFrameSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setFrameSize'", 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.GLView:setFrameSize"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLView:setFrameSize"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setFrameSize'", nullptr); - return 0; - } - cobj->setFrameSize(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.GLView:setFrameSize",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setFrameSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getViewPortRect(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getViewPortRect'", 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_GLView_getViewPortRect'", nullptr); - return 0; - } - const cocos2d::Rect& ret = cobj->getViewPortRect(); - rect_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getViewPortRect",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getViewPortRect'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_setContentScaleFactor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setContentScaleFactor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.GLView:setContentScaleFactor"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setContentScaleFactor'", nullptr); - return 0; - } - bool ret = cobj->setContentScaleFactor(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.GLView:setContentScaleFactor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setContentScaleFactor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getContentScaleFactor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getContentScaleFactor'", 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_GLView_getContentScaleFactor'", nullptr); - return 0; - } - double ret = cobj->getContentScaleFactor(); - 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.GLView:getContentScaleFactor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getContentScaleFactor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_setIMEKeyboardState(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setIMEKeyboardState'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLView:setIMEKeyboardState"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setIMEKeyboardState'", nullptr); - return 0; - } - cobj->setIMEKeyboardState(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setIMEKeyboardState",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setIMEKeyboardState'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_setScissorInPoints(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setScissorInPoints'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionFloat_initWithDuration'", nullptr); return 0; } #endif @@ -19043,38 +24144,147 @@ int lua_cocos2dx_GLView_setScissorInPoints(lua_State* tolua_S) double arg0; double arg1; double arg2; - double arg3; + std::function arg3; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.GLView:setScissorInPoints"); + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ActionFloat:initWithDuration"); - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLView:setScissorInPoints"); + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.ActionFloat:initWithDuration"); - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.GLView:setScissorInPoints"); + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.ActionFloat:initWithDuration"); - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.GLView:setScissorInPoints"); + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setScissorInPoints'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionFloat_initWithDuration'", nullptr); return 0; } - cobj->setScissorInPoints(arg0, arg1, arg2, arg3); - lua_settop(tolua_S, 1); + bool ret = cobj->initWithDuration(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.GLView:setScissorInPoints",argc, 4); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionFloat:initWithDuration",argc, 4); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setScissorInPoints'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionFloat_initWithDuration'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_GLView_getViewName(lua_State* tolua_S) +int lua_cocos2dx_ActionFloat_create(lua_State* tolua_S) { int argc = 0; - cocos2d::GLView* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.ActionFloat",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 4) + { + double arg0; + double arg1; + double arg2; + std::function arg3; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ActionFloat:create"); + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.ActionFloat:create"); + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.ActionFloat:create"); + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionFloat_create'", nullptr); + return 0; + } + cocos2d::ActionFloat* ret = cocos2d::ActionFloat::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.ActionFloat",(cocos2d::ActionFloat*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ActionFloat:create",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionFloat_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_ActionFloat_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionFloat* 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_ActionFloat_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::ActionFloat(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ActionFloat"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionFloat:ActionFloat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionFloat_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_ActionFloat_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ActionFloat)"); + return 0; +} + +int lua_register_cocos2dx_ActionFloat(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ActionFloat"); + tolua_cclass(tolua_S,"ActionFloat","cc.ActionFloat","cc.ActionInterval",nullptr); + + tolua_beginmodule(tolua_S,"ActionFloat"); + tolua_function(tolua_S,"new",lua_cocos2dx_ActionFloat_constructor); + tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_ActionFloat_initWithDuration); + tolua_function(tolua_S,"create", lua_cocos2dx_ActionFloat_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ActionFloat).name(); + g_luaType[typeName] = "cc.ActionFloat"; + g_typeCast["ActionFloat"] = "cc.ActionFloat"; + return 1; +} + +int lua_cocos2dx_UserDefault_setIntegerForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -19083,15 +24293,404 @@ int lua_cocos2dx_GLView_getViewName(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getViewName'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setIntegerForKey'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + int arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.UserDefault:setIntegerForKey"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.UserDefault:setIntegerForKey"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setIntegerForKey'", nullptr); + return 0; + } + cobj->setIntegerForKey(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.UserDefault:setIntegerForKey",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setIntegerForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_getFloatForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getFloatForKey'", 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.UserDefault:getFloatForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.UserDefault:getFloatForKey"); + + if (!ok) { break; } + double ret = cobj->getFloatForKey(arg0, arg1); + tolua_pushnumber(tolua_S,(lua_Number)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.UserDefault:getFloatForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + double ret = cobj->getFloatForKey(arg0); + 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.UserDefault:getFloatForKey",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getFloatForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_getBoolForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getBoolForKey'", 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.UserDefault:getBoolForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + bool arg1; + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.UserDefault:getBoolForKey"); + + if (!ok) { break; } + bool ret = cobj->getBoolForKey(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)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.UserDefault:getBoolForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + bool ret = cobj->getBoolForKey(arg0); + 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.UserDefault:getBoolForKey",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getBoolForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_setDoubleForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setDoubleForKey'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + double arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.UserDefault:setDoubleForKey"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.UserDefault:setDoubleForKey"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setDoubleForKey'", nullptr); + return 0; + } + cobj->setDoubleForKey(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.UserDefault:setDoubleForKey",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setDoubleForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_setFloatForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setFloatForKey'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + double arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.UserDefault:setFloatForKey"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.UserDefault:setFloatForKey"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setFloatForKey'", nullptr); + return 0; + } + cobj->setFloatForKey(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.UserDefault:setFloatForKey",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setFloatForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_getStringForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getStringForKey'", 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.UserDefault:getStringForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.UserDefault:getStringForKey"); + + if (!ok) { break; } + std::string ret = cobj->getStringForKey(arg0, arg1); + tolua_pushcppstring(tolua_S,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.UserDefault:getStringForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string ret = cobj->getStringForKey(arg0); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + }while(0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.UserDefault:getStringForKey",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getStringForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_setStringForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setStringForKey'", 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.UserDefault:setStringForKey"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.UserDefault:setStringForKey"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setStringForKey'", nullptr); + return 0; + } + cobj->setStringForKey(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.UserDefault:setStringForKey",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setStringForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_flush(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_flush'", nullptr); return 0; } #endif @@ -19101,1135 +24700,263 @@ int lua_cocos2dx_GLView_getViewName(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_getViewName'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_flush'", nullptr); return 0; } - const std::string& ret = cobj->getViewName(); + cobj->flush(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.UserDefault:flush",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_flush'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_getIntegerForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getIntegerForKey'", 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.UserDefault:getIntegerForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.UserDefault:getIntegerForKey"); + + if (!ok) { break; } + int ret = cobj->getIntegerForKey(arg0, arg1); + tolua_pushnumber(tolua_S,(lua_Number)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.UserDefault:getIntegerForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + int ret = cobj->getIntegerForKey(arg0); + 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.UserDefault:getIntegerForKey",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getIntegerForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_getDoubleForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getDoubleForKey'", 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.UserDefault:getDoubleForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.UserDefault:getDoubleForKey"); + + if (!ok) { break; } + double ret = cobj->getDoubleForKey(arg0, arg1); + tolua_pushnumber(tolua_S,(lua_Number)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.UserDefault:getDoubleForKey"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + double ret = cobj->getDoubleForKey(arg0); + 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.UserDefault:getDoubleForKey",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getDoubleForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_setBoolForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setBoolForKey'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + bool arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.UserDefault:setBoolForKey"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.UserDefault:setBoolForKey"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setBoolForKey'", nullptr); + return 0; + } + cobj->setBoolForKey(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.UserDefault:setBoolForKey",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setBoolForKey'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_UserDefault_destroyInstance(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.UserDefault",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_UserDefault_destroyInstance'", nullptr); + return 0; + } + cocos2d::UserDefault::destroyInstance(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.UserDefault:destroyInstance",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_destroyInstance'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_UserDefault_getXMLFilePath(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.UserDefault",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_UserDefault_getXMLFilePath'", nullptr); + return 0; + } + const std::string& ret = cocos2d::UserDefault::getXMLFilePath(); tolua_pushcppstring(tolua_S,ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getViewName",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.UserDefault:getXMLFilePath",argc, 0); return 0; - #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getViewName'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getXMLFilePath'.",&tolua_err); #endif - return 0; } -int lua_cocos2dx_GLView_isOpenGLReady(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_isOpenGLReady'", 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_GLView_isOpenGLReady'", nullptr); - return 0; - } - bool ret = cobj->isOpenGLReady(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:isOpenGLReady",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_isOpenGLReady'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_setCursorVisible(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setCursorVisible'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLView:setCursorVisible"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setCursorVisible'", nullptr); - return 0; - } - cobj->setCursorVisible(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setCursorVisible",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setCursorVisible'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_end(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_end'", 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_GLView_end'", nullptr); - return 0; - } - cobj->end(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:end",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_end'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getScaleY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getScaleY'", 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_GLView_getScaleY'", nullptr); - return 0; - } - double ret = cobj->getScaleY(); - 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.GLView:getScaleY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getScaleY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getScaleX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getScaleX'", 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_GLView_getScaleX'", nullptr); - return 0; - } - double ret = cobj->getScaleX(); - 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.GLView:getScaleX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getScaleX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getVisibleOrigin(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getVisibleOrigin'", 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_GLView_getVisibleOrigin'", nullptr); - return 0; - } - cocos2d::Vec2 ret = cobj->getVisibleOrigin(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getVisibleOrigin",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getVisibleOrigin'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getFrameSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getFrameSize'", 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_GLView_getFrameSize'", nullptr); - return 0; - } - const cocos2d::Size& ret = cobj->getFrameSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getFrameSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getFrameSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_setFrameZoomFactor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setFrameZoomFactor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.GLView:setFrameZoomFactor"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setFrameZoomFactor'", nullptr); - return 0; - } - cobj->setFrameZoomFactor(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setFrameZoomFactor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setFrameZoomFactor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getFrameZoomFactor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getFrameZoomFactor'", 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_GLView_getFrameZoomFactor'", nullptr); - return 0; - } - double ret = cobj->getFrameZoomFactor(); - 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.GLView:getFrameZoomFactor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getFrameZoomFactor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getDesignResolutionSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getDesignResolutionSize'", 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_GLView_getDesignResolutionSize'", nullptr); - return 0; - } - const cocos2d::Size& ret = cobj->getDesignResolutionSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getDesignResolutionSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getDesignResolutionSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_windowShouldClose(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_windowShouldClose'", 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_GLView_windowShouldClose'", nullptr); - return 0; - } - bool ret = cobj->windowShouldClose(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:windowShouldClose",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_windowShouldClose'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_swapBuffers(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_swapBuffers'", 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_GLView_swapBuffers'", nullptr); - return 0; - } - cobj->swapBuffers(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:swapBuffers",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_swapBuffers'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_setDesignResolutionSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setDesignResolutionSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - double arg0; - double arg1; - ResolutionPolicy arg2; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.GLView:setDesignResolutionSize"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLView:setDesignResolutionSize"); - - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.GLView:setDesignResolutionSize"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setDesignResolutionSize'", nullptr); - return 0; - } - cobj->setDesignResolutionSize(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.GLView:setDesignResolutionSize",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setDesignResolutionSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getResolutionPolicy(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getResolutionPolicy'", 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_GLView_getResolutionPolicy'", nullptr); - return 0; - } - int ret = (int)cobj->getResolutionPolicy(); - 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.GLView:getResolutionPolicy",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getResolutionPolicy'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_isRetinaDisplay(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_isRetinaDisplay'", 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_GLView_isRetinaDisplay'", nullptr); - return 0; - } - bool ret = cobj->isRetinaDisplay(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:isRetinaDisplay",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_isRetinaDisplay'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_setViewPortInPoints(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setViewPortInPoints'", 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.GLView:setViewPortInPoints"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLView:setViewPortInPoints"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.GLView:setViewPortInPoints"); - - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.GLView:setViewPortInPoints"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setViewPortInPoints'", nullptr); - return 0; - } - cobj->setViewPortInPoints(arg0, arg1, arg2, arg3); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setViewPortInPoints",argc, 4); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setViewPortInPoints'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getScissorRect(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getScissorRect'", 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_GLView_getScissorRect'", nullptr); - return 0; - } - cocos2d::Rect ret = cobj->getScissorRect(); - rect_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getScissorRect",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getScissorRect'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getRetinaFactor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getRetinaFactor'", 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_GLView_getRetinaFactor'", nullptr); - return 0; - } - int ret = cobj->getRetinaFactor(); - 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.GLView:getRetinaFactor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getRetinaFactor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_setViewName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setViewName'", 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.GLView:setViewName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setViewName'", nullptr); - return 0; - } - cobj->setViewName(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setViewName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setViewName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getVisibleRect(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getVisibleRect'", 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_GLView_getVisibleRect'", nullptr); - return 0; - } - cocos2d::Rect ret = cobj->getVisibleRect(); - rect_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getVisibleRect",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getVisibleRect'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_getVisibleSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getVisibleSize'", 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_GLView_getVisibleSize'", nullptr); - return 0; - } - cocos2d::Size ret = cobj->getVisibleSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getVisibleSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getVisibleSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_isScissorEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_isScissorEnabled'", 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_GLView_isScissorEnabled'", nullptr); - return 0; - } - bool ret = cobj->isScissorEnabled(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:isScissorEnabled",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_isScissorEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_pollEvents(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_pollEvents'", 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_GLView_pollEvents'", nullptr); - return 0; - } - cobj->pollEvents(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:pollEvents",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_pollEvents'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLView_setGLContextAttrs(lua_State* tolua_S) +int lua_cocos2dx_UserDefault_isXMLFileExist(lua_State* tolua_S) { int argc = 0; bool ok = true; @@ -20239,44 +24966,7 @@ int lua_cocos2dx_GLView_setGLContextAttrs(lua_State* tolua_S) #endif #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - GLContextAttrs arg0; - #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs - ok = false; - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setGLContextAttrs'", nullptr); - return 0; - } - cocos2d::GLView::setGLContextAttrs(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLView:setGLContextAttrs",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setGLContextAttrs'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLView_getGLContextAttrs(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.GLView",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertable(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; #endif argc = lua_gettop(tolua_S) - 1; @@ -20285,3754 +24975,51 @@ int lua_cocos2dx_GLView_getGLContextAttrs(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_getGLContextAttrs'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_isXMLFileExist'", nullptr); return 0; } - GLContextAttrs ret = cocos2d::GLView::getGLContextAttrs(); - #pragma warning NO CONVERSION FROM NATIVE FOR GLContextAttrs; + bool ret = cocos2d::UserDefault::isXMLFileExist(); + tolua_pushboolean(tolua_S,(bool)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLView:getGLContextAttrs",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.UserDefault:isXMLFileExist",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getGLContextAttrs'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_isXMLFileExist'.",&tolua_err); #endif return 0; } -static int lua_cocos2dx_GLView_finalize(lua_State* tolua_S) +static int lua_cocos2dx_UserDefault_finalize(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (GLView)"); + printf("luabindings: finalizing LUA object (UserDefault)"); return 0; } -int lua_register_cocos2dx_GLView(lua_State* tolua_S) +int lua_register_cocos2dx_UserDefault(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.GLView"); - tolua_cclass(tolua_S,"GLView","cc.GLView","cc.Ref",nullptr); + tolua_usertype(tolua_S,"cc.UserDefault"); + tolua_cclass(tolua_S,"UserDefault","cc.UserDefault","",nullptr); - tolua_beginmodule(tolua_S,"GLView"); - tolua_function(tolua_S,"setFrameSize",lua_cocos2dx_GLView_setFrameSize); - tolua_function(tolua_S,"getViewPortRect",lua_cocos2dx_GLView_getViewPortRect); - tolua_function(tolua_S,"setContentScaleFactor",lua_cocos2dx_GLView_setContentScaleFactor); - tolua_function(tolua_S,"getContentScaleFactor",lua_cocos2dx_GLView_getContentScaleFactor); - tolua_function(tolua_S,"setIMEKeyboardState",lua_cocos2dx_GLView_setIMEKeyboardState); - tolua_function(tolua_S,"setScissorInPoints",lua_cocos2dx_GLView_setScissorInPoints); - tolua_function(tolua_S,"getViewName",lua_cocos2dx_GLView_getViewName); - tolua_function(tolua_S,"isOpenGLReady",lua_cocos2dx_GLView_isOpenGLReady); - tolua_function(tolua_S,"setCursorVisible",lua_cocos2dx_GLView_setCursorVisible); - tolua_function(tolua_S,"end",lua_cocos2dx_GLView_end); - tolua_function(tolua_S,"getScaleY",lua_cocos2dx_GLView_getScaleY); - tolua_function(tolua_S,"getScaleX",lua_cocos2dx_GLView_getScaleX); - tolua_function(tolua_S,"getVisibleOrigin",lua_cocos2dx_GLView_getVisibleOrigin); - tolua_function(tolua_S,"getFrameSize",lua_cocos2dx_GLView_getFrameSize); - tolua_function(tolua_S,"setFrameZoomFactor",lua_cocos2dx_GLView_setFrameZoomFactor); - tolua_function(tolua_S,"getFrameZoomFactor",lua_cocos2dx_GLView_getFrameZoomFactor); - tolua_function(tolua_S,"getDesignResolutionSize",lua_cocos2dx_GLView_getDesignResolutionSize); - tolua_function(tolua_S,"windowShouldClose",lua_cocos2dx_GLView_windowShouldClose); - tolua_function(tolua_S,"swapBuffers",lua_cocos2dx_GLView_swapBuffers); - tolua_function(tolua_S,"setDesignResolutionSize",lua_cocos2dx_GLView_setDesignResolutionSize); - tolua_function(tolua_S,"getResolutionPolicy",lua_cocos2dx_GLView_getResolutionPolicy); - tolua_function(tolua_S,"isRetinaDisplay",lua_cocos2dx_GLView_isRetinaDisplay); - tolua_function(tolua_S,"setViewPortInPoints",lua_cocos2dx_GLView_setViewPortInPoints); - tolua_function(tolua_S,"getScissorRect",lua_cocos2dx_GLView_getScissorRect); - tolua_function(tolua_S,"getRetinaFactor",lua_cocos2dx_GLView_getRetinaFactor); - tolua_function(tolua_S,"setViewName",lua_cocos2dx_GLView_setViewName); - tolua_function(tolua_S,"getVisibleRect",lua_cocos2dx_GLView_getVisibleRect); - tolua_function(tolua_S,"getVisibleSize",lua_cocos2dx_GLView_getVisibleSize); - tolua_function(tolua_S,"isScissorEnabled",lua_cocos2dx_GLView_isScissorEnabled); - tolua_function(tolua_S,"pollEvents",lua_cocos2dx_GLView_pollEvents); - tolua_function(tolua_S,"setGLContextAttrs", lua_cocos2dx_GLView_setGLContextAttrs); - tolua_function(tolua_S,"getGLContextAttrs", lua_cocos2dx_GLView_getGLContextAttrs); + tolua_beginmodule(tolua_S,"UserDefault"); + tolua_function(tolua_S,"setIntegerForKey",lua_cocos2dx_UserDefault_setIntegerForKey); + tolua_function(tolua_S,"getFloatForKey",lua_cocos2dx_UserDefault_getFloatForKey); + tolua_function(tolua_S,"getBoolForKey",lua_cocos2dx_UserDefault_getBoolForKey); + tolua_function(tolua_S,"setDoubleForKey",lua_cocos2dx_UserDefault_setDoubleForKey); + tolua_function(tolua_S,"setFloatForKey",lua_cocos2dx_UserDefault_setFloatForKey); + tolua_function(tolua_S,"getStringForKey",lua_cocos2dx_UserDefault_getStringForKey); + tolua_function(tolua_S,"setStringForKey",lua_cocos2dx_UserDefault_setStringForKey); + tolua_function(tolua_S,"flush",lua_cocos2dx_UserDefault_flush); + tolua_function(tolua_S,"getIntegerForKey",lua_cocos2dx_UserDefault_getIntegerForKey); + tolua_function(tolua_S,"getDoubleForKey",lua_cocos2dx_UserDefault_getDoubleForKey); + tolua_function(tolua_S,"setBoolForKey",lua_cocos2dx_UserDefault_setBoolForKey); + tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_UserDefault_destroyInstance); + tolua_function(tolua_S,"getXMLFilePath", lua_cocos2dx_UserDefault_getXMLFilePath); + tolua_function(tolua_S,"isXMLFileExist", lua_cocos2dx_UserDefault_isXMLFileExist); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::GLView).name(); - g_luaType[typeName] = "cc.GLView"; - g_typeCast["GLView"] = "cc.GLView"; - return 1; -} - -int lua_cocos2dx_Director_pause(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_pause'", 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_Director_pause'", nullptr); - return 0; - } - cobj->pause(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:pause",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_pause'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setEventDispatcher(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setEventDispatcher'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::EventDispatcher* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.EventDispatcher",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setEventDispatcher'", nullptr); - return 0; - } - cobj->setEventDispatcher(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setEventDispatcher",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setEventDispatcher'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setContentScaleFactor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setContentScaleFactor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Director:setContentScaleFactor"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setContentScaleFactor'", nullptr); - return 0; - } - cobj->setContentScaleFactor(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setContentScaleFactor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setContentScaleFactor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getContentScaleFactor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getContentScaleFactor'", 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_Director_getContentScaleFactor'", nullptr); - return 0; - } - double ret = cobj->getContentScaleFactor(); - 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.Director:getContentScaleFactor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getContentScaleFactor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getWinSizeInPixels(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getWinSizeInPixels'", 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_Director_getWinSizeInPixels'", nullptr); - return 0; - } - cocos2d::Size ret = cobj->getWinSizeInPixels(); - size_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getWinSizeInPixels",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getWinSizeInPixels'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getDeltaTime(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getDeltaTime'", 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_Director_getDeltaTime'", nullptr); - return 0; - } - double ret = cobj->getDeltaTime(); - 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.Director:getDeltaTime",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getDeltaTime'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setGLDefaultValues(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setGLDefaultValues'", 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_Director_setGLDefaultValues'", nullptr); - return 0; - } - cobj->setGLDefaultValues(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setGLDefaultValues",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setGLDefaultValues'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setActionManager(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setActionManager'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionManager* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionManager",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setActionManager'", nullptr); - return 0; - } - cobj->setActionManager(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setActionManager",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setActionManager'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setAlphaBlending(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setAlphaBlending'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Director:setAlphaBlending"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setAlphaBlending'", nullptr); - return 0; - } - cobj->setAlphaBlending(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setAlphaBlending",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setAlphaBlending'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_popToRootScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_popToRootScene'", 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_Director_popToRootScene'", nullptr); - return 0; - } - cobj->popToRootScene(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:popToRootScene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_popToRootScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_loadMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_loadMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::MATRIX_STACK_TYPE arg0; - cocos2d::Mat4 arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:loadMatrix"); - - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Director:loadMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_loadMatrix'", nullptr); - return 0; - } - cobj->loadMatrix(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.Director:loadMatrix",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_loadMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getNotificationNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getNotificationNode'", 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_Director_getNotificationNode'", nullptr); - return 0; - } - cocos2d::Node* ret = cobj->getNotificationNode(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getNotificationNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getNotificationNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getWinSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getWinSize'", 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_Director_getWinSize'", nullptr); - return 0; - } - const cocos2d::Size& ret = cobj->getWinSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getWinSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getWinSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getTextureCache(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getTextureCache'", 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_Director_getTextureCache'", nullptr); - return 0; - } - cocos2d::TextureCache* ret = cobj->getTextureCache(); - object_to_luaval(tolua_S, "cc.TextureCache",(cocos2d::TextureCache*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getTextureCache",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getTextureCache'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_isSendCleanupToScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_isSendCleanupToScene'", 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_Director_isSendCleanupToScene'", nullptr); - return 0; - } - bool ret = cobj->isSendCleanupToScene(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:isSendCleanupToScene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_isSendCleanupToScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getVisibleOrigin(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getVisibleOrigin'", 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_Director_getVisibleOrigin'", nullptr); - return 0; - } - cocos2d::Vec2 ret = cobj->getVisibleOrigin(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getVisibleOrigin",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getVisibleOrigin'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_mainLoop(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_mainLoop'", 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_Director_mainLoop'", nullptr); - return 0; - } - cobj->mainLoop(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:mainLoop",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_mainLoop'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setDepthTest(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setDepthTest'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Director:setDepthTest"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setDepthTest'", nullptr); - return 0; - } - cobj->setDepthTest(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setDepthTest",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setDepthTest'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getFrameRate(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getFrameRate'", 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_Director_getFrameRate'", nullptr); - return 0; - } - double ret = cobj->getFrameRate(); - 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.Director:getFrameRate",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getFrameRate'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getSecondsPerFrame(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getSecondsPerFrame'", 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_Director_getSecondsPerFrame'", nullptr); - return 0; - } - double ret = cobj->getSecondsPerFrame(); - 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.Director:getSecondsPerFrame",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getSecondsPerFrame'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_resetMatrixStack(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_resetMatrixStack'", 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_Director_resetMatrixStack'", nullptr); - return 0; - } - cobj->resetMatrixStack(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:resetMatrixStack",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_resetMatrixStack'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_convertToUI(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_convertToUI'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Director:convertToUI"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_convertToUI'", nullptr); - return 0; - } - cocos2d::Vec2 ret = cobj->convertToUI(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.Director:convertToUI",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_convertToUI'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_pushMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_pushMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::MATRIX_STACK_TYPE arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:pushMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_pushMatrix'", nullptr); - return 0; - } - cobj->pushMatrix(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:pushMatrix",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_pushMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setDefaultValues(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setDefaultValues'", 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_Director_setDefaultValues'", nullptr); - return 0; - } - cobj->setDefaultValues(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setDefaultValues",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setDefaultValues'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_init(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_init'", 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_Director_init'", nullptr); - return 0; - } - bool ret = cobj->init(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:init",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_init'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setScheduler(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setScheduler'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Scheduler* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Scheduler",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setScheduler'", nullptr); - return 0; - } - cobj->setScheduler(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setScheduler",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setScheduler'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::MATRIX_STACK_TYPE arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:getMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_getMatrix'", nullptr); - return 0; - } - const cocos2d::Mat4& ret = cobj->getMatrix(arg0); - mat4_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getMatrix",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_startAnimation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_startAnimation'", 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_Director_startAnimation'", nullptr); - return 0; - } - cobj->startAnimation(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:startAnimation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_startAnimation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getOpenGLView(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getOpenGLView'", 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_Director_getOpenGLView'", nullptr); - return 0; - } - cocos2d::GLView* ret = cobj->getOpenGLView(); - object_to_luaval(tolua_S, "cc.GLView",(cocos2d::GLView*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getOpenGLView",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getOpenGLView'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getRunningScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getRunningScene'", 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_Director_getRunningScene'", nullptr); - return 0; - } - cocos2d::Scene* ret = cobj->getRunningScene(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getRunningScene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getRunningScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setViewport(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setViewport'", 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_Director_setViewport'", nullptr); - return 0; - } - cobj->setViewport(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setViewport",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setViewport'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_stopAnimation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_stopAnimation'", 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_Director_stopAnimation'", nullptr); - return 0; - } - cobj->stopAnimation(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:stopAnimation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_stopAnimation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_popToSceneStackLevel(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_popToSceneStackLevel'", 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.Director:popToSceneStackLevel"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_popToSceneStackLevel'", nullptr); - return 0; - } - cobj->popToSceneStackLevel(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:popToSceneStackLevel",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_popToSceneStackLevel'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_resume(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_resume'", 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_Director_resume'", nullptr); - return 0; - } - cobj->resume(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:resume",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_resume'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_isNextDeltaTimeZero(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_isNextDeltaTimeZero'", 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_Director_isNextDeltaTimeZero'", nullptr); - return 0; - } - bool ret = cobj->isNextDeltaTimeZero(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:isNextDeltaTimeZero",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_isNextDeltaTimeZero'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setClearColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setClearColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Color4F arg0; - - ok &=luaval_to_color4f(tolua_S, 2, &arg0, "cc.Director:setClearColor"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setClearColor'", nullptr); - return 0; - } - cobj->setClearColor(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setClearColor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setClearColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_end(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_end'", 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_Director_end'", nullptr); - return 0; - } - cobj->end(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:end",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_end'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setOpenGLView(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setOpenGLView'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLView* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLView",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setOpenGLView'", nullptr); - return 0; - } - cobj->setOpenGLView(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setOpenGLView",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setOpenGLView'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_convertToGL(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_convertToGL'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Director:convertToGL"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_convertToGL'", nullptr); - return 0; - } - cocos2d::Vec2 ret = cobj->convertToGL(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.Director:convertToGL",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_convertToGL'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_purgeCachedData(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_purgeCachedData'", 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_Director_purgeCachedData'", nullptr); - return 0; - } - cobj->purgeCachedData(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:purgeCachedData",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_purgeCachedData'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getTotalFrames(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getTotalFrames'", 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_Director_getTotalFrames'", nullptr); - return 0; - } - unsigned int ret = cobj->getTotalFrames(); - 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.Director:getTotalFrames",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getTotalFrames'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_runWithScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_runWithScene'", 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_Director_runWithScene'", nullptr); - return 0; - } - cobj->runWithScene(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:runWithScene",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_runWithScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setNotificationNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setNotificationNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setNotificationNode'", nullptr); - return 0; - } - cobj->setNotificationNode(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setNotificationNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setNotificationNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_drawScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_drawScene'", 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_Director_drawScene'", nullptr); - return 0; - } - cobj->drawScene(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:drawScene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_drawScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_restart(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_restart'", 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_Director_restart'", nullptr); - return 0; - } - cobj->restart(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:restart",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_restart'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_popScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_popScene'", 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_Director_popScene'", nullptr); - return 0; - } - cobj->popScene(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:popScene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_popScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_loadIdentityMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_loadIdentityMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::MATRIX_STACK_TYPE arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:loadIdentityMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_loadIdentityMatrix'", nullptr); - return 0; - } - cobj->loadIdentityMatrix(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:loadIdentityMatrix",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_loadIdentityMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_isDisplayStats(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_isDisplayStats'", 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_Director_isDisplayStats'", nullptr); - return 0; - } - bool ret = cobj->isDisplayStats(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:isDisplayStats",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_isDisplayStats'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setProjection(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setProjection'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Director::Projection arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:setProjection"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setProjection'", nullptr); - return 0; - } - cobj->setProjection(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setProjection",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setProjection'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getConsole(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getConsole'", 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_Director_getConsole'", nullptr); - return 0; - } - cocos2d::Console* ret = cobj->getConsole(); - object_to_luaval(tolua_S, "cc.Console",(cocos2d::Console*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getConsole",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getConsole'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_multiplyMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_multiplyMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::MATRIX_STACK_TYPE arg0; - cocos2d::Mat4 arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:multiplyMatrix"); - - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Director:multiplyMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_multiplyMatrix'", nullptr); - return 0; - } - cobj->multiplyMatrix(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.Director:multiplyMatrix",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_multiplyMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getZEye(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getZEye'", 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_Director_getZEye'", nullptr); - return 0; - } - double ret = cobj->getZEye(); - 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.Director:getZEye",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getZEye'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setNextDeltaTimeZero(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setNextDeltaTimeZero'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Director:setNextDeltaTimeZero"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setNextDeltaTimeZero'", nullptr); - return 0; - } - cobj->setNextDeltaTimeZero(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setNextDeltaTimeZero",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setNextDeltaTimeZero'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_popMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_popMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::MATRIX_STACK_TYPE arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:popMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_popMatrix'", nullptr); - return 0; - } - cobj->popMatrix(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:popMatrix",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_popMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getVisibleSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getVisibleSize'", 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_Director_getVisibleSize'", nullptr); - return 0; - } - cocos2d::Size ret = cobj->getVisibleSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getVisibleSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getVisibleSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getScheduler(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getScheduler'", 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_Director_getScheduler'", nullptr); - return 0; - } - cocos2d::Scheduler* ret = cobj->getScheduler(); - object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getScheduler",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getScheduler'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_pushScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_pushScene'", 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_Director_pushScene'", nullptr); - return 0; - } - cobj->pushScene(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:pushScene",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_pushScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getAnimationInterval(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getAnimationInterval'", 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_Director_getAnimationInterval'", nullptr); - return 0; - } - double ret = cobj->getAnimationInterval(); - 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.Director:getAnimationInterval",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getAnimationInterval'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_isPaused(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_isPaused'", 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_Director_isPaused'", nullptr); - return 0; - } - bool ret = cobj->isPaused(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:isPaused",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_isPaused'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setDisplayStats(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setDisplayStats'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Director:setDisplayStats"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setDisplayStats'", nullptr); - return 0; - } - cobj->setDisplayStats(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setDisplayStats",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setDisplayStats'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getEventDispatcher(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getEventDispatcher'", 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_Director_getEventDispatcher'", nullptr); - return 0; - } - cocos2d::EventDispatcher* ret = cobj->getEventDispatcher(); - object_to_luaval(tolua_S, "cc.EventDispatcher",(cocos2d::EventDispatcher*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getEventDispatcher",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getEventDispatcher'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_replaceScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_replaceScene'", 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_Director_replaceScene'", nullptr); - return 0; - } - cobj->replaceScene(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:replaceScene",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_replaceScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_setAnimationInterval(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_setAnimationInterval'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Director:setAnimationInterval"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setAnimationInterval'", nullptr); - return 0; - } - cobj->setAnimationInterval(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:setAnimationInterval",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_setAnimationInterval'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getActionManager(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getActionManager'", 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_Director_getActionManager'", nullptr); - return 0; - } - cocos2d::ActionManager* ret = cobj->getActionManager(); - object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getActionManager",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getActionManager'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_getInstance(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.Director",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_Director_getInstance'", nullptr); - return 0; - } - cocos2d::Director* ret = cocos2d::Director::getInstance(); - object_to_luaval(tolua_S, "cc.Director",(cocos2d::Director*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Director:getInstance",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getInstance'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_Director_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Director)"); - return 0; -} - -int lua_register_cocos2dx_Director(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Director"); - tolua_cclass(tolua_S,"Director","cc.Director","",nullptr); - - tolua_beginmodule(tolua_S,"Director"); - tolua_function(tolua_S,"pause",lua_cocos2dx_Director_pause); - tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Director_setEventDispatcher); - tolua_function(tolua_S,"setContentScaleFactor",lua_cocos2dx_Director_setContentScaleFactor); - tolua_function(tolua_S,"getContentScaleFactor",lua_cocos2dx_Director_getContentScaleFactor); - tolua_function(tolua_S,"getWinSizeInPixels",lua_cocos2dx_Director_getWinSizeInPixels); - tolua_function(tolua_S,"getDeltaTime",lua_cocos2dx_Director_getDeltaTime); - tolua_function(tolua_S,"setGLDefaultValues",lua_cocos2dx_Director_setGLDefaultValues); - tolua_function(tolua_S,"setActionManager",lua_cocos2dx_Director_setActionManager); - tolua_function(tolua_S,"setAlphaBlending",lua_cocos2dx_Director_setAlphaBlending); - tolua_function(tolua_S,"popToRootScene",lua_cocos2dx_Director_popToRootScene); - tolua_function(tolua_S,"loadMatrix",lua_cocos2dx_Director_loadMatrix); - tolua_function(tolua_S,"getNotificationNode",lua_cocos2dx_Director_getNotificationNode); - tolua_function(tolua_S,"getWinSize",lua_cocos2dx_Director_getWinSize); - tolua_function(tolua_S,"getTextureCache",lua_cocos2dx_Director_getTextureCache); - tolua_function(tolua_S,"isSendCleanupToScene",lua_cocos2dx_Director_isSendCleanupToScene); - tolua_function(tolua_S,"getVisibleOrigin",lua_cocos2dx_Director_getVisibleOrigin); - tolua_function(tolua_S,"mainLoop",lua_cocos2dx_Director_mainLoop); - tolua_function(tolua_S,"setDepthTest",lua_cocos2dx_Director_setDepthTest); - tolua_function(tolua_S,"getFrameRate",lua_cocos2dx_Director_getFrameRate); - tolua_function(tolua_S,"getSecondsPerFrame",lua_cocos2dx_Director_getSecondsPerFrame); - tolua_function(tolua_S,"resetMatrixStack",lua_cocos2dx_Director_resetMatrixStack); - tolua_function(tolua_S,"convertToUI",lua_cocos2dx_Director_convertToUI); - tolua_function(tolua_S,"pushMatrix",lua_cocos2dx_Director_pushMatrix); - tolua_function(tolua_S,"setDefaultValues",lua_cocos2dx_Director_setDefaultValues); - tolua_function(tolua_S,"init",lua_cocos2dx_Director_init); - tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Director_setScheduler); - tolua_function(tolua_S,"getMatrix",lua_cocos2dx_Director_getMatrix); - tolua_function(tolua_S,"startAnimation",lua_cocos2dx_Director_startAnimation); - tolua_function(tolua_S,"getOpenGLView",lua_cocos2dx_Director_getOpenGLView); - tolua_function(tolua_S,"getRunningScene",lua_cocos2dx_Director_getRunningScene); - tolua_function(tolua_S,"setViewport",lua_cocos2dx_Director_setViewport); - tolua_function(tolua_S,"stopAnimation",lua_cocos2dx_Director_stopAnimation); - tolua_function(tolua_S,"popToSceneStackLevel",lua_cocos2dx_Director_popToSceneStackLevel); - tolua_function(tolua_S,"resume",lua_cocos2dx_Director_resume); - tolua_function(tolua_S,"isNextDeltaTimeZero",lua_cocos2dx_Director_isNextDeltaTimeZero); - tolua_function(tolua_S,"setClearColor",lua_cocos2dx_Director_setClearColor); - tolua_function(tolua_S,"endToLua",lua_cocos2dx_Director_end); - tolua_function(tolua_S,"setOpenGLView",lua_cocos2dx_Director_setOpenGLView); - tolua_function(tolua_S,"convertToGL",lua_cocos2dx_Director_convertToGL); - tolua_function(tolua_S,"purgeCachedData",lua_cocos2dx_Director_purgeCachedData); - tolua_function(tolua_S,"getTotalFrames",lua_cocos2dx_Director_getTotalFrames); - tolua_function(tolua_S,"runWithScene",lua_cocos2dx_Director_runWithScene); - tolua_function(tolua_S,"setNotificationNode",lua_cocos2dx_Director_setNotificationNode); - tolua_function(tolua_S,"drawScene",lua_cocos2dx_Director_drawScene); - tolua_function(tolua_S,"restart",lua_cocos2dx_Director_restart); - tolua_function(tolua_S,"popScene",lua_cocos2dx_Director_popScene); - tolua_function(tolua_S,"loadIdentityMatrix",lua_cocos2dx_Director_loadIdentityMatrix); - tolua_function(tolua_S,"isDisplayStats",lua_cocos2dx_Director_isDisplayStats); - tolua_function(tolua_S,"setProjection",lua_cocos2dx_Director_setProjection); - tolua_function(tolua_S,"getConsole",lua_cocos2dx_Director_getConsole); - tolua_function(tolua_S,"multiplyMatrix",lua_cocos2dx_Director_multiplyMatrix); - tolua_function(tolua_S,"getZEye",lua_cocos2dx_Director_getZEye); - tolua_function(tolua_S,"setNextDeltaTimeZero",lua_cocos2dx_Director_setNextDeltaTimeZero); - tolua_function(tolua_S,"popMatrix",lua_cocos2dx_Director_popMatrix); - tolua_function(tolua_S,"getVisibleSize",lua_cocos2dx_Director_getVisibleSize); - tolua_function(tolua_S,"getScheduler",lua_cocos2dx_Director_getScheduler); - tolua_function(tolua_S,"pushScene",lua_cocos2dx_Director_pushScene); - tolua_function(tolua_S,"getAnimationInterval",lua_cocos2dx_Director_getAnimationInterval); - tolua_function(tolua_S,"isPaused",lua_cocos2dx_Director_isPaused); - tolua_function(tolua_S,"setDisplayStats",lua_cocos2dx_Director_setDisplayStats); - tolua_function(tolua_S,"getEventDispatcher",lua_cocos2dx_Director_getEventDispatcher); - tolua_function(tolua_S,"replaceScene",lua_cocos2dx_Director_replaceScene); - tolua_function(tolua_S,"setAnimationInterval",lua_cocos2dx_Director_setAnimationInterval); - tolua_function(tolua_S,"getActionManager",lua_cocos2dx_Director_getActionManager); - tolua_function(tolua_S,"getInstance", lua_cocos2dx_Director_getInstance); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Director).name(); - g_luaType[typeName] = "cc.Director"; - g_typeCast["Director"] = "cc.Director"; - return 1; -} - -int lua_cocos2dx_Timer_getInterval(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Timer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_getInterval'", 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_Timer_getInterval'", nullptr); - return 0; - } - double ret = cobj->getInterval(); - 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.Timer:getInterval",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_getInterval'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Timer_setupTimerWithInterval(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Timer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_setupTimerWithInterval'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - double arg0; - unsigned int arg1; - double arg2; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Timer:setupTimerWithInterval"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.Timer:setupTimerWithInterval"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Timer:setupTimerWithInterval"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Timer_setupTimerWithInterval'", nullptr); - return 0; - } - cobj->setupTimerWithInterval(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.Timer:setupTimerWithInterval",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_setupTimerWithInterval'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Timer_setInterval(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Timer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_setInterval'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Timer:setInterval"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Timer_setInterval'", nullptr); - return 0; - } - cobj->setInterval(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Timer:setInterval",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_setInterval'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Timer_update(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Timer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_update'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Timer:update"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Timer_update'", nullptr); - return 0; - } - cobj->update(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Timer:update",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_update'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Timer_trigger(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Timer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_trigger'", 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_Timer_trigger'", nullptr); - return 0; - } - cobj->trigger(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Timer:trigger",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_trigger'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Timer_cancel(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Timer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Timer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Timer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Timer_cancel'", 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_Timer_cancel'", nullptr); - return 0; - } - cobj->cancel(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Timer:cancel",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Timer_cancel'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_Timer_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Timer)"); - return 0; -} - -int lua_register_cocos2dx_Timer(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Timer"); - tolua_cclass(tolua_S,"Timer","cc.Timer","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Timer"); - tolua_function(tolua_S,"getInterval",lua_cocos2dx_Timer_getInterval); - tolua_function(tolua_S,"setupTimerWithInterval",lua_cocos2dx_Timer_setupTimerWithInterval); - tolua_function(tolua_S,"setInterval",lua_cocos2dx_Timer_setInterval); - tolua_function(tolua_S,"update",lua_cocos2dx_Timer_update); - tolua_function(tolua_S,"trigger",lua_cocos2dx_Timer_trigger); - tolua_function(tolua_S,"cancel",lua_cocos2dx_Timer_cancel); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Timer).name(); - g_luaType[typeName] = "cc.Timer"; - g_typeCast["Timer"] = "cc.Timer"; - return 1; -} - -int lua_cocos2dx_Scheduler_setTimeScale(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Scheduler* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Scheduler",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Scheduler*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scheduler_setTimeScale'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Scheduler:setTimeScale"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scheduler_setTimeScale'", nullptr); - return 0; - } - cobj->setTimeScale(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scheduler:setTimeScale",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scheduler_setTimeScale'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Scheduler_getTimeScale(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Scheduler* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Scheduler",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Scheduler*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scheduler_getTimeScale'", 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_Scheduler_getTimeScale'", nullptr); - return 0; - } - double ret = cobj->getTimeScale(); - 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.Scheduler:getTimeScale",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scheduler_getTimeScale'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Scheduler_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Scheduler* 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_Scheduler_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::Scheduler(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Scheduler"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scheduler:Scheduler",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scheduler_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Scheduler_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Scheduler)"); - return 0; -} - -int lua_register_cocos2dx_Scheduler(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Scheduler"); - tolua_cclass(tolua_S,"Scheduler","cc.Scheduler","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Scheduler"); - tolua_function(tolua_S,"new",lua_cocos2dx_Scheduler_constructor); - tolua_function(tolua_S,"setTimeScale",lua_cocos2dx_Scheduler_setTimeScale); - tolua_function(tolua_S,"getTimeScale",lua_cocos2dx_Scheduler_getTimeScale); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Scheduler).name(); - g_luaType[typeName] = "cc.Scheduler"; - g_typeCast["Scheduler"] = "cc.Scheduler"; + std::string typeName = typeid(cocos2d::UserDefault).name(); + g_luaType[typeName] = "cc.UserDefault"; + g_typeCast["UserDefault"] = "cc.UserDefault"; return 1; } @@ -25689,10 +26676,29 @@ int lua_register_cocos2dx_FileUtils(lua_State* tolua_S) return 1; } -int lua_cocos2dx_UserDefault_setIntegerForKey(lua_State* tolua_S) +static int lua_cocos2dx_EventAcceleration_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventAcceleration)"); + return 0; +} + +int lua_register_cocos2dx_EventAcceleration(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventAcceleration"); + tolua_cclass(tolua_S,"EventAcceleration","cc.EventAcceleration","cc.Event",nullptr); + + tolua_beginmodule(tolua_S,"EventAcceleration"); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::EventAcceleration).name(); + g_luaType[typeName] = "cc.EventAcceleration"; + g_typeCast["EventAcceleration"] = "cc.EventAcceleration"; + return 1; +} + +int lua_cocos2dx_EventCustom_getEventName(lua_State* tolua_S) { int argc = 0; - cocos2d::UserDefault* cobj = nullptr; + cocos2d::EventCustom* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -25701,404 +26707,15 @@ int lua_cocos2dx_UserDefault_setIntegerForKey(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.EventCustom",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::EventCustom*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setIntegerForKey'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - const char* arg0; - int arg1; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.UserDefault:setIntegerForKey"); arg0 = arg0_tmp.c_str(); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.UserDefault:setIntegerForKey"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setIntegerForKey'", nullptr); - return 0; - } - cobj->setIntegerForKey(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.UserDefault:setIntegerForKey",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setIntegerForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_getFloatForKey(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getFloatForKey'", 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.UserDefault:getFloatForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.UserDefault:getFloatForKey"); - - if (!ok) { break; } - double ret = cobj->getFloatForKey(arg0, arg1); - tolua_pushnumber(tolua_S,(lua_Number)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.UserDefault:getFloatForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - double ret = cobj->getFloatForKey(arg0); - 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.UserDefault:getFloatForKey",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getFloatForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_getBoolForKey(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getBoolForKey'", 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.UserDefault:getBoolForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - bool arg1; - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.UserDefault:getBoolForKey"); - - if (!ok) { break; } - bool ret = cobj->getBoolForKey(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)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.UserDefault:getBoolForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - bool ret = cobj->getBoolForKey(arg0); - 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.UserDefault:getBoolForKey",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getBoolForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_setDoubleForKey(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setDoubleForKey'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - const char* arg0; - double arg1; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.UserDefault:setDoubleForKey"); arg0 = arg0_tmp.c_str(); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.UserDefault:setDoubleForKey"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setDoubleForKey'", nullptr); - return 0; - } - cobj->setDoubleForKey(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.UserDefault:setDoubleForKey",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setDoubleForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_setFloatForKey(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setFloatForKey'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - const char* arg0; - double arg1; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.UserDefault:setFloatForKey"); arg0 = arg0_tmp.c_str(); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.UserDefault:setFloatForKey"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setFloatForKey'", nullptr); - return 0; - } - cobj->setFloatForKey(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.UserDefault:setFloatForKey",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setFloatForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_getStringForKey(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getStringForKey'", 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.UserDefault:getStringForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.UserDefault:getStringForKey"); - - if (!ok) { break; } - std::string ret = cobj->getStringForKey(arg0, arg1); - tolua_pushcppstring(tolua_S,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.UserDefault:getStringForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string ret = cobj->getStringForKey(arg0); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.UserDefault:getStringForKey",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getStringForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_setStringForKey(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setStringForKey'", 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.UserDefault:setStringForKey"); arg0 = arg0_tmp.c_str(); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.UserDefault:setStringForKey"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setStringForKey'", nullptr); - return 0; - } - cobj->setStringForKey(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.UserDefault:setStringForKey",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setStringForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_flush(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_flush'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventCustom_getEventName'", nullptr); return 0; } #endif @@ -26108,326 +26725,81 @@ int lua_cocos2dx_UserDefault_flush(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_flush'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventCustom_getEventName'", nullptr); return 0; } - cobj->flush(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.UserDefault:flush",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_flush'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_getIntegerForKey(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getIntegerForKey'", 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.UserDefault:getIntegerForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.UserDefault:getIntegerForKey"); - - if (!ok) { break; } - int ret = cobj->getIntegerForKey(arg0, arg1); - tolua_pushnumber(tolua_S,(lua_Number)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.UserDefault:getIntegerForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - int ret = cobj->getIntegerForKey(arg0); - 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.UserDefault:getIntegerForKey",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getIntegerForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_getDoubleForKey(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_getDoubleForKey'", 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.UserDefault:getDoubleForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.UserDefault:getDoubleForKey"); - - if (!ok) { break; } - double ret = cobj->getDoubleForKey(arg0, arg1); - tolua_pushnumber(tolua_S,(lua_Number)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.UserDefault:getDoubleForKey"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - double ret = cobj->getDoubleForKey(arg0); - 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.UserDefault:getDoubleForKey",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getDoubleForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_setBoolForKey(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::UserDefault* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_setBoolForKey'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - const char* arg0; - bool arg1; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.UserDefault:setBoolForKey"); arg0 = arg0_tmp.c_str(); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.UserDefault:setBoolForKey"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_setBoolForKey'", nullptr); - return 0; - } - cobj->setBoolForKey(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.UserDefault:setBoolForKey",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_setBoolForKey'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_UserDefault_destroyInstance(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.UserDefault",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_UserDefault_destroyInstance'", nullptr); - return 0; - } - cocos2d::UserDefault::destroyInstance(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.UserDefault:destroyInstance",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_destroyInstance'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_UserDefault_getXMLFilePath(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.UserDefault",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_UserDefault_getXMLFilePath'", nullptr); - return 0; - } - const std::string& ret = cocos2d::UserDefault::getXMLFilePath(); + const std::string& ret = cobj->getEventName(); tolua_pushcppstring(tolua_S,ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.UserDefault:getXMLFilePath",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventCustom:getEventName",argc, 0); return 0; + #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_getXMLFilePath'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventCustom_getEventName'.",&tolua_err); #endif + return 0; } -int lua_cocos2dx_UserDefault_isXMLFileExist(lua_State* tolua_S) +int lua_cocos2dx_EventCustom_constructor(lua_State* tolua_S) { int argc = 0; + cocos2d::EventCustom* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; -#endif - argc = lua_gettop(tolua_S) - 1; - if (argc == 0) + argc = lua_gettop(tolua_S)-1; + if (argc == 1) { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.EventCustom:EventCustom"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_isXMLFileExist'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventCustom_constructor'", nullptr); return 0; } - bool ret = cocos2d::UserDefault::isXMLFileExist(); - tolua_pushboolean(tolua_S,(bool)ret); + cobj = new cocos2d::EventCustom(arg0); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventCustom"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.UserDefault:isXMLFileExist",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventCustom:EventCustom",argc, 1); return 0; + #if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_isXMLFileExist'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventCustom_constructor'.",&tolua_err); #endif - return 0; -} -static int lua_cocos2dx_UserDefault_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (UserDefault)"); + return 0; } -int lua_register_cocos2dx_UserDefault(lua_State* tolua_S) +static int lua_cocos2dx_EventCustom_finalize(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.UserDefault"); - tolua_cclass(tolua_S,"UserDefault","cc.UserDefault","",nullptr); + printf("luabindings: finalizing LUA object (EventCustom)"); + return 0; +} - tolua_beginmodule(tolua_S,"UserDefault"); - tolua_function(tolua_S,"setIntegerForKey",lua_cocos2dx_UserDefault_setIntegerForKey); - tolua_function(tolua_S,"getFloatForKey",lua_cocos2dx_UserDefault_getFloatForKey); - tolua_function(tolua_S,"getBoolForKey",lua_cocos2dx_UserDefault_getBoolForKey); - tolua_function(tolua_S,"setDoubleForKey",lua_cocos2dx_UserDefault_setDoubleForKey); - tolua_function(tolua_S,"setFloatForKey",lua_cocos2dx_UserDefault_setFloatForKey); - tolua_function(tolua_S,"getStringForKey",lua_cocos2dx_UserDefault_getStringForKey); - tolua_function(tolua_S,"setStringForKey",lua_cocos2dx_UserDefault_setStringForKey); - tolua_function(tolua_S,"flush",lua_cocos2dx_UserDefault_flush); - tolua_function(tolua_S,"getIntegerForKey",lua_cocos2dx_UserDefault_getIntegerForKey); - tolua_function(tolua_S,"getDoubleForKey",lua_cocos2dx_UserDefault_getDoubleForKey); - tolua_function(tolua_S,"setBoolForKey",lua_cocos2dx_UserDefault_setBoolForKey); - tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_UserDefault_destroyInstance); - tolua_function(tolua_S,"getXMLFilePath", lua_cocos2dx_UserDefault_getXMLFilePath); - tolua_function(tolua_S,"isXMLFileExist", lua_cocos2dx_UserDefault_isXMLFileExist); +int lua_register_cocos2dx_EventCustom(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventCustom"); + tolua_cclass(tolua_S,"EventCustom","cc.EventCustom","cc.Event",nullptr); + + tolua_beginmodule(tolua_S,"EventCustom"); + tolua_function(tolua_S,"new",lua_cocos2dx_EventCustom_constructor); + tolua_function(tolua_S,"getEventName",lua_cocos2dx_EventCustom_getEventName); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::UserDefault).name(); - g_luaType[typeName] = "cc.UserDefault"; - g_typeCast["UserDefault"] = "cc.UserDefault"; + std::string typeName = typeid(cocos2d::EventCustom).name(); + g_luaType[typeName] = "cc.EventCustom"; + g_typeCast["EventCustom"] = "cc.EventCustom"; return 1; } @@ -27477,10 +27849,10 @@ int lua_register_cocos2dx_EventDispatcher(lua_State* tolua_S) return 1; } -int lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches(lua_State* tolua_S) +int lua_cocos2dx_EventFocus_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::EventListenerTouchOneByOne* cobj = nullptr; + cocos2d::EventFocus* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -27488,46 +27860,62 @@ int lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches(lua_State* tolua_S) #endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.EventListenerTouchOneByOne",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::EventListenerTouchOneByOne*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches'", nullptr); - return 0; - } -#endif argc = lua_gettop(tolua_S)-1; - if (argc == 0) + if (argc == 2) { + cocos2d::ui::Widget* arg0; + cocos2d::ui::Widget* arg1; + + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + + ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventFocus_constructor'", nullptr); return 0; } - bool ret = cobj->isSwallowTouches(); - tolua_pushboolean(tolua_S,(bool)ret); + cobj = new cocos2d::EventFocus(arg0, arg1); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventFocus"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchOneByOne:isSwallowTouches",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventFocus:EventFocus",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventFocus_constructor'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches(lua_State* tolua_S) + +static int lua_cocos2dx_EventFocus_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventFocus)"); + return 0; +} + +int lua_register_cocos2dx_EventFocus(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventFocus"); + tolua_cclass(tolua_S,"EventFocus","cc.EventFocus","cc.Event",nullptr); + + tolua_beginmodule(tolua_S,"EventFocus"); + tolua_function(tolua_S,"new",lua_cocos2dx_EventFocus_constructor); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::EventFocus).name(); + g_luaType[typeName] = "cc.EventFocus"; + g_typeCast["EventFocus"] = "cc.EventFocus"; + return 1; +} + +int lua_cocos2dx_EventListenerAcceleration_init(lua_State* tolua_S) { int argc = 0; - cocos2d::EventListenerTouchOneByOne* cobj = nullptr; + cocos2d::EventListenerAcceleration* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -27536,15 +27924,15 @@ int lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches(lua_State* tolua_S #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.EventListenerTouchOneByOne",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.EventListenerAcceleration",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::EventListenerTouchOneByOne*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::EventListenerAcceleration*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerAcceleration_init'", nullptr); return 0; } #endif @@ -27552,79 +27940,36 @@ int lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches(lua_State* tolua_S argc = lua_gettop(tolua_S)-1; if (argc == 1) { - bool arg0; + std::function arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.EventListenerTouchOneByOne:setSwallowTouches"); + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerAcceleration_init'", nullptr); return 0; } - cobj->setSwallowTouches(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchOneByOne:setSwallowTouches",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_EventListenerTouchOneByOne_init(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::EventListenerTouchOneByOne* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.EventListenerTouchOneByOne",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::EventListenerTouchOneByOne*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerTouchOneByOne_init'", 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_EventListenerTouchOneByOne_init'", nullptr); - return 0; - } - bool ret = cobj->init(); + 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.EventListenerTouchOneByOne:init",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerAcceleration:init",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchOneByOne_init'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerAcceleration_init'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_EventListenerTouchOneByOne_constructor(lua_State* tolua_S) +int lua_cocos2dx_EventListenerAcceleration_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::EventListenerTouchOneByOne* cobj = nullptr; + cocos2d::EventListenerAcceleration* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -27638,53 +27983,108 @@ int lua_cocos2dx_EventListenerTouchOneByOne_constructor(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerTouchOneByOne_constructor'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerAcceleration_constructor'", nullptr); return 0; } - cobj = new cocos2d::EventListenerTouchOneByOne(); + cobj = new cocos2d::EventListenerAcceleration(); cobj->autorelease(); int ID = (int)cobj->_ID ; int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerTouchOneByOne"); + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerAcceleration"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchOneByOne:EventListenerTouchOneByOne",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerAcceleration:EventListenerAcceleration",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchOneByOne_constructor'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerAcceleration_constructor'.",&tolua_err); #endif return 0; } -static int lua_cocos2dx_EventListenerTouchOneByOne_finalize(lua_State* tolua_S) +static int lua_cocos2dx_EventListenerAcceleration_finalize(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (EventListenerTouchOneByOne)"); + printf("luabindings: finalizing LUA object (EventListenerAcceleration)"); return 0; } -int lua_register_cocos2dx_EventListenerTouchOneByOne(lua_State* tolua_S) +int lua_register_cocos2dx_EventListenerAcceleration(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.EventListenerTouchOneByOne"); - tolua_cclass(tolua_S,"EventListenerTouchOneByOne","cc.EventListenerTouchOneByOne","cc.EventListener",nullptr); + tolua_usertype(tolua_S,"cc.EventListenerAcceleration"); + tolua_cclass(tolua_S,"EventListenerAcceleration","cc.EventListenerAcceleration","cc.EventListener",nullptr); - tolua_beginmodule(tolua_S,"EventListenerTouchOneByOne"); - tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerTouchOneByOne_constructor); - tolua_function(tolua_S,"isSwallowTouches",lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches); - tolua_function(tolua_S,"setSwallowTouches",lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches); - tolua_function(tolua_S,"init",lua_cocos2dx_EventListenerTouchOneByOne_init); + tolua_beginmodule(tolua_S,"EventListenerAcceleration"); + tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerAcceleration_constructor); + tolua_function(tolua_S,"init",lua_cocos2dx_EventListenerAcceleration_init); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventListenerTouchOneByOne).name(); - g_luaType[typeName] = "cc.EventListenerTouchOneByOne"; - g_typeCast["EventListenerTouchOneByOne"] = "cc.EventListenerTouchOneByOne"; + std::string typeName = typeid(cocos2d::EventListenerAcceleration).name(); + g_luaType[typeName] = "cc.EventListenerAcceleration"; + g_typeCast["EventListenerAcceleration"] = "cc.EventListenerAcceleration"; return 1; } -int lua_cocos2dx_EventListenerTouchAllAtOnce_init(lua_State* tolua_S) +int lua_cocos2dx_EventListenerCustom_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::EventListenerTouchAllAtOnce* cobj = nullptr; + cocos2d::EventListenerCustom* 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_EventListenerCustom_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::EventListenerCustom(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerCustom"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerCustom:EventListenerCustom",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerCustom_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_EventListenerCustom_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventListenerCustom)"); + return 0; +} + +int lua_register_cocos2dx_EventListenerCustom(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventListenerCustom"); + tolua_cclass(tolua_S,"EventListenerCustom","cc.EventListenerCustom","cc.EventListener",nullptr); + + tolua_beginmodule(tolua_S,"EventListenerCustom"); + tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerCustom_constructor); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::EventListenerCustom).name(); + g_luaType[typeName] = "cc.EventListenerCustom"; + g_typeCast["EventListenerCustom"] = "cc.EventListenerCustom"; + return 1; +} + +int lua_cocos2dx_EventListenerFocus_init(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::EventListenerFocus* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -27693,15 +28093,15 @@ int lua_cocos2dx_EventListenerTouchAllAtOnce_init(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.EventListenerTouchAllAtOnce",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.EventListenerFocus",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::EventListenerTouchAllAtOnce*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::EventListenerFocus*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerTouchAllAtOnce_init'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerFocus_init'", nullptr); return 0; } #endif @@ -27711,27 +28111,27 @@ int lua_cocos2dx_EventListenerTouchAllAtOnce_init(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerTouchAllAtOnce_init'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerFocus_init'", nullptr); return 0; } bool ret = cobj->init(); tolua_pushboolean(tolua_S,(bool)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchAllAtOnce:init",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerFocus:init",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchAllAtOnce_init'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerFocus_init'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_EventListenerTouchAllAtOnce_constructor(lua_State* tolua_S) +int lua_cocos2dx_EventListenerFocus_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::EventListenerTouchAllAtOnce* cobj = nullptr; + cocos2d::EventListenerFocus* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -27745,44 +28145,44 @@ int lua_cocos2dx_EventListenerTouchAllAtOnce_constructor(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerTouchAllAtOnce_constructor'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerFocus_constructor'", nullptr); return 0; } - cobj = new cocos2d::EventListenerTouchAllAtOnce(); + cobj = new cocos2d::EventListenerFocus(); cobj->autorelease(); int ID = (int)cobj->_ID ; int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerTouchAllAtOnce"); + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerFocus"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchAllAtOnce:EventListenerTouchAllAtOnce",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerFocus:EventListenerFocus",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchAllAtOnce_constructor'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerFocus_constructor'.",&tolua_err); #endif return 0; } -static int lua_cocos2dx_EventListenerTouchAllAtOnce_finalize(lua_State* tolua_S) +static int lua_cocos2dx_EventListenerFocus_finalize(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (EventListenerTouchAllAtOnce)"); + printf("luabindings: finalizing LUA object (EventListenerFocus)"); return 0; } -int lua_register_cocos2dx_EventListenerTouchAllAtOnce(lua_State* tolua_S) +int lua_register_cocos2dx_EventListenerFocus(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.EventListenerTouchAllAtOnce"); - tolua_cclass(tolua_S,"EventListenerTouchAllAtOnce","cc.EventListenerTouchAllAtOnce","cc.EventListener",nullptr); + tolua_usertype(tolua_S,"cc.EventListenerFocus"); + tolua_cclass(tolua_S,"EventListenerFocus","cc.EventListenerFocus","cc.EventListener",nullptr); - tolua_beginmodule(tolua_S,"EventListenerTouchAllAtOnce"); - tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerTouchAllAtOnce_constructor); - tolua_function(tolua_S,"init",lua_cocos2dx_EventListenerTouchAllAtOnce_init); + tolua_beginmodule(tolua_S,"EventListenerFocus"); + tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerFocus_constructor); + tolua_function(tolua_S,"init",lua_cocos2dx_EventListenerFocus_init); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventListenerTouchAllAtOnce).name(); - g_luaType[typeName] = "cc.EventListenerTouchAllAtOnce"; - g_typeCast["EventListenerTouchAllAtOnce"] = "cc.EventListenerTouchAllAtOnce"; + std::string typeName = typeid(cocos2d::EventListenerFocus).name(); + g_luaType[typeName] = "cc.EventListenerFocus"; + g_typeCast["EventListenerFocus"] = "cc.EventListenerFocus"; return 1; } @@ -28791,29 +29191,10 @@ int lua_register_cocos2dx_EventListenerMouse(lua_State* tolua_S) return 1; } -static int lua_cocos2dx_EventAcceleration_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (EventAcceleration)"); - return 0; -} - -int lua_register_cocos2dx_EventAcceleration(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.EventAcceleration"); - tolua_cclass(tolua_S,"EventAcceleration","cc.EventAcceleration","cc.Event",nullptr); - - tolua_beginmodule(tolua_S,"EventAcceleration"); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventAcceleration).name(); - g_luaType[typeName] = "cc.EventAcceleration"; - g_typeCast["EventAcceleration"] = "cc.EventAcceleration"; - return 1; -} - -int lua_cocos2dx_EventListenerAcceleration_init(lua_State* tolua_S) +int lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches(lua_State* tolua_S) { int argc = 0; - cocos2d::EventListenerAcceleration* cobj = nullptr; + cocos2d::EventListenerTouchOneByOne* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -28822,110 +29203,45 @@ int lua_cocos2dx_EventListenerAcceleration_init(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.EventListenerAcceleration",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.EventListenerTouchOneByOne",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::EventListenerAcceleration*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::EventListenerTouchOneByOne*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerAcceleration_init'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 0) { - std::function arg0; - - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerAcceleration_init'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches'", nullptr); return 0; } - bool ret = cobj->init(arg0); + bool ret = cobj->isSwallowTouches(); tolua_pushboolean(tolua_S,(bool)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerAcceleration:init",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchOneByOne:isSwallowTouches",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerAcceleration_init'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_EventListenerAcceleration_constructor(lua_State* tolua_S) +int lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches(lua_State* tolua_S) { int argc = 0; - cocos2d::EventListenerAcceleration* 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_EventListenerAcceleration_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::EventListenerAcceleration(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerAcceleration"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerAcceleration:EventListenerAcceleration",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerAcceleration_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_EventListenerAcceleration_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (EventListenerAcceleration)"); - return 0; -} - -int lua_register_cocos2dx_EventListenerAcceleration(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.EventListenerAcceleration"); - tolua_cclass(tolua_S,"EventListenerAcceleration","cc.EventListenerAcceleration","cc.EventListener",nullptr); - - tolua_beginmodule(tolua_S,"EventListenerAcceleration"); - tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerAcceleration_constructor); - tolua_function(tolua_S,"init",lua_cocos2dx_EventListenerAcceleration_init); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventListenerAcceleration).name(); - g_luaType[typeName] = "cc.EventListenerAcceleration"; - g_typeCast["EventListenerAcceleration"] = "cc.EventListenerAcceleration"; - return 1; -} - -int lua_cocos2dx_EventCustom_getEventName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::EventCustom* cobj = nullptr; + cocos2d::EventListenerTouchOneByOne* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -28934,226 +29250,48 @@ int lua_cocos2dx_EventCustom_getEventName(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.EventCustom",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.EventListenerTouchOneByOne",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::EventCustom*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::EventListenerTouchOneByOne*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventCustom_getEventName'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches'", 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_EventCustom_getEventName'", nullptr); - return 0; - } - const std::string& ret = cobj->getEventName(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventCustom:getEventName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventCustom_getEventName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_EventCustom_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::EventCustom* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - - argc = lua_gettop(tolua_S)-1; if (argc == 1) { - std::string arg0; + bool arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.EventCustom:EventCustom"); + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.EventListenerTouchOneByOne:setSwallowTouches"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventCustom_constructor'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches'", nullptr); return 0; } - cobj = new cocos2d::EventCustom(arg0); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventCustom"); + cobj->setSwallowTouches(arg0); + lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventCustom:EventCustom",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchOneByOne:setSwallowTouches",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventCustom_constructor'.",&tolua_err); + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches'.",&tolua_err); #endif return 0; } - -static int lua_cocos2dx_EventCustom_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (EventCustom)"); - return 0; -} - -int lua_register_cocos2dx_EventCustom(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.EventCustom"); - tolua_cclass(tolua_S,"EventCustom","cc.EventCustom","cc.Event",nullptr); - - tolua_beginmodule(tolua_S,"EventCustom"); - tolua_function(tolua_S,"new",lua_cocos2dx_EventCustom_constructor); - tolua_function(tolua_S,"getEventName",lua_cocos2dx_EventCustom_getEventName); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventCustom).name(); - g_luaType[typeName] = "cc.EventCustom"; - g_typeCast["EventCustom"] = "cc.EventCustom"; - return 1; -} - -int lua_cocos2dx_EventListenerCustom_constructor(lua_State* tolua_S) +int lua_cocos2dx_EventListenerTouchOneByOne_init(lua_State* tolua_S) { int argc = 0; - cocos2d::EventListenerCustom* 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_EventListenerCustom_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::EventListenerCustom(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerCustom"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerCustom:EventListenerCustom",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerCustom_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_EventListenerCustom_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (EventListenerCustom)"); - return 0; -} - -int lua_register_cocos2dx_EventListenerCustom(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.EventListenerCustom"); - tolua_cclass(tolua_S,"EventListenerCustom","cc.EventListenerCustom","cc.EventListener",nullptr); - - tolua_beginmodule(tolua_S,"EventListenerCustom"); - tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerCustom_constructor); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventListenerCustom).name(); - g_luaType[typeName] = "cc.EventListenerCustom"; - g_typeCast["EventListenerCustom"] = "cc.EventListenerCustom"; - return 1; -} - -int lua_cocos2dx_EventFocus_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::EventFocus* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::ui::Widget* arg0; - cocos2d::ui::Widget* arg1; - - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); - - ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventFocus_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::EventFocus(arg0, arg1); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventFocus"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventFocus:EventFocus",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventFocus_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_EventFocus_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (EventFocus)"); - return 0; -} - -int lua_register_cocos2dx_EventFocus(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.EventFocus"); - tolua_cclass(tolua_S,"EventFocus","cc.EventFocus","cc.Event",nullptr); - - tolua_beginmodule(tolua_S,"EventFocus"); - tolua_function(tolua_S,"new",lua_cocos2dx_EventFocus_constructor); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventFocus).name(); - g_luaType[typeName] = "cc.EventFocus"; - g_typeCast["EventFocus"] = "cc.EventFocus"; - return 1; -} - -int lua_cocos2dx_EventListenerFocus_init(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::EventListenerFocus* cobj = nullptr; + cocos2d::EventListenerTouchOneByOne* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -29162,15 +29300,15 @@ int lua_cocos2dx_EventListenerFocus_init(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.EventListenerFocus",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.EventListenerTouchOneByOne",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::EventListenerFocus*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::EventListenerTouchOneByOne*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerFocus_init'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerTouchOneByOne_init'", nullptr); return 0; } #endif @@ -29180,27 +29318,27 @@ int lua_cocos2dx_EventListenerFocus_init(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerFocus_init'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerTouchOneByOne_init'", nullptr); return 0; } bool ret = cobj->init(); tolua_pushboolean(tolua_S,(bool)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerFocus:init",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchOneByOne:init",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerFocus_init'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchOneByOne_init'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_EventListenerFocus_constructor(lua_State* tolua_S) +int lua_cocos2dx_EventListenerTouchOneByOne_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::EventListenerFocus* cobj = nullptr; + cocos2d::EventListenerTouchOneByOne* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -29214,44 +29352,151 @@ int lua_cocos2dx_EventListenerFocus_constructor(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerFocus_constructor'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventListenerTouchOneByOne_constructor'", nullptr); return 0; } - cobj = new cocos2d::EventListenerFocus(); + cobj = new cocos2d::EventListenerTouchOneByOne(); cobj->autorelease(); int ID = (int)cobj->_ID ; int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerFocus"); + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerTouchOneByOne"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerFocus:EventListenerFocus",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchOneByOne:EventListenerTouchOneByOne",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerFocus_constructor'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchOneByOne_constructor'.",&tolua_err); #endif return 0; } -static int lua_cocos2dx_EventListenerFocus_finalize(lua_State* tolua_S) +static int lua_cocos2dx_EventListenerTouchOneByOne_finalize(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (EventListenerFocus)"); + printf("luabindings: finalizing LUA object (EventListenerTouchOneByOne)"); return 0; } -int lua_register_cocos2dx_EventListenerFocus(lua_State* tolua_S) +int lua_register_cocos2dx_EventListenerTouchOneByOne(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.EventListenerFocus"); - tolua_cclass(tolua_S,"EventListenerFocus","cc.EventListenerFocus","cc.EventListener",nullptr); + tolua_usertype(tolua_S,"cc.EventListenerTouchOneByOne"); + tolua_cclass(tolua_S,"EventListenerTouchOneByOne","cc.EventListenerTouchOneByOne","cc.EventListener",nullptr); - tolua_beginmodule(tolua_S,"EventListenerFocus"); - tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerFocus_constructor); - tolua_function(tolua_S,"init",lua_cocos2dx_EventListenerFocus_init); + tolua_beginmodule(tolua_S,"EventListenerTouchOneByOne"); + tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerTouchOneByOne_constructor); + tolua_function(tolua_S,"isSwallowTouches",lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches); + tolua_function(tolua_S,"setSwallowTouches",lua_cocos2dx_EventListenerTouchOneByOne_setSwallowTouches); + tolua_function(tolua_S,"init",lua_cocos2dx_EventListenerTouchOneByOne_init); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventListenerFocus).name(); - g_luaType[typeName] = "cc.EventListenerFocus"; - g_typeCast["EventListenerFocus"] = "cc.EventListenerFocus"; + std::string typeName = typeid(cocos2d::EventListenerTouchOneByOne).name(); + g_luaType[typeName] = "cc.EventListenerTouchOneByOne"; + g_typeCast["EventListenerTouchOneByOne"] = "cc.EventListenerTouchOneByOne"; + return 1; +} + +int lua_cocos2dx_EventListenerTouchAllAtOnce_init(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::EventListenerTouchAllAtOnce* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.EventListenerTouchAllAtOnce",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::EventListenerTouchAllAtOnce*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_EventListenerTouchAllAtOnce_init'", 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_EventListenerTouchAllAtOnce_init'", nullptr); + return 0; + } + bool ret = cobj->init(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchAllAtOnce:init",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchAllAtOnce_init'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_EventListenerTouchAllAtOnce_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::EventListenerTouchAllAtOnce* 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_EventListenerTouchAllAtOnce_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::EventListenerTouchAllAtOnce(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventListenerTouchAllAtOnce"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventListenerTouchAllAtOnce:EventListenerTouchAllAtOnce",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventListenerTouchAllAtOnce_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_EventListenerTouchAllAtOnce_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventListenerTouchAllAtOnce)"); + return 0; +} + +int lua_register_cocos2dx_EventListenerTouchAllAtOnce(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventListenerTouchAllAtOnce"); + tolua_cclass(tolua_S,"EventListenerTouchAllAtOnce","cc.EventListenerTouchAllAtOnce","cc.EventListener",nullptr); + + tolua_beginmodule(tolua_S,"EventListenerTouchAllAtOnce"); + tolua_function(tolua_S,"new",lua_cocos2dx_EventListenerTouchAllAtOnce_constructor); + tolua_function(tolua_S,"init",lua_cocos2dx_EventListenerTouchAllAtOnce_init); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::EventListenerTouchAllAtOnce).name(); + g_luaType[typeName] = "cc.EventListenerTouchAllAtOnce"; + g_typeCast["EventListenerTouchAllAtOnce"] = "cc.EventListenerTouchAllAtOnce"; return 1; } @@ -29797,10 +30042,10 @@ int lua_register_cocos2dx_OrbitCamera(lua_State* tolua_S) return 1; } -int lua_cocos2dx_ActionManager_getActionByTag(lua_State* tolua_S) +int lua_cocos2dx_CardinalSplineTo_getPoints(lua_State* tolua_S) { int argc = 0; - cocos2d::ActionManager* cobj = nullptr; + cocos2d::CardinalSplineTo* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -29809,121 +30054,15 @@ int lua_cocos2dx_ActionManager_getActionByTag(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.CardinalSplineTo",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::CardinalSplineTo*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_getActionByTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - int arg0; - const cocos2d::Node* arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:getActionByTag"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_getActionByTag'", nullptr); - return 0; - } - cocos2d::Action* ret = cobj->getActionByTag(arg0, arg1); - object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:getActionByTag",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_getActionByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ActionManager_removeActionByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ActionManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeActionByTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - int arg0; - cocos2d::Node* arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:removeActionByTag"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeActionByTag'", nullptr); - return 0; - } - cobj->removeActionByTag(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.ActionManager:removeActionByTag",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeActionByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ActionManager_removeAllActions(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ActionManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAllActions'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CardinalSplineTo_getPoints'", nullptr); return 0; } #endif @@ -29933,27 +30072,27 @@ int lua_cocos2dx_ActionManager_removeAllActions(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAllActions'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CardinalSplineTo_getPoints'", nullptr); return 0; } - cobj->removeAllActions(); - lua_settop(tolua_S, 1); + cocos2d::PointArray* ret = cobj->getPoints(); + object_to_luaval(tolua_S, "cc.PointArray",(cocos2d::PointArray*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:removeAllActions",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineTo:getPoints",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAllActions'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineTo_getPoints'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ActionManager_addAction(lua_State* tolua_S) +int lua_cocos2dx_CardinalSplineTo_updatePosition(lua_State* tolua_S) { int argc = 0; - cocos2d::ActionManager* cobj = nullptr; + cocos2d::CardinalSplineTo* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -29962,154 +30101,104 @@ int lua_cocos2dx_ActionManager_addAction(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.CardinalSplineTo",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::CardinalSplineTo*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_addAction'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CardinalSplineTo_updatePosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.CardinalSplineTo:updatePosition"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CardinalSplineTo_updatePosition'", nullptr); + return 0; + } + cobj->updatePosition(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineTo:updatePosition",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineTo_updatePosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_CardinalSplineTo_initWithDuration(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::CardinalSplineTo* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.CardinalSplineTo",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::CardinalSplineTo*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CardinalSplineTo_initWithDuration'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; if (argc == 3) - { - cocos2d::Action* arg0; - cocos2d::Node* arg1; - bool arg2; - - ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); - - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); - - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.ActionManager:addAction"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_addAction'", nullptr); - return 0; - } - cobj->addAction(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.ActionManager:addAction",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_addAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ActionManager_resumeTarget(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ActionManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_resumeTarget'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_resumeTarget'", nullptr); - return 0; - } - cobj->resumeTarget(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:resumeTarget",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_resumeTarget'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ActionManager_update(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ActionManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_update'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) { double arg0; + cocos2d::PointArray* arg1; + double arg2; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ActionManager:update"); + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CardinalSplineTo:initWithDuration"); + + ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.CardinalSplineTo:initWithDuration"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_update'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CardinalSplineTo_initWithDuration'", nullptr); return 0; } - cobj->update(arg0); - lua_settop(tolua_S, 1); + bool ret = cobj->initWithDuration(arg0, arg1, arg2); + tolua_pushboolean(tolua_S,(bool)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:update",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineTo:initWithDuration",argc, 3); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_update'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineTo_initWithDuration'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) +int lua_cocos2dx_CardinalSplineTo_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::ActionManager* cobj = nullptr; + cocos2d::CardinalSplineTo* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -30117,49 +30206,59 @@ int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) #endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); - return 0; - } -#endif argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 0) { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CardinalSplineTo_constructor'", nullptr); return 0; } - cobj->pauseTarget(arg0); - lua_settop(tolua_S, 1); + cobj = new cocos2d::CardinalSplineTo(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CardinalSplineTo"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:pauseTarget",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineTo:CardinalSplineTo",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseTarget'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineTo_constructor'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(lua_State* tolua_S) + +static int lua_cocos2dx_CardinalSplineTo_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (CardinalSplineTo)"); + return 0; +} + +int lua_register_cocos2dx_CardinalSplineTo(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.CardinalSplineTo"); + tolua_cclass(tolua_S,"CardinalSplineTo","cc.CardinalSplineTo","cc.ActionInterval",nullptr); + + tolua_beginmodule(tolua_S,"CardinalSplineTo"); + tolua_function(tolua_S,"new",lua_cocos2dx_CardinalSplineTo_constructor); + tolua_function(tolua_S,"getPoints",lua_cocos2dx_CardinalSplineTo_getPoints); + tolua_function(tolua_S,"updatePosition",lua_cocos2dx_CardinalSplineTo_updatePosition); + tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_CardinalSplineTo_initWithDuration); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::CardinalSplineTo).name(); + g_luaType[typeName] = "cc.CardinalSplineTo"; + g_typeCast["CardinalSplineTo"] = "cc.CardinalSplineTo"; + return 1; +} + +int lua_cocos2dx_CardinalSplineBy_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::ActionManager* cobj = nullptr; + cocos2d::CardinalSplineBy* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -30167,49 +30266,56 @@ int lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(lua_State* tolu #endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget'", nullptr); - return 0; - } -#endif argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 0) { - const cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CardinalSplineBy_constructor'", nullptr); return 0; } - ssize_t ret = cobj->getNumberOfRunningActionsInTarget(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); + cobj = new cocos2d::CardinalSplineBy(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CardinalSplineBy"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:getNumberOfRunningActionsInTarget",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineBy:CardinalSplineBy",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineBy_constructor'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ActionManager_removeAllActionsFromTarget(lua_State* tolua_S) + +static int lua_cocos2dx_CardinalSplineBy_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (CardinalSplineBy)"); + return 0; +} + +int lua_register_cocos2dx_CardinalSplineBy(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.CardinalSplineBy"); + tolua_cclass(tolua_S,"CardinalSplineBy","cc.CardinalSplineBy","cc.CardinalSplineTo",nullptr); + + tolua_beginmodule(tolua_S,"CardinalSplineBy"); + tolua_function(tolua_S,"new",lua_cocos2dx_CardinalSplineBy_constructor); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::CardinalSplineBy).name(); + g_luaType[typeName] = "cc.CardinalSplineBy"; + g_typeCast["CardinalSplineBy"] = "cc.CardinalSplineBy"; + return 1; +} + +int lua_cocos2dx_CatmullRomTo_initWithDuration(lua_State* tolua_S) { int argc = 0; - cocos2d::ActionManager* cobj = nullptr; + cocos2d::CatmullRomTo* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -30218,165 +30324,15 @@ int lua_cocos2dx_ActionManager_removeAllActionsFromTarget(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.CatmullRomTo",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::CatmullRomTo*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAllActionsFromTarget'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAllActionsFromTarget'", nullptr); - return 0; - } - cobj->removeAllActionsFromTarget(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:removeAllActionsFromTarget",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAllActionsFromTarget'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ActionManager_resumeTargets(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ActionManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_resumeTargets'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vector arg0; - - ok &= luaval_to_ccvector(tolua_S, 2, &arg0, "cc.ActionManager:resumeTargets"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_resumeTargets'", nullptr); - return 0; - } - cobj->resumeTargets(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:resumeTargets",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_resumeTargets'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ActionManager_removeAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ActionManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Action* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAction'", nullptr); - return 0; - } - cobj->removeAction(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:removeAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ActionManager_removeAllActionsByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ActionManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CatmullRomTo_initWithDuration'", nullptr); return 0; } #endif @@ -30384,35 +30340,55 @@ int lua_cocos2dx_ActionManager_removeAllActionsByTag(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 2) { - int arg0; - cocos2d::Node* arg1; + double arg0; + cocos2d::PointArray* arg1; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:removeAllActionsByTag"); + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CatmullRomTo:initWithDuration"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CatmullRomTo_initWithDuration'", nullptr); return 0; } - cobj->removeAllActionsByTag(arg0, arg1); - lua_settop(tolua_S, 1); + bool ret = cobj->initWithDuration(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.ActionManager:removeAllActionsByTag",argc, 2); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CatmullRomTo:initWithDuration",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CatmullRomTo_initWithDuration'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ActionManager_pauseAllRunningActions(lua_State* tolua_S) +static int lua_cocos2dx_CatmullRomTo_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (CatmullRomTo)"); + return 0; +} + +int lua_register_cocos2dx_CatmullRomTo(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.CatmullRomTo"); + tolua_cclass(tolua_S,"CatmullRomTo","cc.CatmullRomTo","cc.CardinalSplineTo",nullptr); + + tolua_beginmodule(tolua_S,"CatmullRomTo"); + tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_CatmullRomTo_initWithDuration); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::CatmullRomTo).name(); + g_luaType[typeName] = "cc.CatmullRomTo"; + g_typeCast["CatmullRomTo"] = "cc.CatmullRomTo"; + return 1; +} + +int lua_cocos2dx_CatmullRomBy_initWithDuration(lua_State* tolua_S) { int argc = 0; - cocos2d::ActionManager* cobj = nullptr; + cocos2d::CatmullRomBy* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -30421,108 +30397,64 @@ int lua_cocos2dx_ActionManager_pauseAllRunningActions(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.CatmullRomBy",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::CatmullRomBy*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseAllRunningActions'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CatmullRomBy_initWithDuration'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; - if (argc == 0) + if (argc == 2) { + double arg0; + cocos2d::PointArray* arg1; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CatmullRomBy:initWithDuration"); + + ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_pauseAllRunningActions'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CatmullRomBy_initWithDuration'", nullptr); return 0; } - cocos2d::Vector ret = cobj->pauseAllRunningActions(); - ccvector_to_luaval(tolua_S, ret); + bool ret = cobj->initWithDuration(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.ActionManager:pauseAllRunningActions",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CatmullRomBy:initWithDuration",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseAllRunningActions'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CatmullRomBy_initWithDuration'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_ActionManager_constructor(lua_State* tolua_S) +static int lua_cocos2dx_CatmullRomBy_finalize(lua_State* tolua_S) { - int argc = 0; - cocos2d::ActionManager* 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_ActionManager_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::ActionManager(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ActionManager"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:ActionManager",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_constructor'.",&tolua_err); -#endif - + printf("luabindings: finalizing LUA object (CatmullRomBy)"); return 0; } -static int lua_cocos2dx_ActionManager_finalize(lua_State* tolua_S) +int lua_register_cocos2dx_CatmullRomBy(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (ActionManager)"); - return 0; -} + tolua_usertype(tolua_S,"cc.CatmullRomBy"); + tolua_cclass(tolua_S,"CatmullRomBy","cc.CatmullRomBy","cc.CardinalSplineBy",nullptr); -int lua_register_cocos2dx_ActionManager(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.ActionManager"); - tolua_cclass(tolua_S,"ActionManager","cc.ActionManager","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"ActionManager"); - tolua_function(tolua_S,"new",lua_cocos2dx_ActionManager_constructor); - tolua_function(tolua_S,"getActionByTag",lua_cocos2dx_ActionManager_getActionByTag); - tolua_function(tolua_S,"removeActionByTag",lua_cocos2dx_ActionManager_removeActionByTag); - tolua_function(tolua_S,"removeAllActions",lua_cocos2dx_ActionManager_removeAllActions); - tolua_function(tolua_S,"addAction",lua_cocos2dx_ActionManager_addAction); - tolua_function(tolua_S,"resumeTarget",lua_cocos2dx_ActionManager_resumeTarget); - tolua_function(tolua_S,"update",lua_cocos2dx_ActionManager_update); - tolua_function(tolua_S,"pauseTarget",lua_cocos2dx_ActionManager_pauseTarget); - tolua_function(tolua_S,"getNumberOfRunningActionsInTarget",lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget); - tolua_function(tolua_S,"removeAllActionsFromTarget",lua_cocos2dx_ActionManager_removeAllActionsFromTarget); - tolua_function(tolua_S,"resumeTargets",lua_cocos2dx_ActionManager_resumeTargets); - tolua_function(tolua_S,"removeAction",lua_cocos2dx_ActionManager_removeAction); - tolua_function(tolua_S,"removeAllActionsByTag",lua_cocos2dx_ActionManager_removeAllActionsByTag); - tolua_function(tolua_S,"pauseAllRunningActions",lua_cocos2dx_ActionManager_pauseAllRunningActions); + tolua_beginmodule(tolua_S,"CatmullRomBy"); + tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_CatmullRomBy_initWithDuration); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::ActionManager).name(); - g_luaType[typeName] = "cc.ActionManager"; - g_typeCast["ActionManager"] = "cc.ActionManager"; + std::string typeName = typeid(cocos2d::CatmullRomBy).name(); + g_luaType[typeName] = "cc.CatmullRomBy"; + g_typeCast["CatmullRomBy"] = "cc.CatmullRomBy"; return 1; } @@ -38728,6 +38660,735 @@ int lua_register_cocos2dx_Twirl(lua_State* tolua_S) return 1; } +int lua_cocos2dx_ActionManager_getActionByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_getActionByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + int arg0; + const cocos2d::Node* arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:getActionByTag"); + + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_getActionByTag'", nullptr); + return 0; + } + cocos2d::Action* ret = cobj->getActionByTag(arg0, arg1); + object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:getActionByTag",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_getActionByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_removeActionByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeActionByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + int arg0; + cocos2d::Node* arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:removeActionByTag"); + + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeActionByTag'", nullptr); + return 0; + } + cobj->removeActionByTag(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.ActionManager:removeActionByTag",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeActionByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_removeAllActions(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAllActions'", 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_ActionManager_removeAllActions'", nullptr); + return 0; + } + cobj->removeAllActions(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:removeAllActions",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAllActions'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_addAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_addAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + cocos2d::Action* arg0; + cocos2d::Node* arg1; + bool arg2; + + ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); + + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + + ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.ActionManager:addAction"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_addAction'", nullptr); + return 0; + } + cobj->addAction(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.ActionManager:addAction",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_addAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_resumeTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_resumeTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_resumeTarget'", nullptr); + return 0; + } + cobj->resumeTarget(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:resumeTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_resumeTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_update(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_update'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ActionManager:update"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_update'", nullptr); + return 0; + } + cobj->update(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:update",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_update'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); + return 0; + } + cobj->pauseTarget(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:pauseTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + const cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget'", nullptr); + return 0; + } + ssize_t ret = cobj->getNumberOfRunningActionsInTarget(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.ActionManager:getNumberOfRunningActionsInTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_removeAllActionsFromTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAllActionsFromTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAllActionsFromTarget'", nullptr); + return 0; + } + cobj->removeAllActionsFromTarget(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:removeAllActionsFromTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAllActionsFromTarget'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_resumeTargets(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_resumeTargets'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vector arg0; + + ok &= luaval_to_ccvector(tolua_S, 2, &arg0, "cc.ActionManager:resumeTargets"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_resumeTargets'", nullptr); + return 0; + } + cobj->resumeTargets(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:resumeTargets",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_resumeTargets'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_removeAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Action* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAction'", nullptr); + return 0; + } + cobj->removeAction(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:removeAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_removeAllActionsByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + int arg0; + cocos2d::Node* arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:removeAllActionsByTag"); + + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'", nullptr); + return 0; + } + cobj->removeAllActionsByTag(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.ActionManager:removeAllActionsByTag",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_pauseAllRunningActions(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseAllRunningActions'", 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_ActionManager_pauseAllRunningActions'", nullptr); + return 0; + } + cocos2d::Vector ret = cobj->pauseAllRunningActions(); + ccvector_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:pauseAllRunningActions",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseAllRunningActions'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ActionManager_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* 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_ActionManager_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::ActionManager(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ActionManager"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:ActionManager",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_ActionManager_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ActionManager)"); + return 0; +} + +int lua_register_cocos2dx_ActionManager(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ActionManager"); + tolua_cclass(tolua_S,"ActionManager","cc.ActionManager","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"ActionManager"); + tolua_function(tolua_S,"new",lua_cocos2dx_ActionManager_constructor); + tolua_function(tolua_S,"getActionByTag",lua_cocos2dx_ActionManager_getActionByTag); + tolua_function(tolua_S,"removeActionByTag",lua_cocos2dx_ActionManager_removeActionByTag); + tolua_function(tolua_S,"removeAllActions",lua_cocos2dx_ActionManager_removeAllActions); + tolua_function(tolua_S,"addAction",lua_cocos2dx_ActionManager_addAction); + tolua_function(tolua_S,"resumeTarget",lua_cocos2dx_ActionManager_resumeTarget); + tolua_function(tolua_S,"update",lua_cocos2dx_ActionManager_update); + tolua_function(tolua_S,"pauseTarget",lua_cocos2dx_ActionManager_pauseTarget); + tolua_function(tolua_S,"getNumberOfRunningActionsInTarget",lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget); + tolua_function(tolua_S,"removeAllActionsFromTarget",lua_cocos2dx_ActionManager_removeAllActionsFromTarget); + tolua_function(tolua_S,"resumeTargets",lua_cocos2dx_ActionManager_resumeTargets); + tolua_function(tolua_S,"removeAction",lua_cocos2dx_ActionManager_removeAction); + tolua_function(tolua_S,"removeAllActionsByTag",lua_cocos2dx_ActionManager_removeAllActionsByTag); + tolua_function(tolua_S,"pauseAllRunningActions",lua_cocos2dx_ActionManager_pauseAllRunningActions); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ActionManager).name(); + g_luaType[typeName] = "cc.ActionManager"; + g_typeCast["ActionManager"] = "cc.ActionManager"; + return 1; +} + int lua_cocos2dx_PageTurn3D_create(lua_State* tolua_S) { int argc = 0; @@ -41623,1078 +42284,6 @@ int lua_register_cocos2dx_ActionTween(lua_State* tolua_S) return 1; } -int lua_cocos2dx_CardinalSplineTo_getPoints(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::CardinalSplineTo* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CardinalSplineTo",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::CardinalSplineTo*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CardinalSplineTo_getPoints'", 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_CardinalSplineTo_getPoints'", nullptr); - return 0; - } - cocos2d::PointArray* ret = cobj->getPoints(); - object_to_luaval(tolua_S, "cc.PointArray",(cocos2d::PointArray*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineTo:getPoints",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineTo_getPoints'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_CardinalSplineTo_updatePosition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::CardinalSplineTo* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CardinalSplineTo",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::CardinalSplineTo*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CardinalSplineTo_updatePosition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.CardinalSplineTo:updatePosition"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CardinalSplineTo_updatePosition'", nullptr); - return 0; - } - cobj->updatePosition(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineTo:updatePosition",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineTo_updatePosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_CardinalSplineTo_initWithDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::CardinalSplineTo* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CardinalSplineTo",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::CardinalSplineTo*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CardinalSplineTo_initWithDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - double arg0; - cocos2d::PointArray* arg1; - double arg2; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CardinalSplineTo:initWithDuration"); - - ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.CardinalSplineTo:initWithDuration"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CardinalSplineTo_initWithDuration'", nullptr); - return 0; - } - bool ret = cobj->initWithDuration(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineTo:initWithDuration",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineTo_initWithDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_CardinalSplineTo_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::CardinalSplineTo* 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_CardinalSplineTo_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::CardinalSplineTo(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CardinalSplineTo"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineTo:CardinalSplineTo",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineTo_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_CardinalSplineTo_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (CardinalSplineTo)"); - return 0; -} - -int lua_register_cocos2dx_CardinalSplineTo(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.CardinalSplineTo"); - tolua_cclass(tolua_S,"CardinalSplineTo","cc.CardinalSplineTo","cc.ActionInterval",nullptr); - - tolua_beginmodule(tolua_S,"CardinalSplineTo"); - tolua_function(tolua_S,"new",lua_cocos2dx_CardinalSplineTo_constructor); - tolua_function(tolua_S,"getPoints",lua_cocos2dx_CardinalSplineTo_getPoints); - tolua_function(tolua_S,"updatePosition",lua_cocos2dx_CardinalSplineTo_updatePosition); - tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_CardinalSplineTo_initWithDuration); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::CardinalSplineTo).name(); - g_luaType[typeName] = "cc.CardinalSplineTo"; - g_typeCast["CardinalSplineTo"] = "cc.CardinalSplineTo"; - return 1; -} - -int lua_cocos2dx_CardinalSplineBy_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::CardinalSplineBy* 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_CardinalSplineBy_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::CardinalSplineBy(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CardinalSplineBy"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CardinalSplineBy:CardinalSplineBy",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CardinalSplineBy_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_CardinalSplineBy_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (CardinalSplineBy)"); - return 0; -} - -int lua_register_cocos2dx_CardinalSplineBy(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.CardinalSplineBy"); - tolua_cclass(tolua_S,"CardinalSplineBy","cc.CardinalSplineBy","cc.CardinalSplineTo",nullptr); - - tolua_beginmodule(tolua_S,"CardinalSplineBy"); - tolua_function(tolua_S,"new",lua_cocos2dx_CardinalSplineBy_constructor); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::CardinalSplineBy).name(); - g_luaType[typeName] = "cc.CardinalSplineBy"; - g_typeCast["CardinalSplineBy"] = "cc.CardinalSplineBy"; - return 1; -} - -int lua_cocos2dx_CatmullRomTo_initWithDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::CatmullRomTo* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CatmullRomTo",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::CatmullRomTo*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CatmullRomTo_initWithDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - double arg0; - cocos2d::PointArray* arg1; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CatmullRomTo:initWithDuration"); - - ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CatmullRomTo_initWithDuration'", nullptr); - return 0; - } - bool ret = cobj->initWithDuration(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.CatmullRomTo:initWithDuration",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CatmullRomTo_initWithDuration'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_CatmullRomTo_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (CatmullRomTo)"); - return 0; -} - -int lua_register_cocos2dx_CatmullRomTo(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.CatmullRomTo"); - tolua_cclass(tolua_S,"CatmullRomTo","cc.CatmullRomTo","cc.CardinalSplineTo",nullptr); - - tolua_beginmodule(tolua_S,"CatmullRomTo"); - tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_CatmullRomTo_initWithDuration); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::CatmullRomTo).name(); - g_luaType[typeName] = "cc.CatmullRomTo"; - g_typeCast["CatmullRomTo"] = "cc.CatmullRomTo"; - return 1; -} - -int lua_cocos2dx_CatmullRomBy_initWithDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::CatmullRomBy* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CatmullRomBy",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::CatmullRomBy*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CatmullRomBy_initWithDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - double arg0; - cocos2d::PointArray* arg1; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CatmullRomBy:initWithDuration"); - - ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CatmullRomBy_initWithDuration'", nullptr); - return 0; - } - bool ret = cobj->initWithDuration(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.CatmullRomBy:initWithDuration",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CatmullRomBy_initWithDuration'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_CatmullRomBy_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (CatmullRomBy)"); - return 0; -} - -int lua_register_cocos2dx_CatmullRomBy(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.CatmullRomBy"); - tolua_cclass(tolua_S,"CatmullRomBy","cc.CatmullRomBy","cc.CardinalSplineBy",nullptr); - - tolua_beginmodule(tolua_S,"CatmullRomBy"); - tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_CatmullRomBy_initWithDuration); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::CatmullRomBy).name(); - g_luaType[typeName] = "cc.CatmullRomBy"; - g_typeCast["CatmullRomBy"] = "cc.CatmullRomBy"; - return 1; -} - -int lua_cocos2dx_ProtectedNode_addProtectedChild(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_addProtectedChild'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:addProtectedChild"); - - if (!ok) { break; } - cobj->addProtectedChild(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - cobj->addProtectedChild(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:addProtectedChild"); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.ProtectedNode:addProtectedChild"); - - if (!ok) { break; } - cobj->addProtectedChild(arg0, arg1, arg2); - 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.ProtectedNode:addProtectedChild",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_addProtectedChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_disableCascadeColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_disableCascadeColor'", 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_ProtectedNode_disableCascadeColor'", nullptr); - return 0; - } - cobj->disableCascadeColor(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:disableCascadeColor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_disableCascadeColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_removeProtectedChildByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'", 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.ProtectedNode:removeProtectedChildByTag"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'", nullptr); - return 0; - } - cobj->removeProtectedChildByTag(arg0); - lua_settop(tolua_S, 1); - return 1; - } - if (argc == 2) - { - int arg0; - bool arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProtectedNode:removeProtectedChildByTag"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.ProtectedNode:removeProtectedChildByTag"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'", nullptr); - return 0; - } - cobj->removeProtectedChildByTag(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.ProtectedNode:removeProtectedChildByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_reorderProtectedChild(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Node* arg0; - int arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:reorderProtectedChild"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'", nullptr); - return 0; - } - cobj->reorderProtectedChild(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.ProtectedNode:reorderProtectedChild",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProtectedNode:removeAllProtectedChildrenWithCleanup"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'", nullptr); - return 0; - } - cobj->removeAllProtectedChildrenWithCleanup(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeAllProtectedChildrenWithCleanup",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_disableCascadeOpacity(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_disableCascadeOpacity'", 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_ProtectedNode_disableCascadeOpacity'", nullptr); - return 0; - } - cobj->disableCascadeOpacity(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:disableCascadeOpacity",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_disableCascadeOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_sortAllProtectedChildren(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_sortAllProtectedChildren'", 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_ProtectedNode_sortAllProtectedChildren'", nullptr); - return 0; - } - cobj->sortAllProtectedChildren(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:sortAllProtectedChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_sortAllProtectedChildren'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_getProtectedChildByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'", 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.ProtectedNode:getProtectedChildByTag"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'", nullptr); - return 0; - } - cocos2d::Node* ret = cobj->getProtectedChildByTag(arg0); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:getProtectedChildByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_removeProtectedChild(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'", nullptr); - return 0; - } - cobj->removeProtectedChild(arg0); - lua_settop(tolua_S, 1); - return 1; - } - if (argc == 2) - { - cocos2d::Node* arg0; - bool arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.ProtectedNode:removeProtectedChild"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'", nullptr); - return 0; - } - cobj->removeProtectedChild(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.ProtectedNode:removeProtectedChild",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_removeAllProtectedChildren(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildren'", 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_ProtectedNode_removeAllProtectedChildren'", nullptr); - return 0; - } - cobj->removeAllProtectedChildren(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeAllProtectedChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildren'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_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.ProtectedNode",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_ProtectedNode_create'", nullptr); - return 0; - } - cocos2d::ProtectedNode* ret = cocos2d::ProtectedNode::create(); - object_to_luaval(tolua_S, "cc.ProtectedNode",(cocos2d::ProtectedNode*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProtectedNode:create",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_ProtectedNode_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* 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_ProtectedNode_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::ProtectedNode(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ProtectedNode"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:ProtectedNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_ProtectedNode_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (ProtectedNode)"); - return 0; -} - -int lua_register_cocos2dx_ProtectedNode(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.ProtectedNode"); - tolua_cclass(tolua_S,"ProtectedNode","cc.ProtectedNode","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"ProtectedNode"); - tolua_function(tolua_S,"new",lua_cocos2dx_ProtectedNode_constructor); - tolua_function(tolua_S,"addProtectedChild",lua_cocos2dx_ProtectedNode_addProtectedChild); - tolua_function(tolua_S,"disableCascadeColor",lua_cocos2dx_ProtectedNode_disableCascadeColor); - tolua_function(tolua_S,"removeProtectedChildByTag",lua_cocos2dx_ProtectedNode_removeProtectedChildByTag); - tolua_function(tolua_S,"reorderProtectedChild",lua_cocos2dx_ProtectedNode_reorderProtectedChild); - tolua_function(tolua_S,"removeAllProtectedChildrenWithCleanup",lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup); - tolua_function(tolua_S,"disableCascadeOpacity",lua_cocos2dx_ProtectedNode_disableCascadeOpacity); - tolua_function(tolua_S,"sortAllProtectedChildren",lua_cocos2dx_ProtectedNode_sortAllProtectedChildren); - tolua_function(tolua_S,"getProtectedChildByTag",lua_cocos2dx_ProtectedNode_getProtectedChildByTag); - tolua_function(tolua_S,"removeProtectedChild",lua_cocos2dx_ProtectedNode_removeProtectedChild); - tolua_function(tolua_S,"removeAllProtectedChildren",lua_cocos2dx_ProtectedNode_removeAllProtectedChildren); - tolua_function(tolua_S,"create", lua_cocos2dx_ProtectedNode_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::ProtectedNode).name(); - g_luaType[typeName] = "cc.ProtectedNode"; - g_typeCast["ProtectedNode"] = "cc.ProtectedNode"; - return 1; -} - int lua_cocos2dx_GLProgramState_getVertexAttribsFlags(lua_State* tolua_S) { int argc = 0; @@ -43008,12 +42597,12 @@ int lua_cocos2dx_GLProgramState_setUniformVec4v(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec4v"); if (!ok) { break; } - const cocos2d::Vec4* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Vec4",&arg1); + ssize_t arg1; + ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4v"); if (!ok) { break; } - ssize_t arg2; - ok &= luaval_to_ssize(tolua_S, 4, &arg2, "cc.GLProgramState:setUniformVec4v"); + const cocos2d::Vec4* arg2; + ok &= luaval_to_object(tolua_S, 4, "cc.Vec4",&arg2); if (!ok) { break; } cobj->setUniformVec4v(arg0, arg1, arg2); @@ -43028,12 +42617,12 @@ int lua_cocos2dx_GLProgramState_setUniformVec4v(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec4v"); if (!ok) { break; } - const cocos2d::Vec4* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Vec4",&arg1); + ssize_t arg1; + ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4v"); if (!ok) { break; } - ssize_t arg2; - ok &= luaval_to_ssize(tolua_S, 4, &arg2, "cc.GLProgramState:setUniformVec4v"); + const cocos2d::Vec4* arg2; + ok &= luaval_to_object(tolua_S, 4, "cc.Vec4",&arg2); if (!ok) { break; } cobj->setUniformVec4v(arg0, arg1, arg2); @@ -43192,12 +42781,12 @@ int lua_cocos2dx_GLProgramState_setUniformVec2v(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec2v"); if (!ok) { break; } - const cocos2d::Vec2* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Vec2",&arg1); + ssize_t arg1; + ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2v"); if (!ok) { break; } - ssize_t arg2; - ok &= luaval_to_ssize(tolua_S, 4, &arg2, "cc.GLProgramState:setUniformVec2v"); + const cocos2d::Vec2* arg2; + ok &= luaval_to_object(tolua_S, 4, "cc.Vec2",&arg2); if (!ok) { break; } cobj->setUniformVec2v(arg0, arg1, arg2); @@ -43212,12 +42801,12 @@ int lua_cocos2dx_GLProgramState_setUniformVec2v(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec2v"); if (!ok) { break; } - const cocos2d::Vec2* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Vec2",&arg1); + ssize_t arg1; + ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2v"); if (!ok) { break; } - ssize_t arg2; - ok &= luaval_to_ssize(tolua_S, 4, &arg2, "cc.GLProgramState:setUniformVec2v"); + const cocos2d::Vec2* arg2; + ok &= luaval_to_object(tolua_S, 4, "cc.Vec2",&arg2); if (!ok) { break; } cobj->setUniformVec2v(arg0, arg1, arg2); @@ -43468,13 +43057,13 @@ int lua_cocos2dx_GLProgramState_setUniformFloatv(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformFloatv"); if (!ok) { break; } - const float* arg1; - #pragma warning NO CONVERSION TO NATIVE FOR float* - ok = false; + ssize_t arg1; + ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformFloatv"); if (!ok) { break; } - ssize_t arg2; - ok &= luaval_to_ssize(tolua_S, 4, &arg2, "cc.GLProgramState:setUniformFloatv"); + const float* arg2; + #pragma warning NO CONVERSION TO NATIVE FOR float* + ok = false; if (!ok) { break; } cobj->setUniformFloatv(arg0, arg1, arg2); @@ -43489,13 +43078,13 @@ int lua_cocos2dx_GLProgramState_setUniformFloatv(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformFloatv"); if (!ok) { break; } - const float* arg1; - #pragma warning NO CONVERSION TO NATIVE FOR float* - ok = false; + ssize_t arg1; + ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformFloatv"); if (!ok) { break; } - ssize_t arg2; - ok &= luaval_to_ssize(tolua_S, 4, &arg2, "cc.GLProgramState:setUniformFloatv"); + const float* arg2; + #pragma warning NO CONVERSION TO NATIVE FOR float* + ok = false; if (!ok) { break; } cobj->setUniformFloatv(arg0, arg1, arg2); @@ -43856,12 +43445,12 @@ int lua_cocos2dx_GLProgramState_setUniformVec3v(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec3v"); if (!ok) { break; } - const cocos2d::Vec3* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Vec3",&arg1); + ssize_t arg1; + ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3v"); if (!ok) { break; } - ssize_t arg2; - ok &= luaval_to_ssize(tolua_S, 4, &arg2, "cc.GLProgramState:setUniformVec3v"); + const cocos2d::Vec3* arg2; + ok &= luaval_to_object(tolua_S, 4, "cc.Vec3",&arg2); if (!ok) { break; } cobj->setUniformVec3v(arg0, arg1, arg2); @@ -43876,12 +43465,12 @@ int lua_cocos2dx_GLProgramState_setUniformVec3v(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec3v"); if (!ok) { break; } - const cocos2d::Vec3* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Vec3",&arg1); + ssize_t arg1; + ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3v"); if (!ok) { break; } - ssize_t arg2; - ok &= luaval_to_ssize(tolua_S, 4, &arg2, "cc.GLProgramState:setUniformVec3v"); + const cocos2d::Vec3* arg2; + ok &= luaval_to_object(tolua_S, 4, "cc.Vec3",&arg2); if (!ok) { break; } cobj->setUniformVec3v(arg0, arg1, arg2); @@ -44803,6 +44392,730 @@ int lua_register_cocos2dx_AtlasNode(lua_State* tolua_S) return 1; } +int lua_cocos2dx_ClippingNode_hasContent(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_hasContent'", 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_ClippingNode_hasContent'", nullptr); + return 0; + } + bool ret = cobj->hasContent(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:hasContent",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_hasContent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingNode_setInverted(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_setInverted'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ClippingNode:setInverted"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_setInverted'", nullptr); + return 0; + } + cobj->setInverted(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:setInverted",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_setInverted'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingNode_setStencil(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_setStencil'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_setStencil'", nullptr); + return 0; + } + cobj->setStencil(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:setStencil",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_setStencil'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingNode_getAlphaThreshold(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_getAlphaThreshold'", 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_ClippingNode_getAlphaThreshold'", nullptr); + return 0; + } + double ret = cobj->getAlphaThreshold(); + 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.ClippingNode:getAlphaThreshold",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_getAlphaThreshold'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingNode_init(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_init'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_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.ClippingNode:init",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_init'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingNode_getStencil(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_getStencil'", 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_ClippingNode_getStencil'", nullptr); + return 0; + } + cocos2d::Node* ret = cobj->getStencil(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:getStencil",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_getStencil'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingNode_setAlphaThreshold(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_setAlphaThreshold'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ClippingNode:setAlphaThreshold"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_setAlphaThreshold'", nullptr); + return 0; + } + cobj->setAlphaThreshold(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:setAlphaThreshold",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_setAlphaThreshold'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingNode_isInverted(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_isInverted'", 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_ClippingNode_isInverted'", nullptr); + return 0; + } + bool ret = cobj->isInverted(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:isInverted",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_isInverted'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingNode_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.ClippingNode",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 1) + { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if (!ok) { break; } + cocos2d::ClippingNode* ret = cocos2d::ClippingNode::create(arg0); + object_to_luaval(tolua_S, "cc.ClippingNode",(cocos2d::ClippingNode*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 0) + { + cocos2d::ClippingNode* ret = cocos2d::ClippingNode::create(); + object_to_luaval(tolua_S, "cc.ClippingNode",(cocos2d::ClippingNode*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.ClippingNode:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_ClippingNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ClippingNode)"); + return 0; +} + +int lua_register_cocos2dx_ClippingNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ClippingNode"); + tolua_cclass(tolua_S,"ClippingNode","cc.ClippingNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"ClippingNode"); + tolua_function(tolua_S,"hasContent",lua_cocos2dx_ClippingNode_hasContent); + tolua_function(tolua_S,"setInverted",lua_cocos2dx_ClippingNode_setInverted); + tolua_function(tolua_S,"setStencil",lua_cocos2dx_ClippingNode_setStencil); + tolua_function(tolua_S,"getAlphaThreshold",lua_cocos2dx_ClippingNode_getAlphaThreshold); + tolua_function(tolua_S,"init",lua_cocos2dx_ClippingNode_init); + tolua_function(tolua_S,"getStencil",lua_cocos2dx_ClippingNode_getStencil); + tolua_function(tolua_S,"setAlphaThreshold",lua_cocos2dx_ClippingNode_setAlphaThreshold); + tolua_function(tolua_S,"isInverted",lua_cocos2dx_ClippingNode_isInverted); + tolua_function(tolua_S,"create", lua_cocos2dx_ClippingNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ClippingNode).name(); + g_luaType[typeName] = "cc.ClippingNode"; + g_typeCast["ClippingNode"] = "cc.ClippingNode"; + return 1; +} + +int lua_cocos2dx_ClippingRectangleNode_isClippingEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingRectangleNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_isClippingEnabled'", 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_ClippingRectangleNode_isClippingEnabled'", nullptr); + return 0; + } + const bool ret = cobj->isClippingEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:isClippingEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_isClippingEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingRectangleNode_setClippingEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingRectangleNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_setClippingEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ClippingRectangleNode:setClippingEnabled"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingRectangleNode_setClippingEnabled'", nullptr); + return 0; + } + cobj->setClippingEnabled(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:setClippingEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_setClippingEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingRectangleNode_getClippingRegion(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingRectangleNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_getClippingRegion'", 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_ClippingRectangleNode_getClippingRegion'", nullptr); + return 0; + } + const cocos2d::Rect& ret = cobj->getClippingRegion(); + rect_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:getClippingRegion",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_getClippingRegion'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingRectangleNode_setClippingRegion(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingRectangleNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_setClippingRegion'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Rect arg0; + + ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.ClippingRectangleNode:setClippingRegion"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingRectangleNode_setClippingRegion'", nullptr); + return 0; + } + cobj->setClippingRegion(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:setClippingRegion",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_setClippingRegion'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingRectangleNode_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.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 0) + { + cocos2d::ClippingRectangleNode* ret = cocos2d::ClippingRectangleNode::create(); + object_to_luaval(tolua_S, "cc.ClippingRectangleNode",(cocos2d::ClippingRectangleNode*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 1) + { + cocos2d::Rect arg0; + ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.ClippingRectangleNode:create"); + if (!ok) { break; } + cocos2d::ClippingRectangleNode* ret = cocos2d::ClippingRectangleNode::create(arg0); + object_to_luaval(tolua_S, "cc.ClippingRectangleNode",(cocos2d::ClippingRectangleNode*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.ClippingRectangleNode:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_ClippingRectangleNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ClippingRectangleNode)"); + return 0; +} + +int lua_register_cocos2dx_ClippingRectangleNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ClippingRectangleNode"); + tolua_cclass(tolua_S,"ClippingRectangleNode","cc.ClippingRectangleNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"ClippingRectangleNode"); + tolua_function(tolua_S,"isClippingEnabled",lua_cocos2dx_ClippingRectangleNode_isClippingEnabled); + tolua_function(tolua_S,"setClippingEnabled",lua_cocos2dx_ClippingRectangleNode_setClippingEnabled); + tolua_function(tolua_S,"getClippingRegion",lua_cocos2dx_ClippingRectangleNode_getClippingRegion); + tolua_function(tolua_S,"setClippingRegion",lua_cocos2dx_ClippingRectangleNode_setClippingRegion); + tolua_function(tolua_S,"create", lua_cocos2dx_ClippingRectangleNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ClippingRectangleNode).name(); + g_luaType[typeName] = "cc.ClippingRectangleNode"; + g_typeCast["ClippingRectangleNode"] = "cc.ClippingRectangleNode"; + return 1; +} + int lua_cocos2dx_DrawNode_drawLine(lua_State* tolua_S) { int argc = 0; @@ -45961,340 +46274,6 @@ int lua_register_cocos2dx_DrawNode(lua_State* tolua_S) return 1; } -int lua_cocos2dx_LabelAtlas_setString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_setString'", 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.LabelAtlas:setString"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_LabelAtlas_setString'", nullptr); - return 0; - } - cobj->setString(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:setString",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_setString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_initWithString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_initWithString'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 5) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 5) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - 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.LabelAtlas:initWithString",argc, 5); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_initWithString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_getString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_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_LabelAtlas_getString'", nullptr); - return 0; - } - const std::string& ret = cobj->getString(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:getString",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_getString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 5) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:create"); - if (!ok) { break; } - int arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:create"); - if (!ok) { break; } - int arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:create"); - if (!ok) { break; } - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1, arg2, arg3, arg4); - object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 0) - { - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(); - object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); - if (!ok) { break; } - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.LabelAtlas:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_LabelAtlas_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* 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_LabelAtlas_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::LabelAtlas(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.LabelAtlas"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:LabelAtlas",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_LabelAtlas_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (LabelAtlas)"); - return 0; -} - -int lua_register_cocos2dx_LabelAtlas(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.LabelAtlas"); - tolua_cclass(tolua_S,"LabelAtlas","cc.LabelAtlas","cc.AtlasNode",nullptr); - - tolua_beginmodule(tolua_S,"LabelAtlas"); - tolua_function(tolua_S,"new",lua_cocos2dx_LabelAtlas_constructor); - tolua_function(tolua_S,"setString",lua_cocos2dx_LabelAtlas_setString); - tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelAtlas_initWithString); - tolua_function(tolua_S,"getString",lua_cocos2dx_LabelAtlas_getString); - tolua_function(tolua_S,"_create", lua_cocos2dx_LabelAtlas_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::LabelAtlas).name(); - g_luaType[typeName] = "cc.LabelAtlas"; - g_typeCast["LabelAtlas"] = "cc.LabelAtlas"; - return 1; -} - int lua_cocos2dx_SpriteBatchNode_appendChild(lua_State* tolua_S) { int argc = 0; @@ -50167,6 +50146,340 @@ int lua_register_cocos2dx_Label(lua_State* tolua_S) return 1; } +int lua_cocos2dx_LabelAtlas_setString(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::LabelAtlas* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_setString'", 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.LabelAtlas:setString"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_LabelAtlas_setString'", nullptr); + return 0; + } + cobj->setString(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:setString",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_setString'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_LabelAtlas_initWithString(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::LabelAtlas* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_initWithString'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 5) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 5) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + 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.LabelAtlas:initWithString",argc, 5); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_initWithString'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_LabelAtlas_getString(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::LabelAtlas* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_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_LabelAtlas_getString'", nullptr); + return 0; + } + const std::string& ret = cobj->getString(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:getString",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_getString'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_LabelAtlas_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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 5) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:create"); + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:create"); + if (!ok) { break; } + int arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:create"); + if (!ok) { break; } + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1, arg2, arg3, arg4); + object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 0) + { + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(); + object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); + if (!ok) { break; } + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.LabelAtlas:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_LabelAtlas_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::LabelAtlas* 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_LabelAtlas_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::LabelAtlas(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.LabelAtlas"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:LabelAtlas",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_LabelAtlas_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (LabelAtlas)"); + return 0; +} + +int lua_register_cocos2dx_LabelAtlas(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.LabelAtlas"); + tolua_cclass(tolua_S,"LabelAtlas","cc.LabelAtlas","cc.AtlasNode",nullptr); + + tolua_beginmodule(tolua_S,"LabelAtlas"); + tolua_function(tolua_S,"new",lua_cocos2dx_LabelAtlas_constructor); + tolua_function(tolua_S,"setString",lua_cocos2dx_LabelAtlas_setString); + tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelAtlas_initWithString); + tolua_function(tolua_S,"getString",lua_cocos2dx_LabelAtlas_getString); + tolua_function(tolua_S,"_create", lua_cocos2dx_LabelAtlas_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::LabelAtlas).name(); + g_luaType[typeName] = "cc.LabelAtlas"; + g_typeCast["LabelAtlas"] = "cc.LabelAtlas"; + return 1; +} + int lua_cocos2dx_Layer_create(lua_State* tolua_S) { int argc = 0; @@ -51748,4649 +52061,6 @@ int lua_register_cocos2dx_LayerMultiplex(lua_State* tolua_S) return 1; } -int lua_cocos2dx_TransitionEaseScene_easeActionWithAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionEaseScene* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionEaseScene",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionEaseScene*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionEaseScene_easeActionWithAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionInterval* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionEaseScene_easeActionWithAction'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionEaseScene:easeActionWithAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionEaseScene_easeActionWithAction'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_TransitionEaseScene_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionEaseScene)"); - return 0; -} - -int lua_register_cocos2dx_TransitionEaseScene(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionEaseScene"); - tolua_cclass(tolua_S,"TransitionEaseScene","cc.TransitionEaseScene","",nullptr); - - tolua_beginmodule(tolua_S,"TransitionEaseScene"); - tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionEaseScene_easeActionWithAction); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionEaseScene).name(); - g_luaType[typeName] = "cc.TransitionEaseScene"; - g_typeCast["TransitionEaseScene"] = "cc.TransitionEaseScene"; - return 1; -} - -int lua_cocos2dx_TransitionScene_getInScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionScene* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_getInScene'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_getInScene'", nullptr); - return 0; - } - cocos2d::Scene* ret = cobj->getInScene(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:getInScene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_getInScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionScene_finish(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionScene* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_finish'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_finish'", nullptr); - return 0; - } - cobj->finish(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:finish",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_finish'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionScene_initWithDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionScene* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_initWithDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - double arg0; - cocos2d::Scene* arg1; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionScene:initWithDuration"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_initWithDuration'", nullptr); - return 0; - } - bool ret = cobj->initWithDuration(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.TransitionScene:initWithDuration",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_initWithDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionScene_getDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionScene* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_getDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_getDuration'", nullptr); - return 0; - } - double ret = cobj->getDuration(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:getDuration",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_getDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionScene_hideOutShowIn(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionScene* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_hideOutShowIn'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_hideOutShowIn'", nullptr); - return 0; - } - cobj->hideOutShowIn(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:hideOutShowIn",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_hideOutShowIn'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionScene_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.TransitionScene",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_create'", nullptr); - return 0; - } - cocos2d::TransitionScene* ret = cocos2d::TransitionScene::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionScene",(cocos2d::TransitionScene*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionScene:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionScene_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionScene* 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_TransitionScene_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionScene(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionScene"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:TransitionScene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionScene_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionScene)"); - return 0; -} - -int lua_register_cocos2dx_TransitionScene(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionScene"); - tolua_cclass(tolua_S,"TransitionScene","cc.TransitionScene","cc.Scene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionScene"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionScene_constructor); - tolua_function(tolua_S,"getInScene",lua_cocos2dx_TransitionScene_getInScene); - tolua_function(tolua_S,"finish",lua_cocos2dx_TransitionScene_finish); - tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_TransitionScene_initWithDuration); - tolua_function(tolua_S,"getDuration",lua_cocos2dx_TransitionScene_getDuration); - tolua_function(tolua_S,"hideOutShowIn",lua_cocos2dx_TransitionScene_hideOutShowIn); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionScene_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionScene).name(); - g_luaType[typeName] = "cc.TransitionScene"; - g_typeCast["TransitionScene"] = "cc.TransitionScene"; - return 1; -} - -int lua_cocos2dx_TransitionSceneOriented_initWithDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSceneOriented* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionSceneOriented",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionSceneOriented*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSceneOriented_initWithDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - double arg0; - cocos2d::Scene* arg1; - cocos2d::TransitionScene::Orientation arg2; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSceneOriented:initWithDuration"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); - - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionSceneOriented:initWithDuration"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSceneOriented_initWithDuration'", nullptr); - return 0; - } - bool ret = cobj->initWithDuration(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSceneOriented:initWithDuration",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSceneOriented_initWithDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionSceneOriented_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.TransitionSceneOriented",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 3) - { - double arg0; - 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_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionSceneOriented:create"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSceneOriented_create'", nullptr); - return 0; - } - cocos2d::TransitionSceneOriented* ret = cocos2d::TransitionSceneOriented::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.TransitionSceneOriented",(cocos2d::TransitionSceneOriented*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSceneOriented:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSceneOriented_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionSceneOriented_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSceneOriented* 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_TransitionSceneOriented_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionSceneOriented(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSceneOriented"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSceneOriented:TransitionSceneOriented",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSceneOriented_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionSceneOriented_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionSceneOriented)"); - return 0; -} - -int lua_register_cocos2dx_TransitionSceneOriented(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionSceneOriented"); - tolua_cclass(tolua_S,"TransitionSceneOriented","cc.TransitionSceneOriented","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionSceneOriented"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSceneOriented_constructor); - tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_TransitionSceneOriented_initWithDuration); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSceneOriented_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionSceneOriented).name(); - g_luaType[typeName] = "cc.TransitionSceneOriented"; - g_typeCast["TransitionSceneOriented"] = "cc.TransitionSceneOriented"; - return 1; -} - -int lua_cocos2dx_TransitionRotoZoom_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.TransitionRotoZoom",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionRotoZoom_create'", nullptr); - return 0; - } - cocos2d::TransitionRotoZoom* ret = cocos2d::TransitionRotoZoom::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionRotoZoom",(cocos2d::TransitionRotoZoom*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionRotoZoom:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionRotoZoom_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionRotoZoom_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionRotoZoom* 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_TransitionRotoZoom_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionRotoZoom(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionRotoZoom"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionRotoZoom:TransitionRotoZoom",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionRotoZoom_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionRotoZoom_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionRotoZoom)"); - return 0; -} - -int lua_register_cocos2dx_TransitionRotoZoom(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionRotoZoom"); - tolua_cclass(tolua_S,"TransitionRotoZoom","cc.TransitionRotoZoom","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionRotoZoom"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionRotoZoom_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionRotoZoom_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionRotoZoom).name(); - g_luaType[typeName] = "cc.TransitionRotoZoom"; - g_typeCast["TransitionRotoZoom"] = "cc.TransitionRotoZoom"; - return 1; -} - -int lua_cocos2dx_TransitionJumpZoom_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.TransitionJumpZoom",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionJumpZoom_create'", nullptr); - return 0; - } - cocos2d::TransitionJumpZoom* ret = cocos2d::TransitionJumpZoom::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionJumpZoom",(cocos2d::TransitionJumpZoom*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionJumpZoom:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionJumpZoom_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionJumpZoom_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionJumpZoom* 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_TransitionJumpZoom_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionJumpZoom(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionJumpZoom"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionJumpZoom:TransitionJumpZoom",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionJumpZoom_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionJumpZoom_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionJumpZoom)"); - return 0; -} - -int lua_register_cocos2dx_TransitionJumpZoom(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionJumpZoom"); - tolua_cclass(tolua_S,"TransitionJumpZoom","cc.TransitionJumpZoom","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionJumpZoom"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionJumpZoom_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionJumpZoom_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionJumpZoom).name(); - g_luaType[typeName] = "cc.TransitionJumpZoom"; - g_typeCast["TransitionJumpZoom"] = "cc.TransitionJumpZoom"; - return 1; -} - -int lua_cocos2dx_TransitionMoveInL_action(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionMoveInL* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionMoveInL",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionMoveInL*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionMoveInL_action'", 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_TransitionMoveInL_action'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->action(); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInL:action",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInL_action'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionMoveInL_easeActionWithAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionMoveInL* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionMoveInL",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionMoveInL*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionMoveInL_easeActionWithAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionInterval* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInL_easeActionWithAction'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInL:easeActionWithAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInL_easeActionWithAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionMoveInL_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.TransitionMoveInL",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInL_create'", nullptr); - return 0; - } - cocos2d::TransitionMoveInL* ret = cocos2d::TransitionMoveInL::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionMoveInL",(cocos2d::TransitionMoveInL*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionMoveInL:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInL_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionMoveInL_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionMoveInL* 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_TransitionMoveInL_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionMoveInL(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionMoveInL"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInL:TransitionMoveInL",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInL_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionMoveInL_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionMoveInL)"); - return 0; -} - -int lua_register_cocos2dx_TransitionMoveInL(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionMoveInL"); - tolua_cclass(tolua_S,"TransitionMoveInL","cc.TransitionMoveInL","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionMoveInL"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionMoveInL_constructor); - tolua_function(tolua_S,"action",lua_cocos2dx_TransitionMoveInL_action); - tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionMoveInL_easeActionWithAction); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionMoveInL_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionMoveInL).name(); - g_luaType[typeName] = "cc.TransitionMoveInL"; - g_typeCast["TransitionMoveInL"] = "cc.TransitionMoveInL"; - return 1; -} - -int lua_cocos2dx_TransitionMoveInR_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.TransitionMoveInR",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInR_create'", nullptr); - return 0; - } - cocos2d::TransitionMoveInR* ret = cocos2d::TransitionMoveInR::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionMoveInR",(cocos2d::TransitionMoveInR*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionMoveInR:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInR_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionMoveInR_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionMoveInR* 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_TransitionMoveInR_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionMoveInR(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionMoveInR"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInR:TransitionMoveInR",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInR_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionMoveInR_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionMoveInR)"); - return 0; -} - -int lua_register_cocos2dx_TransitionMoveInR(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionMoveInR"); - tolua_cclass(tolua_S,"TransitionMoveInR","cc.TransitionMoveInR","cc.TransitionMoveInL",nullptr); - - tolua_beginmodule(tolua_S,"TransitionMoveInR"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionMoveInR_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionMoveInR_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionMoveInR).name(); - g_luaType[typeName] = "cc.TransitionMoveInR"; - g_typeCast["TransitionMoveInR"] = "cc.TransitionMoveInR"; - return 1; -} - -int lua_cocos2dx_TransitionMoveInT_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.TransitionMoveInT",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInT_create'", nullptr); - return 0; - } - cocos2d::TransitionMoveInT* ret = cocos2d::TransitionMoveInT::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionMoveInT",(cocos2d::TransitionMoveInT*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionMoveInT:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInT_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionMoveInT_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionMoveInT* 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_TransitionMoveInT_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionMoveInT(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionMoveInT"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInT:TransitionMoveInT",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInT_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionMoveInT_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionMoveInT)"); - return 0; -} - -int lua_register_cocos2dx_TransitionMoveInT(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionMoveInT"); - tolua_cclass(tolua_S,"TransitionMoveInT","cc.TransitionMoveInT","cc.TransitionMoveInL",nullptr); - - tolua_beginmodule(tolua_S,"TransitionMoveInT"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionMoveInT_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionMoveInT_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionMoveInT).name(); - g_luaType[typeName] = "cc.TransitionMoveInT"; - g_typeCast["TransitionMoveInT"] = "cc.TransitionMoveInT"; - return 1; -} - -int lua_cocos2dx_TransitionMoveInB_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.TransitionMoveInB",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInB_create'", nullptr); - return 0; - } - cocos2d::TransitionMoveInB* ret = cocos2d::TransitionMoveInB::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionMoveInB",(cocos2d::TransitionMoveInB*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionMoveInB:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInB_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionMoveInB_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionMoveInB* 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_TransitionMoveInB_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionMoveInB(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionMoveInB"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInB:TransitionMoveInB",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInB_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionMoveInB_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionMoveInB)"); - return 0; -} - -int lua_register_cocos2dx_TransitionMoveInB(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionMoveInB"); - tolua_cclass(tolua_S,"TransitionMoveInB","cc.TransitionMoveInB","cc.TransitionMoveInL",nullptr); - - tolua_beginmodule(tolua_S,"TransitionMoveInB"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionMoveInB_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionMoveInB_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionMoveInB).name(); - g_luaType[typeName] = "cc.TransitionMoveInB"; - g_typeCast["TransitionMoveInB"] = "cc.TransitionMoveInB"; - return 1; -} - -int lua_cocos2dx_TransitionSlideInL_action(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSlideInL* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionSlideInL",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionSlideInL*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSlideInL_action'", 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_TransitionSlideInL_action'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->action(); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInL:action",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInL_action'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionSlideInL_easeActionWithAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSlideInL* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionSlideInL",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionSlideInL*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSlideInL_easeActionWithAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionInterval* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInL_easeActionWithAction'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInL:easeActionWithAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInL_easeActionWithAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionSlideInL_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.TransitionSlideInL",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInL_create'", nullptr); - return 0; - } - cocos2d::TransitionSlideInL* ret = cocos2d::TransitionSlideInL::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionSlideInL",(cocos2d::TransitionSlideInL*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSlideInL:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInL_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionSlideInL_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSlideInL* 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_TransitionSlideInL_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionSlideInL(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSlideInL"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInL:TransitionSlideInL",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInL_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionSlideInL_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionSlideInL)"); - return 0; -} - -int lua_register_cocos2dx_TransitionSlideInL(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionSlideInL"); - tolua_cclass(tolua_S,"TransitionSlideInL","cc.TransitionSlideInL","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionSlideInL"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSlideInL_constructor); - tolua_function(tolua_S,"action",lua_cocos2dx_TransitionSlideInL_action); - tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionSlideInL_easeActionWithAction); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSlideInL_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionSlideInL).name(); - g_luaType[typeName] = "cc.TransitionSlideInL"; - g_typeCast["TransitionSlideInL"] = "cc.TransitionSlideInL"; - return 1; -} - -int lua_cocos2dx_TransitionSlideInR_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.TransitionSlideInR",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInR_create'", nullptr); - return 0; - } - cocos2d::TransitionSlideInR* ret = cocos2d::TransitionSlideInR::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionSlideInR",(cocos2d::TransitionSlideInR*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSlideInR:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInR_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionSlideInR_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSlideInR* 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_TransitionSlideInR_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionSlideInR(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSlideInR"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInR:TransitionSlideInR",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInR_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionSlideInR_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionSlideInR)"); - return 0; -} - -int lua_register_cocos2dx_TransitionSlideInR(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionSlideInR"); - tolua_cclass(tolua_S,"TransitionSlideInR","cc.TransitionSlideInR","cc.TransitionSlideInL",nullptr); - - tolua_beginmodule(tolua_S,"TransitionSlideInR"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSlideInR_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSlideInR_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionSlideInR).name(); - g_luaType[typeName] = "cc.TransitionSlideInR"; - g_typeCast["TransitionSlideInR"] = "cc.TransitionSlideInR"; - return 1; -} - -int lua_cocos2dx_TransitionSlideInB_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.TransitionSlideInB",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInB_create'", nullptr); - return 0; - } - cocos2d::TransitionSlideInB* ret = cocos2d::TransitionSlideInB::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionSlideInB",(cocos2d::TransitionSlideInB*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSlideInB:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInB_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionSlideInB_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSlideInB* 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_TransitionSlideInB_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionSlideInB(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSlideInB"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInB:TransitionSlideInB",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInB_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionSlideInB_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionSlideInB)"); - return 0; -} - -int lua_register_cocos2dx_TransitionSlideInB(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionSlideInB"); - tolua_cclass(tolua_S,"TransitionSlideInB","cc.TransitionSlideInB","cc.TransitionSlideInL",nullptr); - - tolua_beginmodule(tolua_S,"TransitionSlideInB"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSlideInB_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSlideInB_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionSlideInB).name(); - g_luaType[typeName] = "cc.TransitionSlideInB"; - g_typeCast["TransitionSlideInB"] = "cc.TransitionSlideInB"; - return 1; -} - -int lua_cocos2dx_TransitionSlideInT_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.TransitionSlideInT",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInT_create'", nullptr); - return 0; - } - cocos2d::TransitionSlideInT* ret = cocos2d::TransitionSlideInT::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionSlideInT",(cocos2d::TransitionSlideInT*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSlideInT:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInT_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionSlideInT_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSlideInT* 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_TransitionSlideInT_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionSlideInT(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSlideInT"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInT:TransitionSlideInT",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInT_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionSlideInT_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionSlideInT)"); - return 0; -} - -int lua_register_cocos2dx_TransitionSlideInT(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionSlideInT"); - tolua_cclass(tolua_S,"TransitionSlideInT","cc.TransitionSlideInT","cc.TransitionSlideInL",nullptr); - - tolua_beginmodule(tolua_S,"TransitionSlideInT"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSlideInT_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSlideInT_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionSlideInT).name(); - g_luaType[typeName] = "cc.TransitionSlideInT"; - g_typeCast["TransitionSlideInT"] = "cc.TransitionSlideInT"; - return 1; -} - -int lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionShrinkGrow* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionShrinkGrow",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionShrinkGrow*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionInterval* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionShrinkGrow:easeActionWithAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionShrinkGrow_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.TransitionShrinkGrow",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionShrinkGrow_create'", nullptr); - return 0; - } - cocos2d::TransitionShrinkGrow* ret = cocos2d::TransitionShrinkGrow::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionShrinkGrow",(cocos2d::TransitionShrinkGrow*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionShrinkGrow:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionShrinkGrow_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionShrinkGrow_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionShrinkGrow* 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_TransitionShrinkGrow_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionShrinkGrow(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionShrinkGrow"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionShrinkGrow:TransitionShrinkGrow",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionShrinkGrow_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionShrinkGrow_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionShrinkGrow)"); - return 0; -} - -int lua_register_cocos2dx_TransitionShrinkGrow(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionShrinkGrow"); - tolua_cclass(tolua_S,"TransitionShrinkGrow","cc.TransitionShrinkGrow","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionShrinkGrow"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionShrinkGrow_constructor); - tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionShrinkGrow_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionShrinkGrow).name(); - g_luaType[typeName] = "cc.TransitionShrinkGrow"; - g_typeCast["TransitionShrinkGrow"] = "cc.TransitionShrinkGrow"; - return 1; -} - -int lua_cocos2dx_TransitionFlipX_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.TransitionFlipX",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionFlipX* ret = cocos2d::TransitionFlipX::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionFlipX",(cocos2d::TransitionFlipX*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionScene::Orientation arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionFlipX:create"); - if (!ok) { break; } - cocos2d::TransitionFlipX* ret = cocos2d::TransitionFlipX::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.TransitionFlipX",(cocos2d::TransitionFlipX*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionFlipX:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipX_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionFlipX_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFlipX* 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_TransitionFlipX_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionFlipX(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFlipX"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFlipX:TransitionFlipX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipX_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionFlipX_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionFlipX)"); - return 0; -} - -int lua_register_cocos2dx_TransitionFlipX(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionFlipX"); - tolua_cclass(tolua_S,"TransitionFlipX","cc.TransitionFlipX","cc.TransitionSceneOriented",nullptr); - - tolua_beginmodule(tolua_S,"TransitionFlipX"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFlipX_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFlipX_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionFlipX).name(); - g_luaType[typeName] = "cc.TransitionFlipX"; - g_typeCast["TransitionFlipX"] = "cc.TransitionFlipX"; - return 1; -} - -int lua_cocos2dx_TransitionFlipY_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.TransitionFlipY",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionFlipY* ret = cocos2d::TransitionFlipY::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionFlipY",(cocos2d::TransitionFlipY*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionScene::Orientation arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionFlipY:create"); - if (!ok) { break; } - cocos2d::TransitionFlipY* ret = cocos2d::TransitionFlipY::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.TransitionFlipY",(cocos2d::TransitionFlipY*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionFlipY:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipY_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionFlipY_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFlipY* 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_TransitionFlipY_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionFlipY(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFlipY"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFlipY:TransitionFlipY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipY_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionFlipY_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionFlipY)"); - return 0; -} - -int lua_register_cocos2dx_TransitionFlipY(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionFlipY"); - tolua_cclass(tolua_S,"TransitionFlipY","cc.TransitionFlipY","cc.TransitionSceneOriented",nullptr); - - tolua_beginmodule(tolua_S,"TransitionFlipY"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFlipY_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFlipY_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionFlipY).name(); - g_luaType[typeName] = "cc.TransitionFlipY"; - g_typeCast["TransitionFlipY"] = "cc.TransitionFlipY"; - return 1; -} - -int lua_cocos2dx_TransitionFlipAngular_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.TransitionFlipAngular",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionFlipAngular* ret = cocos2d::TransitionFlipAngular::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionFlipAngular",(cocos2d::TransitionFlipAngular*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionScene::Orientation arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionFlipAngular:create"); - if (!ok) { break; } - cocos2d::TransitionFlipAngular* ret = cocos2d::TransitionFlipAngular::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.TransitionFlipAngular",(cocos2d::TransitionFlipAngular*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionFlipAngular:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipAngular_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionFlipAngular_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFlipAngular* 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_TransitionFlipAngular_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionFlipAngular(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFlipAngular"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFlipAngular:TransitionFlipAngular",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipAngular_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionFlipAngular_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionFlipAngular)"); - return 0; -} - -int lua_register_cocos2dx_TransitionFlipAngular(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionFlipAngular"); - tolua_cclass(tolua_S,"TransitionFlipAngular","cc.TransitionFlipAngular","cc.TransitionSceneOriented",nullptr); - - tolua_beginmodule(tolua_S,"TransitionFlipAngular"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFlipAngular_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFlipAngular_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionFlipAngular).name(); - g_luaType[typeName] = "cc.TransitionFlipAngular"; - g_typeCast["TransitionFlipAngular"] = "cc.TransitionFlipAngular"; - return 1; -} - -int lua_cocos2dx_TransitionZoomFlipX_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.TransitionZoomFlipX",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionZoomFlipX* ret = cocos2d::TransitionZoomFlipX::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionZoomFlipX",(cocos2d::TransitionZoomFlipX*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionScene::Orientation arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionZoomFlipX:create"); - if (!ok) { break; } - cocos2d::TransitionZoomFlipX* ret = cocos2d::TransitionZoomFlipX::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.TransitionZoomFlipX",(cocos2d::TransitionZoomFlipX*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionZoomFlipX:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipX_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionZoomFlipX_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionZoomFlipX* 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_TransitionZoomFlipX_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionZoomFlipX(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionZoomFlipX"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionZoomFlipX:TransitionZoomFlipX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipX_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionZoomFlipX_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionZoomFlipX)"); - return 0; -} - -int lua_register_cocos2dx_TransitionZoomFlipX(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionZoomFlipX"); - tolua_cclass(tolua_S,"TransitionZoomFlipX","cc.TransitionZoomFlipX","cc.TransitionSceneOriented",nullptr); - - tolua_beginmodule(tolua_S,"TransitionZoomFlipX"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionZoomFlipX_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionZoomFlipX_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionZoomFlipX).name(); - g_luaType[typeName] = "cc.TransitionZoomFlipX"; - g_typeCast["TransitionZoomFlipX"] = "cc.TransitionZoomFlipX"; - return 1; -} - -int lua_cocos2dx_TransitionZoomFlipY_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.TransitionZoomFlipY",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionZoomFlipY* ret = cocos2d::TransitionZoomFlipY::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionZoomFlipY",(cocos2d::TransitionZoomFlipY*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionScene::Orientation arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionZoomFlipY:create"); - if (!ok) { break; } - cocos2d::TransitionZoomFlipY* ret = cocos2d::TransitionZoomFlipY::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.TransitionZoomFlipY",(cocos2d::TransitionZoomFlipY*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionZoomFlipY:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipY_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionZoomFlipY_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionZoomFlipY* 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_TransitionZoomFlipY_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionZoomFlipY(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionZoomFlipY"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionZoomFlipY:TransitionZoomFlipY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipY_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionZoomFlipY_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionZoomFlipY)"); - return 0; -} - -int lua_register_cocos2dx_TransitionZoomFlipY(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionZoomFlipY"); - tolua_cclass(tolua_S,"TransitionZoomFlipY","cc.TransitionZoomFlipY","cc.TransitionSceneOriented",nullptr); - - tolua_beginmodule(tolua_S,"TransitionZoomFlipY"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionZoomFlipY_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionZoomFlipY_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionZoomFlipY).name(); - g_luaType[typeName] = "cc.TransitionZoomFlipY"; - g_typeCast["TransitionZoomFlipY"] = "cc.TransitionZoomFlipY"; - return 1; -} - -int lua_cocos2dx_TransitionZoomFlipAngular_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.TransitionZoomFlipAngular",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionZoomFlipAngular* ret = cocos2d::TransitionZoomFlipAngular::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionZoomFlipAngular",(cocos2d::TransitionZoomFlipAngular*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionScene::Orientation arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionZoomFlipAngular:create"); - if (!ok) { break; } - cocos2d::TransitionZoomFlipAngular* ret = cocos2d::TransitionZoomFlipAngular::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.TransitionZoomFlipAngular",(cocos2d::TransitionZoomFlipAngular*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionZoomFlipAngular:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipAngular_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionZoomFlipAngular_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionZoomFlipAngular* 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_TransitionZoomFlipAngular_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionZoomFlipAngular(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionZoomFlipAngular"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionZoomFlipAngular:TransitionZoomFlipAngular",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipAngular_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionZoomFlipAngular_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionZoomFlipAngular)"); - return 0; -} - -int lua_register_cocos2dx_TransitionZoomFlipAngular(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionZoomFlipAngular"); - tolua_cclass(tolua_S,"TransitionZoomFlipAngular","cc.TransitionZoomFlipAngular","cc.TransitionSceneOriented",nullptr); - - tolua_beginmodule(tolua_S,"TransitionZoomFlipAngular"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionZoomFlipAngular_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionZoomFlipAngular_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionZoomFlipAngular).name(); - g_luaType[typeName] = "cc.TransitionZoomFlipAngular"; - g_typeCast["TransitionZoomFlipAngular"] = "cc.TransitionZoomFlipAngular"; - return 1; -} - -int lua_cocos2dx_TransitionFade_initWithDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFade* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionFade",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::TransitionFade*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionFade_initWithDuration'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFade:initWithDuration"); - - if (!ok) { break; } - cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); - - if (!ok) { break; } - bool ret = cobj->initWithDuration(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFade:initWithDuration"); - - if (!ok) { break; } - cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); - - if (!ok) { break; } - cocos2d::Color3B arg2; - ok &= luaval_to_color3b(tolua_S, 4, &arg2, "cc.TransitionFade:initWithDuration"); - - if (!ok) { break; } - bool ret = cobj->initWithDuration(arg0, arg1, arg2); - 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.TransitionFade:initWithDuration",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFade_initWithDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionFade_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.TransitionFade",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::TransitionFade* ret = cocos2d::TransitionFade::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionFade",(cocos2d::TransitionFade*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - double arg0; - 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); - if (!ok) { break; } - cocos2d::Color3B arg2; - ok &= luaval_to_color3b(tolua_S, 4, &arg2, "cc.TransitionFade:create"); - if (!ok) { break; } - cocos2d::TransitionFade* ret = cocos2d::TransitionFade::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.TransitionFade",(cocos2d::TransitionFade*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionFade:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFade_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionFade_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFade* 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_TransitionFade_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionFade(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFade"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFade:TransitionFade",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFade_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionFade_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionFade)"); - return 0; -} - -int lua_register_cocos2dx_TransitionFade(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionFade"); - tolua_cclass(tolua_S,"TransitionFade","cc.TransitionFade","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionFade"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFade_constructor); - tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_TransitionFade_initWithDuration); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFade_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionFade).name(); - g_luaType[typeName] = "cc.TransitionFade"; - g_typeCast["TransitionFade"] = "cc.TransitionFade"; - return 1; -} - -int lua_cocos2dx_TransitionCrossFade_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.TransitionCrossFade",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionCrossFade_create'", nullptr); - return 0; - } - cocos2d::TransitionCrossFade* ret = cocos2d::TransitionCrossFade::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionCrossFade",(cocos2d::TransitionCrossFade*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionCrossFade:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionCrossFade_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionCrossFade_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionCrossFade* 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_TransitionCrossFade_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionCrossFade(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionCrossFade"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionCrossFade:TransitionCrossFade",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionCrossFade_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionCrossFade_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionCrossFade)"); - return 0; -} - -int lua_register_cocos2dx_TransitionCrossFade(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionCrossFade"); - tolua_cclass(tolua_S,"TransitionCrossFade","cc.TransitionCrossFade","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionCrossFade"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionCrossFade_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionCrossFade_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionCrossFade).name(); - g_luaType[typeName] = "cc.TransitionCrossFade"; - g_typeCast["TransitionCrossFade"] = "cc.TransitionCrossFade"; - return 1; -} - -int lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionTurnOffTiles* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionTurnOffTiles",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionTurnOffTiles*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionInterval* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionTurnOffTiles:easeActionWithAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionTurnOffTiles_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.TransitionTurnOffTiles",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionTurnOffTiles_create'", nullptr); - return 0; - } - cocos2d::TransitionTurnOffTiles* ret = cocos2d::TransitionTurnOffTiles::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionTurnOffTiles",(cocos2d::TransitionTurnOffTiles*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionTurnOffTiles:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionTurnOffTiles_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionTurnOffTiles_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionTurnOffTiles* 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_TransitionTurnOffTiles_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionTurnOffTiles(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionTurnOffTiles"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionTurnOffTiles:TransitionTurnOffTiles",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionTurnOffTiles_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionTurnOffTiles_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionTurnOffTiles)"); - return 0; -} - -int lua_register_cocos2dx_TransitionTurnOffTiles(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionTurnOffTiles"); - tolua_cclass(tolua_S,"TransitionTurnOffTiles","cc.TransitionTurnOffTiles","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionTurnOffTiles"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionTurnOffTiles_constructor); - tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionTurnOffTiles_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionTurnOffTiles).name(); - g_luaType[typeName] = "cc.TransitionTurnOffTiles"; - g_typeCast["TransitionTurnOffTiles"] = "cc.TransitionTurnOffTiles"; - return 1; -} - -int lua_cocos2dx_TransitionSplitCols_action(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSplitCols* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionSplitCols",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionSplitCols*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSplitCols_action'", 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_TransitionSplitCols_action'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->action(); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSplitCols:action",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitCols_action'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionSplitCols_easeActionWithAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSplitCols* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionSplitCols",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionSplitCols*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSplitCols_easeActionWithAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionInterval* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSplitCols_easeActionWithAction'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSplitCols:easeActionWithAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitCols_easeActionWithAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionSplitCols_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.TransitionSplitCols",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSplitCols_create'", nullptr); - return 0; - } - cocos2d::TransitionSplitCols* ret = cocos2d::TransitionSplitCols::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionSplitCols",(cocos2d::TransitionSplitCols*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSplitCols:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitCols_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionSplitCols_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSplitCols* 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_TransitionSplitCols_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionSplitCols(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSplitCols"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSplitCols:TransitionSplitCols",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitCols_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionSplitCols_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionSplitCols)"); - return 0; -} - -int lua_register_cocos2dx_TransitionSplitCols(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionSplitCols"); - tolua_cclass(tolua_S,"TransitionSplitCols","cc.TransitionSplitCols","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionSplitCols"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSplitCols_constructor); - tolua_function(tolua_S,"action",lua_cocos2dx_TransitionSplitCols_action); - tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionSplitCols_easeActionWithAction); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSplitCols_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionSplitCols).name(); - g_luaType[typeName] = "cc.TransitionSplitCols"; - g_typeCast["TransitionSplitCols"] = "cc.TransitionSplitCols"; - return 1; -} - -int lua_cocos2dx_TransitionSplitRows_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.TransitionSplitRows",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSplitRows_create'", nullptr); - return 0; - } - cocos2d::TransitionSplitRows* ret = cocos2d::TransitionSplitRows::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionSplitRows",(cocos2d::TransitionSplitRows*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSplitRows:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitRows_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionSplitRows_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionSplitRows* 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_TransitionSplitRows_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionSplitRows(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSplitRows"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSplitRows:TransitionSplitRows",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitRows_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionSplitRows_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionSplitRows)"); - return 0; -} - -int lua_register_cocos2dx_TransitionSplitRows(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionSplitRows"); - tolua_cclass(tolua_S,"TransitionSplitRows","cc.TransitionSplitRows","cc.TransitionSplitCols",nullptr); - - tolua_beginmodule(tolua_S,"TransitionSplitRows"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSplitRows_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSplitRows_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionSplitRows).name(); - g_luaType[typeName] = "cc.TransitionSplitRows"; - g_typeCast["TransitionSplitRows"] = "cc.TransitionSplitRows"; - return 1; -} - -int lua_cocos2dx_TransitionFadeTR_easeActionWithAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFadeTR* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionFadeTR",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionFadeTR*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionFadeTR_easeActionWithAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionInterval* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeTR_easeActionWithAction'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeTR:easeActionWithAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeTR_easeActionWithAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionFadeTR_actionWithSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFadeTR* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionFadeTR",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionFadeTR*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionFadeTR_actionWithSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Size arg0; - - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TransitionFadeTR:actionWithSize"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeTR_actionWithSize'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->actionWithSize(arg0); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeTR:actionWithSize",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeTR_actionWithSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionFadeTR_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.TransitionFadeTR",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeTR_create'", nullptr); - return 0; - } - cocos2d::TransitionFadeTR* ret = cocos2d::TransitionFadeTR::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionFadeTR",(cocos2d::TransitionFadeTR*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionFadeTR:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeTR_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionFadeTR_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFadeTR* 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_TransitionFadeTR_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionFadeTR(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFadeTR"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeTR:TransitionFadeTR",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeTR_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionFadeTR_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionFadeTR)"); - return 0; -} - -int lua_register_cocos2dx_TransitionFadeTR(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionFadeTR"); - tolua_cclass(tolua_S,"TransitionFadeTR","cc.TransitionFadeTR","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionFadeTR"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFadeTR_constructor); - tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionFadeTR_easeActionWithAction); - tolua_function(tolua_S,"actionWithSize",lua_cocos2dx_TransitionFadeTR_actionWithSize); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFadeTR_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionFadeTR).name(); - g_luaType[typeName] = "cc.TransitionFadeTR"; - g_typeCast["TransitionFadeTR"] = "cc.TransitionFadeTR"; - return 1; -} - -int lua_cocos2dx_TransitionFadeBL_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.TransitionFadeBL",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeBL_create'", nullptr); - return 0; - } - cocos2d::TransitionFadeBL* ret = cocos2d::TransitionFadeBL::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionFadeBL",(cocos2d::TransitionFadeBL*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionFadeBL:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeBL_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionFadeBL_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFadeBL* 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_TransitionFadeBL_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionFadeBL(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFadeBL"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeBL:TransitionFadeBL",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeBL_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionFadeBL_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionFadeBL)"); - return 0; -} - -int lua_register_cocos2dx_TransitionFadeBL(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionFadeBL"); - tolua_cclass(tolua_S,"TransitionFadeBL","cc.TransitionFadeBL","cc.TransitionFadeTR",nullptr); - - tolua_beginmodule(tolua_S,"TransitionFadeBL"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFadeBL_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFadeBL_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionFadeBL).name(); - g_luaType[typeName] = "cc.TransitionFadeBL"; - g_typeCast["TransitionFadeBL"] = "cc.TransitionFadeBL"; - return 1; -} - -int lua_cocos2dx_TransitionFadeUp_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.TransitionFadeUp",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeUp_create'", nullptr); - return 0; - } - cocos2d::TransitionFadeUp* ret = cocos2d::TransitionFadeUp::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionFadeUp",(cocos2d::TransitionFadeUp*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionFadeUp:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeUp_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionFadeUp_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFadeUp* 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_TransitionFadeUp_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionFadeUp(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFadeUp"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeUp:TransitionFadeUp",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeUp_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionFadeUp_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionFadeUp)"); - return 0; -} - -int lua_register_cocos2dx_TransitionFadeUp(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionFadeUp"); - tolua_cclass(tolua_S,"TransitionFadeUp","cc.TransitionFadeUp","cc.TransitionFadeTR",nullptr); - - tolua_beginmodule(tolua_S,"TransitionFadeUp"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFadeUp_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFadeUp_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionFadeUp).name(); - g_luaType[typeName] = "cc.TransitionFadeUp"; - g_typeCast["TransitionFadeUp"] = "cc.TransitionFadeUp"; - return 1; -} - -int lua_cocos2dx_TransitionFadeDown_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.TransitionFadeDown",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeDown_create'", nullptr); - return 0; - } - cocos2d::TransitionFadeDown* ret = cocos2d::TransitionFadeDown::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionFadeDown",(cocos2d::TransitionFadeDown*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionFadeDown:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeDown_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionFadeDown_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionFadeDown* 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_TransitionFadeDown_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionFadeDown(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFadeDown"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeDown:TransitionFadeDown",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeDown_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionFadeDown_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionFadeDown)"); - return 0; -} - -int lua_register_cocos2dx_TransitionFadeDown(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionFadeDown"); - tolua_cclass(tolua_S,"TransitionFadeDown","cc.TransitionFadeDown","cc.TransitionFadeTR",nullptr); - - tolua_beginmodule(tolua_S,"TransitionFadeDown"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFadeDown_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFadeDown_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionFadeDown).name(); - g_luaType[typeName] = "cc.TransitionFadeDown"; - g_typeCast["TransitionFadeDown"] = "cc.TransitionFadeDown"; - return 1; -} - -int lua_cocos2dx_TransitionPageTurn_actionWithSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionPageTurn* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionPageTurn",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionPageTurn*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionPageTurn_actionWithSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Size arg0; - - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TransitionPageTurn:actionWithSize"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionPageTurn_actionWithSize'", nullptr); - return 0; - } - cocos2d::ActionInterval* ret = cobj->actionWithSize(arg0); - object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionPageTurn:actionWithSize",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionPageTurn_actionWithSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionPageTurn_initWithDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionPageTurn* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.TransitionPageTurn",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::TransitionPageTurn*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionPageTurn_initWithDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - double arg0; - cocos2d::Scene* arg1; - bool arg2; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionPageTurn:initWithDuration"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); - - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.TransitionPageTurn:initWithDuration"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionPageTurn_initWithDuration'", nullptr); - return 0; - } - bool ret = cobj->initWithDuration(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionPageTurn:initWithDuration",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionPageTurn_initWithDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_TransitionPageTurn_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.TransitionPageTurn",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 3) - { - double arg0; - 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_boolean(tolua_S, 4,&arg2, "cc.TransitionPageTurn:create"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionPageTurn_create'", nullptr); - return 0; - } - cocos2d::TransitionPageTurn* ret = cocos2d::TransitionPageTurn::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.TransitionPageTurn",(cocos2d::TransitionPageTurn*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionPageTurn:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionPageTurn_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionPageTurn_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionPageTurn* 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_TransitionPageTurn_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionPageTurn(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionPageTurn"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionPageTurn:TransitionPageTurn",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionPageTurn_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionPageTurn_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionPageTurn)"); - return 0; -} - -int lua_register_cocos2dx_TransitionPageTurn(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionPageTurn"); - tolua_cclass(tolua_S,"TransitionPageTurn","cc.TransitionPageTurn","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionPageTurn"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionPageTurn_constructor); - tolua_function(tolua_S,"actionWithSize",lua_cocos2dx_TransitionPageTurn_actionWithSize); - tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_TransitionPageTurn_initWithDuration); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionPageTurn_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionPageTurn).name(); - g_luaType[typeName] = "cc.TransitionPageTurn"; - g_typeCast["TransitionPageTurn"] = "cc.TransitionPageTurn"; - return 1; -} - -int lua_cocos2dx_TransitionProgress_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.TransitionProgress",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgress_create'", nullptr); - return 0; - } - cocos2d::TransitionProgress* ret = cocos2d::TransitionProgress::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionProgress",(cocos2d::TransitionProgress*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgress:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgress_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionProgress_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionProgress* 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_TransitionProgress_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionProgress(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgress"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgress:TransitionProgress",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgress_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionProgress_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionProgress)"); - return 0; -} - -int lua_register_cocos2dx_TransitionProgress(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionProgress"); - tolua_cclass(tolua_S,"TransitionProgress","cc.TransitionProgress","cc.TransitionScene",nullptr); - - tolua_beginmodule(tolua_S,"TransitionProgress"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgress_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgress_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionProgress).name(); - g_luaType[typeName] = "cc.TransitionProgress"; - g_typeCast["TransitionProgress"] = "cc.TransitionProgress"; - return 1; -} - -int lua_cocos2dx_TransitionProgressRadialCCW_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.TransitionProgressRadialCCW",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressRadialCCW_create'", nullptr); - return 0; - } - cocos2d::TransitionProgressRadialCCW* ret = cocos2d::TransitionProgressRadialCCW::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionProgressRadialCCW",(cocos2d::TransitionProgressRadialCCW*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressRadialCCW:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressRadialCCW_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionProgressRadialCCW_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionProgressRadialCCW* 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_TransitionProgressRadialCCW_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionProgressRadialCCW(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressRadialCCW"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressRadialCCW:TransitionProgressRadialCCW",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressRadialCCW_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionProgressRadialCCW_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionProgressRadialCCW)"); - return 0; -} - -int lua_register_cocos2dx_TransitionProgressRadialCCW(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionProgressRadialCCW"); - tolua_cclass(tolua_S,"TransitionProgressRadialCCW","cc.TransitionProgressRadialCCW","cc.TransitionProgress",nullptr); - - tolua_beginmodule(tolua_S,"TransitionProgressRadialCCW"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressRadialCCW_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressRadialCCW_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionProgressRadialCCW).name(); - g_luaType[typeName] = "cc.TransitionProgressRadialCCW"; - g_typeCast["TransitionProgressRadialCCW"] = "cc.TransitionProgressRadialCCW"; - return 1; -} - -int lua_cocos2dx_TransitionProgressRadialCW_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.TransitionProgressRadialCW",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressRadialCW_create'", nullptr); - return 0; - } - cocos2d::TransitionProgressRadialCW* ret = cocos2d::TransitionProgressRadialCW::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionProgressRadialCW",(cocos2d::TransitionProgressRadialCW*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressRadialCW:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressRadialCW_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionProgressRadialCW_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionProgressRadialCW* 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_TransitionProgressRadialCW_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionProgressRadialCW(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressRadialCW"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressRadialCW:TransitionProgressRadialCW",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressRadialCW_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionProgressRadialCW_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionProgressRadialCW)"); - return 0; -} - -int lua_register_cocos2dx_TransitionProgressRadialCW(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionProgressRadialCW"); - tolua_cclass(tolua_S,"TransitionProgressRadialCW","cc.TransitionProgressRadialCW","cc.TransitionProgress",nullptr); - - tolua_beginmodule(tolua_S,"TransitionProgressRadialCW"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressRadialCW_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressRadialCW_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionProgressRadialCW).name(); - g_luaType[typeName] = "cc.TransitionProgressRadialCW"; - g_typeCast["TransitionProgressRadialCW"] = "cc.TransitionProgressRadialCW"; - return 1; -} - -int lua_cocos2dx_TransitionProgressHorizontal_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.TransitionProgressHorizontal",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressHorizontal_create'", nullptr); - return 0; - } - cocos2d::TransitionProgressHorizontal* ret = cocos2d::TransitionProgressHorizontal::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionProgressHorizontal",(cocos2d::TransitionProgressHorizontal*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressHorizontal:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressHorizontal_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionProgressHorizontal_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionProgressHorizontal* 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_TransitionProgressHorizontal_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionProgressHorizontal(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressHorizontal"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressHorizontal:TransitionProgressHorizontal",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressHorizontal_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionProgressHorizontal_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionProgressHorizontal)"); - return 0; -} - -int lua_register_cocos2dx_TransitionProgressHorizontal(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionProgressHorizontal"); - tolua_cclass(tolua_S,"TransitionProgressHorizontal","cc.TransitionProgressHorizontal","cc.TransitionProgress",nullptr); - - tolua_beginmodule(tolua_S,"TransitionProgressHorizontal"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressHorizontal_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressHorizontal_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionProgressHorizontal).name(); - g_luaType[typeName] = "cc.TransitionProgressHorizontal"; - g_typeCast["TransitionProgressHorizontal"] = "cc.TransitionProgressHorizontal"; - return 1; -} - -int lua_cocos2dx_TransitionProgressVertical_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.TransitionProgressVertical",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressVertical_create'", nullptr); - return 0; - } - cocos2d::TransitionProgressVertical* ret = cocos2d::TransitionProgressVertical::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionProgressVertical",(cocos2d::TransitionProgressVertical*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressVertical:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressVertical_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionProgressVertical_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionProgressVertical* 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_TransitionProgressVertical_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionProgressVertical(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressVertical"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressVertical:TransitionProgressVertical",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressVertical_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionProgressVertical_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionProgressVertical)"); - return 0; -} - -int lua_register_cocos2dx_TransitionProgressVertical(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionProgressVertical"); - tolua_cclass(tolua_S,"TransitionProgressVertical","cc.TransitionProgressVertical","cc.TransitionProgress",nullptr); - - tolua_beginmodule(tolua_S,"TransitionProgressVertical"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressVertical_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressVertical_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionProgressVertical).name(); - g_luaType[typeName] = "cc.TransitionProgressVertical"; - g_typeCast["TransitionProgressVertical"] = "cc.TransitionProgressVertical"; - return 1; -} - -int lua_cocos2dx_TransitionProgressInOut_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.TransitionProgressInOut",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressInOut_create'", nullptr); - return 0; - } - cocos2d::TransitionProgressInOut* ret = cocos2d::TransitionProgressInOut::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionProgressInOut",(cocos2d::TransitionProgressInOut*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressInOut:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressInOut_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionProgressInOut_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionProgressInOut* 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_TransitionProgressInOut_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionProgressInOut(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressInOut"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressInOut:TransitionProgressInOut",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressInOut_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionProgressInOut_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionProgressInOut)"); - return 0; -} - -int lua_register_cocos2dx_TransitionProgressInOut(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionProgressInOut"); - tolua_cclass(tolua_S,"TransitionProgressInOut","cc.TransitionProgressInOut","cc.TransitionProgress",nullptr); - - tolua_beginmodule(tolua_S,"TransitionProgressInOut"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressInOut_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressInOut_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionProgressInOut).name(); - g_luaType[typeName] = "cc.TransitionProgressInOut"; - g_typeCast["TransitionProgressInOut"] = "cc.TransitionProgressInOut"; - return 1; -} - -int lua_cocos2dx_TransitionProgressOutIn_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.TransitionProgressOutIn",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - 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); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressOutIn_create'", nullptr); - return 0; - } - cocos2d::TransitionProgressOutIn* ret = cocos2d::TransitionProgressOutIn::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.TransitionProgressOutIn",(cocos2d::TransitionProgressOutIn*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressOutIn:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressOutIn_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_TransitionProgressOutIn_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TransitionProgressOutIn* 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_TransitionProgressOutIn_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TransitionProgressOutIn(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressOutIn"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressOutIn:TransitionProgressOutIn",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressOutIn_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TransitionProgressOutIn_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TransitionProgressOutIn)"); - return 0; -} - -int lua_register_cocos2dx_TransitionProgressOutIn(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TransitionProgressOutIn"); - tolua_cclass(tolua_S,"TransitionProgressOutIn","cc.TransitionProgressOutIn","cc.TransitionProgress",nullptr); - - tolua_beginmodule(tolua_S,"TransitionProgressOutIn"); - tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressOutIn_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressOutIn_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TransitionProgressOutIn).name(); - g_luaType[typeName] = "cc.TransitionProgressOutIn"; - g_typeCast["TransitionProgressOutIn"] = "cc.TransitionProgressOutIn"; - return 1; -} - int lua_cocos2dx_MenuItem_setEnabled(lua_State* tolua_S) { int argc = 0; @@ -59384,730 +55054,6 @@ int lua_register_cocos2dx_Menu(lua_State* tolua_S) return 1; } -int lua_cocos2dx_ClippingNode_hasContent(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_hasContent'", 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_ClippingNode_hasContent'", nullptr); - return 0; - } - bool ret = cobj->hasContent(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:hasContent",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_hasContent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingNode_setInverted(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_setInverted'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ClippingNode:setInverted"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_setInverted'", nullptr); - return 0; - } - cobj->setInverted(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:setInverted",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_setInverted'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingNode_setStencil(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_setStencil'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_setStencil'", nullptr); - return 0; - } - cobj->setStencil(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:setStencil",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_setStencil'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingNode_getAlphaThreshold(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_getAlphaThreshold'", 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_ClippingNode_getAlphaThreshold'", nullptr); - return 0; - } - double ret = cobj->getAlphaThreshold(); - 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.ClippingNode:getAlphaThreshold",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_getAlphaThreshold'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingNode_init(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_init'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_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.ClippingNode:init",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_init'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingNode_getStencil(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_getStencil'", 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_ClippingNode_getStencil'", nullptr); - return 0; - } - cocos2d::Node* ret = cobj->getStencil(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:getStencil",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_getStencil'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingNode_setAlphaThreshold(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_setAlphaThreshold'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ClippingNode:setAlphaThreshold"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_setAlphaThreshold'", nullptr); - return 0; - } - cobj->setAlphaThreshold(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:setAlphaThreshold",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_setAlphaThreshold'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingNode_isInverted(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingNode_isInverted'", 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_ClippingNode_isInverted'", nullptr); - return 0; - } - bool ret = cobj->isInverted(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingNode:isInverted",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_isInverted'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingNode_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.ClippingNode",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 1) - { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if (!ok) { break; } - cocos2d::ClippingNode* ret = cocos2d::ClippingNode::create(arg0); - object_to_luaval(tolua_S, "cc.ClippingNode",(cocos2d::ClippingNode*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 0) - { - cocos2d::ClippingNode* ret = cocos2d::ClippingNode::create(); - object_to_luaval(tolua_S, "cc.ClippingNode",(cocos2d::ClippingNode*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.ClippingNode:create",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingNode_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_ClippingNode_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (ClippingNode)"); - return 0; -} - -int lua_register_cocos2dx_ClippingNode(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.ClippingNode"); - tolua_cclass(tolua_S,"ClippingNode","cc.ClippingNode","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"ClippingNode"); - tolua_function(tolua_S,"hasContent",lua_cocos2dx_ClippingNode_hasContent); - tolua_function(tolua_S,"setInverted",lua_cocos2dx_ClippingNode_setInverted); - tolua_function(tolua_S,"setStencil",lua_cocos2dx_ClippingNode_setStencil); - tolua_function(tolua_S,"getAlphaThreshold",lua_cocos2dx_ClippingNode_getAlphaThreshold); - tolua_function(tolua_S,"init",lua_cocos2dx_ClippingNode_init); - tolua_function(tolua_S,"getStencil",lua_cocos2dx_ClippingNode_getStencil); - tolua_function(tolua_S,"setAlphaThreshold",lua_cocos2dx_ClippingNode_setAlphaThreshold); - tolua_function(tolua_S,"isInverted",lua_cocos2dx_ClippingNode_isInverted); - tolua_function(tolua_S,"create", lua_cocos2dx_ClippingNode_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::ClippingNode).name(); - g_luaType[typeName] = "cc.ClippingNode"; - g_typeCast["ClippingNode"] = "cc.ClippingNode"; - return 1; -} - -int lua_cocos2dx_ClippingRectangleNode_isClippingEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingRectangleNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_isClippingEnabled'", 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_ClippingRectangleNode_isClippingEnabled'", nullptr); - return 0; - } - const bool ret = cobj->isClippingEnabled(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:isClippingEnabled",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_isClippingEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingRectangleNode_setClippingEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingRectangleNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_setClippingEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ClippingRectangleNode:setClippingEnabled"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingRectangleNode_setClippingEnabled'", nullptr); - return 0; - } - cobj->setClippingEnabled(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:setClippingEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_setClippingEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingRectangleNode_getClippingRegion(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingRectangleNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_getClippingRegion'", 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_ClippingRectangleNode_getClippingRegion'", nullptr); - return 0; - } - const cocos2d::Rect& ret = cobj->getClippingRegion(); - rect_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:getClippingRegion",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_getClippingRegion'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingRectangleNode_setClippingRegion(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ClippingRectangleNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_setClippingRegion'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Rect arg0; - - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.ClippingRectangleNode:setClippingRegion"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingRectangleNode_setClippingRegion'", nullptr); - return 0; - } - cobj->setClippingRegion(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:setClippingRegion",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_setClippingRegion'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ClippingRectangleNode_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.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 0) - { - cocos2d::ClippingRectangleNode* ret = cocos2d::ClippingRectangleNode::create(); - object_to_luaval(tolua_S, "cc.ClippingRectangleNode",(cocos2d::ClippingRectangleNode*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - cocos2d::Rect arg0; - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.ClippingRectangleNode:create"); - if (!ok) { break; } - cocos2d::ClippingRectangleNode* ret = cocos2d::ClippingRectangleNode::create(arg0); - object_to_luaval(tolua_S, "cc.ClippingRectangleNode",(cocos2d::ClippingRectangleNode*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.ClippingRectangleNode:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_ClippingRectangleNode_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (ClippingRectangleNode)"); - return 0; -} - -int lua_register_cocos2dx_ClippingRectangleNode(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.ClippingRectangleNode"); - tolua_cclass(tolua_S,"ClippingRectangleNode","cc.ClippingRectangleNode","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"ClippingRectangleNode"); - tolua_function(tolua_S,"isClippingEnabled",lua_cocos2dx_ClippingRectangleNode_isClippingEnabled); - tolua_function(tolua_S,"setClippingEnabled",lua_cocos2dx_ClippingRectangleNode_setClippingEnabled); - tolua_function(tolua_S,"getClippingRegion",lua_cocos2dx_ClippingRectangleNode_getClippingRegion); - tolua_function(tolua_S,"setClippingRegion",lua_cocos2dx_ClippingRectangleNode_setClippingRegion); - tolua_function(tolua_S,"create", lua_cocos2dx_ClippingRectangleNode_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::ClippingRectangleNode).name(); - g_luaType[typeName] = "cc.ClippingRectangleNode"; - g_typeCast["ClippingRectangleNode"] = "cc.ClippingRectangleNode"; - return 1; -} - int lua_cocos2dx_MotionStreak_reset(lua_State* tolua_S) { int argc = 0; @@ -60920,4764 +55866,6 @@ int lua_register_cocos2dx_MotionStreak(lua_State* tolua_S) return 1; } -int lua_cocos2dx_ProgressTimer_initWithSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_initWithSprite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Sprite* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_initWithSprite'", nullptr); - return 0; - } - bool ret = cobj->initWithSprite(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.ProgressTimer:initWithSprite",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_initWithSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_isReverseDirection(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'", 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_ProgressTimer_isReverseDirection'", nullptr); - return 0; - } - bool ret = cobj->isReverseDirection(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:isReverseDirection",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setBarChangeRate(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setBarChangeRate"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'", nullptr); - return 0; - } - cobj->setBarChangeRate(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setBarChangeRate",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getPercentage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getPercentage'", 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_ProgressTimer_getPercentage'", nullptr); - return 0; - } - double ret = cobj->getPercentage(); - 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.ProgressTimer:getPercentage",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getPercentage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setSprite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Sprite* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setSprite'", nullptr); - return 0; - } - cobj->setSprite(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setSprite",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_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_ProgressTimer_getType'", nullptr); - return 0; - } - int ret = (int)cobj->getType(); - 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.ProgressTimer:getType",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getSprite'", 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_ProgressTimer_getSprite'", nullptr); - return 0; - } - cocos2d::Sprite* ret = cobj->getSprite(); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getSprite",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setMidpoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setMidpoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setMidpoint"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setMidpoint'", nullptr); - return 0; - } - cobj->setMidpoint(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setMidpoint",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setMidpoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getBarChangeRate(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'", 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_ProgressTimer_getBarChangeRate'", nullptr); - return 0; - } - cocos2d::Vec2 ret = cobj->getBarChangeRate(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getBarChangeRate",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setReverseDirection(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); - - if (!ok) { break; } - cobj->setReverseDirection(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); - - if (!ok) { break; } - cobj->setReverseProgress(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.ProgressTimer:setReverseProgress",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getMidpoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getMidpoint'", 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_ProgressTimer_getMidpoint'", nullptr); - return 0; - } - cocos2d::Vec2 ret = cobj->getMidpoint(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getMidpoint",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getMidpoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setPercentage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setPercentage'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ProgressTimer:setPercentage"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setPercentage'", nullptr); - return 0; - } - cobj->setPercentage(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setPercentage",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setPercentage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setType'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ProgressTimer::Type arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProgressTimer:setType"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setType'", nullptr); - return 0; - } - cobj->setType(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setType",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_create'", nullptr); - return 0; - } - cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); - object_to_luaval(tolua_S, "cc.ProgressTimer",(cocos2d::ProgressTimer*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProgressTimer:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_ProgressTimer_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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_ProgressTimer_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::ProgressTimer(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ProgressTimer"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:ProgressTimer",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_ProgressTimer_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (ProgressTimer)"); - return 0; -} - -int lua_register_cocos2dx_ProgressTimer(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.ProgressTimer"); - tolua_cclass(tolua_S,"ProgressTimer","cc.ProgressTimer","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"ProgressTimer"); - tolua_function(tolua_S,"new",lua_cocos2dx_ProgressTimer_constructor); - tolua_function(tolua_S,"initWithSprite",lua_cocos2dx_ProgressTimer_initWithSprite); - tolua_function(tolua_S,"isReverseDirection",lua_cocos2dx_ProgressTimer_isReverseDirection); - tolua_function(tolua_S,"setBarChangeRate",lua_cocos2dx_ProgressTimer_setBarChangeRate); - tolua_function(tolua_S,"getPercentage",lua_cocos2dx_ProgressTimer_getPercentage); - tolua_function(tolua_S,"setSprite",lua_cocos2dx_ProgressTimer_setSprite); - tolua_function(tolua_S,"getType",lua_cocos2dx_ProgressTimer_getType); - tolua_function(tolua_S,"getSprite",lua_cocos2dx_ProgressTimer_getSprite); - tolua_function(tolua_S,"setMidpoint",lua_cocos2dx_ProgressTimer_setMidpoint); - tolua_function(tolua_S,"getBarChangeRate",lua_cocos2dx_ProgressTimer_getBarChangeRate); - tolua_function(tolua_S,"setReverseDirection",lua_cocos2dx_ProgressTimer_setReverseDirection); - tolua_function(tolua_S,"getMidpoint",lua_cocos2dx_ProgressTimer_getMidpoint); - tolua_function(tolua_S,"setPercentage",lua_cocos2dx_ProgressTimer_setPercentage); - tolua_function(tolua_S,"setType",lua_cocos2dx_ProgressTimer_setType); - tolua_function(tolua_S,"create", lua_cocos2dx_ProgressTimer_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::ProgressTimer).name(); - g_luaType[typeName] = "cc.ProgressTimer"; - g_typeCast["ProgressTimer"] = "cc.ProgressTimer"; - return 1; -} - -int lua_cocos2dx_Sprite_setSpriteFrame(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setSpriteFrame'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); - - if (!ok) { break; } - cobj->setSpriteFrame(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:setSpriteFrame"); - - if (!ok) { break; } - cobj->setSpriteFrame(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.Sprite:setSpriteFrame",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setSpriteFrame'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - cobj->setTexture(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:setTexture"); - - if (!ok) { break; } - cobj->setTexture(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.Sprite:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_getTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_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_Sprite_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.Sprite:getTexture",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setFlippedY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setFlippedY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite:setFlippedY"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setFlippedY'", nullptr); - return 0; - } - cobj->setFlippedY(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setFlippedY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setFlippedY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setFlippedX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setFlippedX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite:setFlippedX"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setFlippedX'", nullptr); - return 0; - } - cobj->setFlippedX(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setFlippedX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setFlippedX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_initWithTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_initWithTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:initWithTexture"); - - if (!ok) { break; } - bool ret = cobj->initWithTexture(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - bool ret = cobj->initWithTexture(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:initWithTexture"); - - if (!ok) { break; } - bool arg2; - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Sprite:initWithTexture"); - - if (!ok) { break; } - bool ret = cobj->initWithTexture(arg0, arg1, arg2); - 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.Sprite:initWithTexture",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_initWithTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_getBatchNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getBatchNode'", 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_Sprite_getBatchNode'", nullptr); - return 0; - } - cocos2d::SpriteBatchNode* ret = cobj->getBatchNode(); - object_to_luaval(tolua_S, "cc.SpriteBatchNode",(cocos2d::SpriteBatchNode*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getBatchNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getBatchNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_getOffsetPosition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getOffsetPosition'", 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_Sprite_getOffsetPosition'", nullptr); - return 0; - } - const cocos2d::Vec2& ret = cobj->getOffsetPosition(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getOffsetPosition",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getOffsetPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_removeAllChildrenWithCleanup(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_removeAllChildrenWithCleanup'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite:removeAllChildrenWithCleanup"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_removeAllChildrenWithCleanup'", nullptr); - return 0; - } - cobj->removeAllChildrenWithCleanup(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:removeAllChildrenWithCleanup",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_removeAllChildrenWithCleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setTextureRect(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setTextureRect'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 3) { - cocos2d::Rect arg0; - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Sprite:setTextureRect"); - - if (!ok) { break; } - bool arg1; - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Sprite:setTextureRect"); - - if (!ok) { break; } - cocos2d::Size arg2; - ok &= luaval_to_size(tolua_S, 4, &arg2, "cc.Sprite:setTextureRect"); - - if (!ok) { break; } - cobj->setTextureRect(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Rect arg0; - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Sprite:setTextureRect"); - - if (!ok) { break; } - cobj->setTextureRect(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.Sprite:setTextureRect",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setTextureRect'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_initWithSpriteFrameName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_initWithSpriteFrameName'", 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.Sprite:initWithSpriteFrameName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_initWithSpriteFrameName'", nullptr); - return 0; - } - bool ret = cobj->initWithSpriteFrameName(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.Sprite:initWithSpriteFrameName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_initWithSpriteFrameName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_isFrameDisplayed(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isFrameDisplayed'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::SpriteFrame* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_isFrameDisplayed'", nullptr); - return 0; - } - bool ret = cobj->isFrameDisplayed(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.Sprite:isFrameDisplayed",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isFrameDisplayed'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_getAtlasIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getAtlasIndex'", 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_Sprite_getAtlasIndex'", nullptr); - return 0; - } - ssize_t ret = cobj->getAtlasIndex(); - 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.Sprite:getAtlasIndex",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getAtlasIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setBatchNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setBatchNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::SpriteBatchNode* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteBatchNode",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setBatchNode'", nullptr); - return 0; - } - cobj->setBatchNode(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setBatchNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setBatchNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getBlendFunc'", 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_Sprite_getBlendFunc'", nullptr); - return 0; - } - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - std::string arg0; - ssize_t arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:setDisplayFrameWithAnimationName"); - - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.Sprite:setDisplayFrameWithAnimationName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName'", nullptr); - return 0; - } - cobj->setDisplayFrameWithAnimationName(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.Sprite:setDisplayFrameWithAnimationName",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setTextureAtlas(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setTextureAtlas'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::TextureAtlas* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setTextureAtlas'", nullptr); - return 0; - } - cobj->setTextureAtlas(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setTextureAtlas",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setTextureAtlas'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_getSpriteFrame(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getSpriteFrame'", 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_Sprite_getSpriteFrame'", nullptr); - return 0; - } - cocos2d::SpriteFrame* ret = cobj->getSpriteFrame(); - object_to_luaval(tolua_S, "cc.SpriteFrame",(cocos2d::SpriteFrame*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getSpriteFrame",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getSpriteFrame'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_isDirty(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isDirty'", 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_Sprite_isDirty'", nullptr); - return 0; - } - bool ret = cobj->isDirty(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:isDirty",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isDirty'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setAtlasIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setAtlasIndex'", 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.Sprite:setAtlasIndex"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setAtlasIndex'", nullptr); - return 0; - } - cobj->setAtlasIndex(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setAtlasIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setAtlasIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setDirty(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setDirty'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite:setDirty"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setDirty'", nullptr); - return 0; - } - cobj->setDirty(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setDirty",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setDirty'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_isTextureRectRotated(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isTextureRectRotated'", 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_Sprite_isTextureRectRotated'", nullptr); - return 0; - } - bool ret = cobj->isTextureRectRotated(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:isTextureRectRotated",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isTextureRectRotated'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_getTextureRect(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getTextureRect'", 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_Sprite_getTextureRect'", nullptr); - return 0; - } - const cocos2d::Rect& ret = cobj->getTextureRect(); - rect_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getTextureRect",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getTextureRect'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_initWithFile(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_initWithFile'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:initWithFile"); - - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:initWithFile"); - - if (!ok) { break; } - bool ret = cobj->initWithFile(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:initWithFile"); - - if (!ok) { break; } - bool ret = cobj->initWithFile(arg0); - 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.Sprite:initWithFile",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_initWithFile'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::BlendFunc arg0; - - ok &= luaval_to_blendfunc(tolua_S, 2, &arg0, "cc.Sprite:setBlendFunc"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setBlendFunc'", nullptr); - return 0; - } - cobj->setBlendFunc(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setBlendFunc",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_getTextureAtlas(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getTextureAtlas'", 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_Sprite_getTextureAtlas'", nullptr); - return 0; - } - cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); - object_to_luaval(tolua_S, "cc.TextureAtlas",(cocos2d::TextureAtlas*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getTextureAtlas",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getTextureAtlas'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_initWithSpriteFrame(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_initWithSpriteFrame'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::SpriteFrame* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_initWithSpriteFrame'", nullptr); - return 0; - } - bool ret = cobj->initWithSpriteFrame(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.Sprite:initWithSpriteFrame",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_initWithSpriteFrame'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_isFlippedX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isFlippedX'", 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_Sprite_isFlippedX'", nullptr); - return 0; - } - bool ret = cobj->isFlippedX(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:isFlippedX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isFlippedX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_isFlippedY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isFlippedY'", 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_Sprite_isFlippedY'", nullptr); - return 0; - } - bool ret = cobj->isFlippedY(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:isFlippedY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isFlippedY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_setVertexRect(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setVertexRect'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Rect arg0; - - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Sprite:setVertexRect"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setVertexRect'", nullptr); - return 0; - } - cobj->setVertexRect(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setVertexRect",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setVertexRect'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Sprite_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.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:create"); - if (!ok) { break; } - cocos2d::Sprite* ret = cocos2d::Sprite::create(arg0); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 0) - { - cocos2d::Sprite* ret = cocos2d::Sprite::create(); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:create"); - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:create"); - if (!ok) { break; } - cocos2d::Sprite* ret = cocos2d::Sprite::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Sprite_createWithTexture(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.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:createWithTexture"); - if (!ok) { break; } - cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0, arg1); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:createWithTexture"); - if (!ok) { break; } - bool arg2; - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Sprite:createWithTexture"); - if (!ok) { break; } - cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - if (!ok) { break; } - cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite:createWithTexture",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_createWithTexture'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Sprite_createWithSpriteFrameName(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.Sprite",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.Sprite:createWithSpriteFrameName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_createWithSpriteFrameName'", nullptr); - return 0; - } - cocos2d::Sprite* ret = cocos2d::Sprite::createWithSpriteFrameName(arg0); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite:createWithSpriteFrameName",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_createWithSpriteFrameName'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Sprite_createWithSpriteFrame(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.Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_createWithSpriteFrame'", nullptr); - return 0; - } - cocos2d::Sprite* ret = cocos2d::Sprite::createWithSpriteFrame(arg0); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite:createWithSpriteFrame",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_createWithSpriteFrame'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Sprite_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite* 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_Sprite_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::Sprite(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Sprite"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:Sprite",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Sprite_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Sprite)"); - return 0; -} - -int lua_register_cocos2dx_Sprite(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Sprite"); - tolua_cclass(tolua_S,"Sprite","cc.Sprite","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"Sprite"); - tolua_function(tolua_S,"new",lua_cocos2dx_Sprite_constructor); - tolua_function(tolua_S,"setSpriteFrame",lua_cocos2dx_Sprite_setSpriteFrame); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_Sprite_setTexture); - tolua_function(tolua_S,"getTexture",lua_cocos2dx_Sprite_getTexture); - tolua_function(tolua_S,"setFlippedY",lua_cocos2dx_Sprite_setFlippedY); - tolua_function(tolua_S,"setFlippedX",lua_cocos2dx_Sprite_setFlippedX); - tolua_function(tolua_S,"initWithTexture",lua_cocos2dx_Sprite_initWithTexture); - tolua_function(tolua_S,"getBatchNode",lua_cocos2dx_Sprite_getBatchNode); - tolua_function(tolua_S,"getOffsetPosition",lua_cocos2dx_Sprite_getOffsetPosition); - tolua_function(tolua_S,"removeAllChildrenWithCleanup",lua_cocos2dx_Sprite_removeAllChildrenWithCleanup); - tolua_function(tolua_S,"setTextureRect",lua_cocos2dx_Sprite_setTextureRect); - tolua_function(tolua_S,"initWithSpriteFrameName",lua_cocos2dx_Sprite_initWithSpriteFrameName); - tolua_function(tolua_S,"isFrameDisplayed",lua_cocos2dx_Sprite_isFrameDisplayed); - tolua_function(tolua_S,"getAtlasIndex",lua_cocos2dx_Sprite_getAtlasIndex); - tolua_function(tolua_S,"setBatchNode",lua_cocos2dx_Sprite_setBatchNode); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_Sprite_getBlendFunc); - tolua_function(tolua_S,"setDisplayFrameWithAnimationName",lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName); - tolua_function(tolua_S,"setTextureAtlas",lua_cocos2dx_Sprite_setTextureAtlas); - tolua_function(tolua_S,"getSpriteFrame",lua_cocos2dx_Sprite_getSpriteFrame); - tolua_function(tolua_S,"isDirty",lua_cocos2dx_Sprite_isDirty); - tolua_function(tolua_S,"setAtlasIndex",lua_cocos2dx_Sprite_setAtlasIndex); - tolua_function(tolua_S,"setDirty",lua_cocos2dx_Sprite_setDirty); - tolua_function(tolua_S,"isTextureRectRotated",lua_cocos2dx_Sprite_isTextureRectRotated); - tolua_function(tolua_S,"getTextureRect",lua_cocos2dx_Sprite_getTextureRect); - tolua_function(tolua_S,"initWithFile",lua_cocos2dx_Sprite_initWithFile); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_Sprite_setBlendFunc); - tolua_function(tolua_S,"getTextureAtlas",lua_cocos2dx_Sprite_getTextureAtlas); - tolua_function(tolua_S,"initWithSpriteFrame",lua_cocos2dx_Sprite_initWithSpriteFrame); - tolua_function(tolua_S,"isFlippedX",lua_cocos2dx_Sprite_isFlippedX); - tolua_function(tolua_S,"isFlippedY",lua_cocos2dx_Sprite_isFlippedY); - tolua_function(tolua_S,"setVertexRect",lua_cocos2dx_Sprite_setVertexRect); - tolua_function(tolua_S,"create", lua_cocos2dx_Sprite_create); - tolua_function(tolua_S,"createWithTexture", lua_cocos2dx_Sprite_createWithTexture); - tolua_function(tolua_S,"createWithSpriteFrameName", lua_cocos2dx_Sprite_createWithSpriteFrameName); - tolua_function(tolua_S,"createWithSpriteFrame", lua_cocos2dx_Sprite_createWithSpriteFrame); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Sprite).name(); - g_luaType[typeName] = "cc.Sprite"; - g_typeCast["Sprite"] = "cc.Sprite"; - return 1; -} - -int lua_cocos2dx_Image_hasPremultipliedAlpha(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_hasPremultipliedAlpha'", 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_Image_hasPremultipliedAlpha'", nullptr); - return 0; - } - bool ret = cobj->hasPremultipliedAlpha(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:hasPremultipliedAlpha",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_hasPremultipliedAlpha'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_saveToFile(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_saveToFile'", 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.Image:saveToFile"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Image_saveToFile'", nullptr); - return 0; - } - bool ret = cobj->saveToFile(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - if (argc == 2) - { - std::string arg0; - bool arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Image:saveToFile"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Image:saveToFile"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Image_saveToFile'", nullptr); - return 0; - } - bool ret = cobj->saveToFile(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.Image:saveToFile",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_saveToFile'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_hasAlpha(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_hasAlpha'", 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_Image_hasAlpha'", nullptr); - return 0; - } - bool ret = cobj->hasAlpha(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:hasAlpha",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_hasAlpha'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_isCompressed(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_isCompressed'", 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_Image_isCompressed'", nullptr); - return 0; - } - bool ret = cobj->isCompressed(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:isCompressed",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_isCompressed'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_getHeight(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getHeight'", 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_Image_getHeight'", nullptr); - return 0; - } - int ret = cobj->getHeight(); - 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.Image:getHeight",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getHeight'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_initWithImageFile(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_initWithImageFile'", 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.Image:initWithImageFile"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Image_initWithImageFile'", nullptr); - return 0; - } - bool ret = cobj->initWithImageFile(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.Image:initWithImageFile",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_initWithImageFile'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_getWidth(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getWidth'", 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_Image_getWidth'", nullptr); - return 0; - } - int ret = cobj->getWidth(); - 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.Image:getWidth",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getWidth'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_getBitPerPixel(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getBitPerPixel'", 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_Image_getBitPerPixel'", nullptr); - return 0; - } - int ret = cobj->getBitPerPixel(); - 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.Image:getBitPerPixel",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getBitPerPixel'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_getFileType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getFileType'", 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_Image_getFileType'", nullptr); - return 0; - } - int ret = (int)cobj->getFileType(); - 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.Image:getFileType",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getFileType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_getNumberOfMipmaps(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getNumberOfMipmaps'", 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_Image_getNumberOfMipmaps'", nullptr); - return 0; - } - int ret = cobj->getNumberOfMipmaps(); - 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.Image:getNumberOfMipmaps",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getNumberOfMipmaps'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_getRenderFormat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getRenderFormat'", 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_Image_getRenderFormat'", nullptr); - return 0; - } - int ret = (int)cobj->getRenderFormat(); - 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.Image:getRenderFormat",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getRenderFormat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(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.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Image:setPVRImagesHavePremultipliedAlpha"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha'", nullptr); - return 0; - } - cocos2d::Image::setPVRImagesHavePremultipliedAlpha(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Image:setPVRImagesHavePremultipliedAlpha",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Image_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* 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_Image_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::Image(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Image"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:Image",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Image_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Image)"); - return 0; -} - -int lua_register_cocos2dx_Image(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Image"); - tolua_cclass(tolua_S,"Image","cc.Image","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Image"); - tolua_function(tolua_S,"new",lua_cocos2dx_Image_constructor); - tolua_function(tolua_S,"hasPremultipliedAlpha",lua_cocos2dx_Image_hasPremultipliedAlpha); - tolua_function(tolua_S,"saveToFile",lua_cocos2dx_Image_saveToFile); - tolua_function(tolua_S,"hasAlpha",lua_cocos2dx_Image_hasAlpha); - tolua_function(tolua_S,"isCompressed",lua_cocos2dx_Image_isCompressed); - tolua_function(tolua_S,"getHeight",lua_cocos2dx_Image_getHeight); - tolua_function(tolua_S,"initWithImageFile",lua_cocos2dx_Image_initWithImageFile); - tolua_function(tolua_S,"getWidth",lua_cocos2dx_Image_getWidth); - tolua_function(tolua_S,"getBitPerPixel",lua_cocos2dx_Image_getBitPerPixel); - tolua_function(tolua_S,"getFileType",lua_cocos2dx_Image_getFileType); - tolua_function(tolua_S,"getNumberOfMipmaps",lua_cocos2dx_Image_getNumberOfMipmaps); - tolua_function(tolua_S,"getRenderFormat",lua_cocos2dx_Image_getRenderFormat); - tolua_function(tolua_S,"setPVRImagesHavePremultipliedAlpha", lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Image).name(); - g_luaType[typeName] = "cc.Image"; - g_typeCast["Image"] = "cc.Image"; - return 1; -} - -int lua_cocos2dx_RenderTexture_setVirtualViewport(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setVirtualViewport'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - cocos2d::Vec2 arg0; - cocos2d::Rect arg1; - cocos2d::Rect arg2; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.RenderTexture:setVirtualViewport"); - - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.RenderTexture:setVirtualViewport"); - - ok &= luaval_to_rect(tolua_S, 4, &arg2, "cc.RenderTexture:setVirtualViewport"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setVirtualViewport'", nullptr); - return 0; - } - cobj->setVirtualViewport(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.RenderTexture:setVirtualViewport",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setVirtualViewport'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_clearStencil(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_clearStencil'", 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.RenderTexture:clearStencil"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_clearStencil'", nullptr); - return 0; - } - cobj->clearStencil(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:clearStencil",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_clearStencil'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_getClearDepth(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getClearDepth'", 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_RenderTexture_getClearDepth'", nullptr); - return 0; - } - double ret = cobj->getClearDepth(); - 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.RenderTexture:getClearDepth",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getClearDepth'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_getClearStencil(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getClearStencil'", 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_RenderTexture_getClearStencil'", nullptr); - return 0; - } - int ret = cobj->getClearStencil(); - 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.RenderTexture:getClearStencil",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getClearStencil'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_end(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_end'", 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_RenderTexture_end'", nullptr); - return 0; - } - cobj->end(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:end",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_end'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_setClearStencil(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setClearStencil'", 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.RenderTexture:setClearStencil"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setClearStencil'", nullptr); - return 0; - } - cobj->setClearStencil(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setClearStencil",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setClearStencil'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_setSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setSprite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Sprite* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setSprite'", nullptr); - return 0; - } - cobj->setSprite(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setSprite",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_getSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getSprite'", 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_RenderTexture_getSprite'", nullptr); - return 0; - } - cocos2d::Sprite* ret = cobj->getSprite(); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:getSprite",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_isAutoDraw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_isAutoDraw'", 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_RenderTexture_isAutoDraw'", nullptr); - return 0; - } - bool ret = cobj->isAutoDraw(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:isAutoDraw",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_isAutoDraw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_setKeepMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setKeepMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.RenderTexture:setKeepMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setKeepMatrix'", nullptr); - return 0; - } - cobj->setKeepMatrix(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setKeepMatrix",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setKeepMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_setClearFlags(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setClearFlags'", 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.RenderTexture:setClearFlags"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setClearFlags'", nullptr); - return 0; - } - cobj->setClearFlags(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setClearFlags",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setClearFlags'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_begin(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_begin'", 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_RenderTexture_begin'", nullptr); - return 0; - } - cobj->begin(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:begin",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_begin'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_saveToFile(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_saveToFile'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - cocos2d::Image::Format arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - bool ret = cobj->saveToFile(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - cocos2d::Image::Format arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - bool arg2; - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - bool ret = cobj->saveToFile(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 4) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - cocos2d::Image::Format arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - bool arg2; - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - std::function &)> arg3; - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - - if (!ok) { break; } - bool ret = cobj->saveToFile(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - bool ret = cobj->saveToFile(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - bool arg1; - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - bool ret = cobj->saveToFile(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - bool arg1; - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.RenderTexture:saveToFile"); - - if (!ok) { break; } - std::function &)> arg2; - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - - if (!ok) { break; } - bool ret = cobj->saveToFile(arg0, arg1, arg2); - 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.RenderTexture:saveToFile",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_saveToFile'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_setAutoDraw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setAutoDraw'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.RenderTexture:setAutoDraw"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setAutoDraw'", nullptr); - return 0; - } - cobj->setAutoDraw(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setAutoDraw",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setAutoDraw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_setClearColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setClearColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Color4F arg0; - - ok &=luaval_to_color4f(tolua_S, 2, &arg0, "cc.RenderTexture:setClearColor"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setClearColor'", nullptr); - return 0; - } - cobj->setClearColor(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setClearColor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setClearColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_endToLua(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_endToLua'", 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_RenderTexture_endToLua'", nullptr); - return 0; - } - cobj->endToLua(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:endToLua",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_endToLua'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_beginWithClear(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_beginWithClear'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 5) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg3; - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg4; - ok &= luaval_to_number(tolua_S, 6,&arg4, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - cobj->beginWithClear(arg0, arg1, arg2, arg3, arg4); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 4) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg3; - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - cobj->beginWithClear(arg0, arg1, arg2, arg3); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 6) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg3; - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - double arg4; - ok &= luaval_to_number(tolua_S, 6,&arg4, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - int arg5; - ok &= luaval_to_int32(tolua_S, 7,(int *)&arg5, "cc.RenderTexture:beginWithClear"); - - if (!ok) { break; } - cobj->beginWithClear(arg0, arg1, arg2, arg3, arg4, arg5); - 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.RenderTexture:beginWithClear",argc, 6); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_beginWithClear'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_clearDepth(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_clearDepth'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:clearDepth"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_clearDepth'", nullptr); - return 0; - } - cobj->clearDepth(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:clearDepth",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_clearDepth'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_getClearColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getClearColor'", 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_RenderTexture_getClearColor'", nullptr); - return 0; - } - const cocos2d::Color4F& ret = cobj->getClearColor(); - color4f_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:getClearColor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getClearColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_clear(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_clear'", 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.RenderTexture:clear"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.RenderTexture:clear"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.RenderTexture:clear"); - - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.RenderTexture:clear"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_clear'", nullptr); - return 0; - } - cobj->clear(arg0, arg1, arg2, arg3); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:clear",argc, 4); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_clear'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_getClearFlags(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getClearFlags'", 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_RenderTexture_getClearFlags'", nullptr); - return 0; - } - unsigned int ret = cobj->getClearFlags(); - 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.RenderTexture:getClearFlags",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getClearFlags'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_newImage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_newImage'", 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_RenderTexture_newImage'", nullptr); - return 0; - } - cocos2d::Image* ret = cobj->newImage(); - object_to_luaval(tolua_S, "cc.Image",(cocos2d::Image*)ret); - return 1; - } - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.RenderTexture:newImage"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_newImage'", nullptr); - return 0; - } - cocos2d::Image* ret = cobj->newImage(arg0); - object_to_luaval(tolua_S, "cc.Image",(cocos2d::Image*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:newImage",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_newImage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_setClearDepth(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setClearDepth'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:setClearDepth"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setClearDepth'", nullptr); - return 0; - } - cobj->setClearDepth(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setClearDepth",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setClearDepth'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_initWithWidthAndHeight(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_initWithWidthAndHeight'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 4) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - unsigned int arg3; - ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2); - 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.RenderTexture:initWithWidthAndHeight",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_initWithWidthAndHeight'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_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.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 3) - { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:create"); - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:create"); - if (!ok) { break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:create"); - if (!ok) { break; } - cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.RenderTexture",(cocos2d::RenderTexture*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 4) - { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:create"); - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:create"); - if (!ok) { break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:create"); - if (!ok) { break; } - unsigned int arg3; - ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.RenderTexture:create"); - if (!ok) { break; } - cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.RenderTexture",(cocos2d::RenderTexture*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:create"); - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:create"); - if (!ok) { break; } - cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.RenderTexture",(cocos2d::RenderTexture*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.RenderTexture:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_RenderTexture_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* 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_RenderTexture_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::RenderTexture(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.RenderTexture"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:RenderTexture",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_RenderTexture_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (RenderTexture)"); - return 0; -} - -int lua_register_cocos2dx_RenderTexture(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.RenderTexture"); - tolua_cclass(tolua_S,"RenderTexture","cc.RenderTexture","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"RenderTexture"); - tolua_function(tolua_S,"new",lua_cocos2dx_RenderTexture_constructor); - tolua_function(tolua_S,"setVirtualViewport",lua_cocos2dx_RenderTexture_setVirtualViewport); - tolua_function(tolua_S,"clearStencil",lua_cocos2dx_RenderTexture_clearStencil); - tolua_function(tolua_S,"getClearDepth",lua_cocos2dx_RenderTexture_getClearDepth); - tolua_function(tolua_S,"getClearStencil",lua_cocos2dx_RenderTexture_getClearStencil); - tolua_function(tolua_S,"end",lua_cocos2dx_RenderTexture_end); - tolua_function(tolua_S,"setClearStencil",lua_cocos2dx_RenderTexture_setClearStencil); - tolua_function(tolua_S,"setSprite",lua_cocos2dx_RenderTexture_setSprite); - tolua_function(tolua_S,"getSprite",lua_cocos2dx_RenderTexture_getSprite); - tolua_function(tolua_S,"isAutoDraw",lua_cocos2dx_RenderTexture_isAutoDraw); - tolua_function(tolua_S,"setKeepMatrix",lua_cocos2dx_RenderTexture_setKeepMatrix); - tolua_function(tolua_S,"setClearFlags",lua_cocos2dx_RenderTexture_setClearFlags); - tolua_function(tolua_S,"begin",lua_cocos2dx_RenderTexture_begin); - tolua_function(tolua_S,"saveToFile",lua_cocos2dx_RenderTexture_saveToFile); - tolua_function(tolua_S,"setAutoDraw",lua_cocos2dx_RenderTexture_setAutoDraw); - tolua_function(tolua_S,"setClearColor",lua_cocos2dx_RenderTexture_setClearColor); - tolua_function(tolua_S,"endToLua",lua_cocos2dx_RenderTexture_endToLua); - tolua_function(tolua_S,"beginWithClear",lua_cocos2dx_RenderTexture_beginWithClear); - tolua_function(tolua_S,"clearDepth",lua_cocos2dx_RenderTexture_clearDepth); - tolua_function(tolua_S,"getClearColor",lua_cocos2dx_RenderTexture_getClearColor); - tolua_function(tolua_S,"clear",lua_cocos2dx_RenderTexture_clear); - tolua_function(tolua_S,"getClearFlags",lua_cocos2dx_RenderTexture_getClearFlags); - tolua_function(tolua_S,"newImage",lua_cocos2dx_RenderTexture_newImage); - tolua_function(tolua_S,"setClearDepth",lua_cocos2dx_RenderTexture_setClearDepth); - tolua_function(tolua_S,"initWithWidthAndHeight",lua_cocos2dx_RenderTexture_initWithWidthAndHeight); - tolua_function(tolua_S,"create", lua_cocos2dx_RenderTexture_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::RenderTexture).name(); - g_luaType[typeName] = "cc.RenderTexture"; - g_typeCast["RenderTexture"] = "cc.RenderTexture"; - return 1; -} - int lua_cocos2dx_NodeGrid_setTarget(lua_State* tolua_S) { int argc = 0; @@ -74348,6 +64536,11192 @@ int lua_register_cocos2dx_ParticleRain(lua_State* tolua_S) return 1; } +int lua_cocos2dx_ProgressTimer_initWithSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_initWithSprite'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Sprite* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_initWithSprite'", nullptr); + return 0; + } + bool ret = cobj->initWithSprite(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.ProgressTimer:initWithSprite",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_initWithSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_isReverseDirection(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'", 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_ProgressTimer_isReverseDirection'", nullptr); + return 0; + } + bool ret = cobj->isReverseDirection(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:isReverseDirection",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setBarChangeRate(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setBarChangeRate"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'", nullptr); + return 0; + } + cobj->setBarChangeRate(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setBarChangeRate",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getPercentage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getPercentage'", 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_ProgressTimer_getPercentage'", nullptr); + return 0; + } + double ret = cobj->getPercentage(); + 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.ProgressTimer:getPercentage",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getPercentage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setSprite'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Sprite* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setSprite'", nullptr); + return 0; + } + cobj->setSprite(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setSprite",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_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_ProgressTimer_getType'", nullptr); + return 0; + } + int ret = (int)cobj->getType(); + 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.ProgressTimer:getType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getSprite'", 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_ProgressTimer_getSprite'", nullptr); + return 0; + } + cocos2d::Sprite* ret = cobj->getSprite(); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getSprite",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setMidpoint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setMidpoint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setMidpoint"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setMidpoint'", nullptr); + return 0; + } + cobj->setMidpoint(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setMidpoint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setMidpoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getBarChangeRate(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'", 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_ProgressTimer_getBarChangeRate'", nullptr); + return 0; + } + cocos2d::Vec2 ret = cobj->getBarChangeRate(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getBarChangeRate",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setReverseDirection(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + bool arg0; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); + + if (!ok) { break; } + cobj->setReverseDirection(arg0); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + bool arg0; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); + + if (!ok) { break; } + cobj->setReverseProgress(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.ProgressTimer:setReverseProgress",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getMidpoint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getMidpoint'", 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_ProgressTimer_getMidpoint'", nullptr); + return 0; + } + cocos2d::Vec2 ret = cobj->getMidpoint(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getMidpoint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getMidpoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setPercentage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setPercentage'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ProgressTimer:setPercentage"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setPercentage'", nullptr); + return 0; + } + cobj->setPercentage(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setPercentage",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setPercentage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setType'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ProgressTimer::Type arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProgressTimer:setType"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setType'", nullptr); + return 0; + } + cobj->setType(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setType",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Sprite* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_create'", nullptr); + return 0; + } + cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); + object_to_luaval(tolua_S, "cc.ProgressTimer",(cocos2d::ProgressTimer*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProgressTimer:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_ProgressTimer_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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_ProgressTimer_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::ProgressTimer(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ProgressTimer"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:ProgressTimer",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_ProgressTimer_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ProgressTimer)"); + return 0; +} + +int lua_register_cocos2dx_ProgressTimer(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ProgressTimer"); + tolua_cclass(tolua_S,"ProgressTimer","cc.ProgressTimer","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"ProgressTimer"); + tolua_function(tolua_S,"new",lua_cocos2dx_ProgressTimer_constructor); + tolua_function(tolua_S,"initWithSprite",lua_cocos2dx_ProgressTimer_initWithSprite); + tolua_function(tolua_S,"isReverseDirection",lua_cocos2dx_ProgressTimer_isReverseDirection); + tolua_function(tolua_S,"setBarChangeRate",lua_cocos2dx_ProgressTimer_setBarChangeRate); + tolua_function(tolua_S,"getPercentage",lua_cocos2dx_ProgressTimer_getPercentage); + tolua_function(tolua_S,"setSprite",lua_cocos2dx_ProgressTimer_setSprite); + tolua_function(tolua_S,"getType",lua_cocos2dx_ProgressTimer_getType); + tolua_function(tolua_S,"getSprite",lua_cocos2dx_ProgressTimer_getSprite); + tolua_function(tolua_S,"setMidpoint",lua_cocos2dx_ProgressTimer_setMidpoint); + tolua_function(tolua_S,"getBarChangeRate",lua_cocos2dx_ProgressTimer_getBarChangeRate); + tolua_function(tolua_S,"setReverseDirection",lua_cocos2dx_ProgressTimer_setReverseDirection); + tolua_function(tolua_S,"getMidpoint",lua_cocos2dx_ProgressTimer_getMidpoint); + tolua_function(tolua_S,"setPercentage",lua_cocos2dx_ProgressTimer_setPercentage); + tolua_function(tolua_S,"setType",lua_cocos2dx_ProgressTimer_setType); + tolua_function(tolua_S,"create", lua_cocos2dx_ProgressTimer_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ProgressTimer).name(); + g_luaType[typeName] = "cc.ProgressTimer"; + g_typeCast["ProgressTimer"] = "cc.ProgressTimer"; + return 1; +} + +int lua_cocos2dx_ProtectedNode_addProtectedChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_addProtectedChild'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:addProtectedChild"); + + if (!ok) { break; } + cobj->addProtectedChild(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + cobj->addProtectedChild(arg0); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:addProtectedChild"); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.ProtectedNode:addProtectedChild"); + + if (!ok) { break; } + cobj->addProtectedChild(arg0, arg1, arg2); + 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.ProtectedNode:addProtectedChild",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_addProtectedChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_disableCascadeColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_disableCascadeColor'", 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_ProtectedNode_disableCascadeColor'", nullptr); + return 0; + } + cobj->disableCascadeColor(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:disableCascadeColor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_disableCascadeColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_removeProtectedChildByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'", 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.ProtectedNode:removeProtectedChildByTag"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'", nullptr); + return 0; + } + cobj->removeProtectedChildByTag(arg0); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 2) + { + int arg0; + bool arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProtectedNode:removeProtectedChildByTag"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.ProtectedNode:removeProtectedChildByTag"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'", nullptr); + return 0; + } + cobj->removeProtectedChildByTag(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.ProtectedNode:removeProtectedChildByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_reorderProtectedChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Node* arg0; + int arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:reorderProtectedChild"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'", nullptr); + return 0; + } + cobj->reorderProtectedChild(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.ProtectedNode:reorderProtectedChild",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProtectedNode:removeAllProtectedChildrenWithCleanup"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'", nullptr); + return 0; + } + cobj->removeAllProtectedChildrenWithCleanup(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeAllProtectedChildrenWithCleanup",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_disableCascadeOpacity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_disableCascadeOpacity'", 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_ProtectedNode_disableCascadeOpacity'", nullptr); + return 0; + } + cobj->disableCascadeOpacity(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:disableCascadeOpacity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_disableCascadeOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_sortAllProtectedChildren(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_sortAllProtectedChildren'", 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_ProtectedNode_sortAllProtectedChildren'", nullptr); + return 0; + } + cobj->sortAllProtectedChildren(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:sortAllProtectedChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_sortAllProtectedChildren'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_getProtectedChildByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'", 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.ProtectedNode:getProtectedChildByTag"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'", nullptr); + return 0; + } + cocos2d::Node* ret = cobj->getProtectedChildByTag(arg0); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:getProtectedChildByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_removeProtectedChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'", nullptr); + return 0; + } + cobj->removeProtectedChild(arg0); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 2) + { + cocos2d::Node* arg0; + bool arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.ProtectedNode:removeProtectedChild"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'", nullptr); + return 0; + } + cobj->removeProtectedChild(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.ProtectedNode:removeProtectedChild",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_removeAllProtectedChildren(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildren'", 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_ProtectedNode_removeAllProtectedChildren'", nullptr); + return 0; + } + cobj->removeAllProtectedChildren(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeAllProtectedChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildren'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_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.ProtectedNode",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_ProtectedNode_create'", nullptr); + return 0; + } + cocos2d::ProtectedNode* ret = cocos2d::ProtectedNode::create(); + object_to_luaval(tolua_S, "cc.ProtectedNode",(cocos2d::ProtectedNode*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProtectedNode:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_ProtectedNode_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* 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_ProtectedNode_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::ProtectedNode(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ProtectedNode"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:ProtectedNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_ProtectedNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ProtectedNode)"); + return 0; +} + +int lua_register_cocos2dx_ProtectedNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ProtectedNode"); + tolua_cclass(tolua_S,"ProtectedNode","cc.ProtectedNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"ProtectedNode"); + tolua_function(tolua_S,"new",lua_cocos2dx_ProtectedNode_constructor); + tolua_function(tolua_S,"addProtectedChild",lua_cocos2dx_ProtectedNode_addProtectedChild); + tolua_function(tolua_S,"disableCascadeColor",lua_cocos2dx_ProtectedNode_disableCascadeColor); + tolua_function(tolua_S,"removeProtectedChildByTag",lua_cocos2dx_ProtectedNode_removeProtectedChildByTag); + tolua_function(tolua_S,"reorderProtectedChild",lua_cocos2dx_ProtectedNode_reorderProtectedChild); + tolua_function(tolua_S,"removeAllProtectedChildrenWithCleanup",lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup); + tolua_function(tolua_S,"disableCascadeOpacity",lua_cocos2dx_ProtectedNode_disableCascadeOpacity); + tolua_function(tolua_S,"sortAllProtectedChildren",lua_cocos2dx_ProtectedNode_sortAllProtectedChildren); + tolua_function(tolua_S,"getProtectedChildByTag",lua_cocos2dx_ProtectedNode_getProtectedChildByTag); + tolua_function(tolua_S,"removeProtectedChild",lua_cocos2dx_ProtectedNode_removeProtectedChild); + tolua_function(tolua_S,"removeAllProtectedChildren",lua_cocos2dx_ProtectedNode_removeAllProtectedChildren); + tolua_function(tolua_S,"create", lua_cocos2dx_ProtectedNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ProtectedNode).name(); + g_luaType[typeName] = "cc.ProtectedNode"; + g_typeCast["ProtectedNode"] = "cc.ProtectedNode"; + return 1; +} + +int lua_cocos2dx_Sprite_setSpriteFrame(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setSpriteFrame'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::SpriteFrame* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + + if (!ok) { break; } + cobj->setSpriteFrame(arg0); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:setSpriteFrame"); + + if (!ok) { break; } + cobj->setSpriteFrame(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.Sprite:setSpriteFrame",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setSpriteFrame'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setTexture'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + + if (!ok) { break; } + cobj->setTexture(arg0); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:setTexture"); + + if (!ok) { break; } + cobj->setTexture(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.Sprite:setTexture",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_getTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_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_Sprite_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.Sprite:getTexture",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setFlippedY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setFlippedY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite:setFlippedY"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setFlippedY'", nullptr); + return 0; + } + cobj->setFlippedY(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setFlippedY",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setFlippedY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setFlippedX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setFlippedX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite:setFlippedX"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setFlippedX'", nullptr); + return 0; + } + cobj->setFlippedX(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setFlippedX",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setFlippedX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_initWithTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_initWithTexture'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + + if (!ok) { break; } + cocos2d::Rect arg1; + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:initWithTexture"); + + if (!ok) { break; } + bool ret = cobj->initWithTexture(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + + if (!ok) { break; } + bool ret = cobj->initWithTexture(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + + if (!ok) { break; } + cocos2d::Rect arg1; + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:initWithTexture"); + + if (!ok) { break; } + bool arg2; + ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Sprite:initWithTexture"); + + if (!ok) { break; } + bool ret = cobj->initWithTexture(arg0, arg1, arg2); + 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.Sprite:initWithTexture",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_initWithTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_getBatchNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getBatchNode'", 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_Sprite_getBatchNode'", nullptr); + return 0; + } + cocos2d::SpriteBatchNode* ret = cobj->getBatchNode(); + object_to_luaval(tolua_S, "cc.SpriteBatchNode",(cocos2d::SpriteBatchNode*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getBatchNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getBatchNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_getOffsetPosition(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getOffsetPosition'", 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_Sprite_getOffsetPosition'", nullptr); + return 0; + } + const cocos2d::Vec2& ret = cobj->getOffsetPosition(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getOffsetPosition",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getOffsetPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_removeAllChildrenWithCleanup(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_removeAllChildrenWithCleanup'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite:removeAllChildrenWithCleanup"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_removeAllChildrenWithCleanup'", nullptr); + return 0; + } + cobj->removeAllChildrenWithCleanup(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:removeAllChildrenWithCleanup",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_removeAllChildrenWithCleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setTextureRect(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setTextureRect'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 3) { + cocos2d::Rect arg0; + ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Sprite:setTextureRect"); + + if (!ok) { break; } + bool arg1; + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Sprite:setTextureRect"); + + if (!ok) { break; } + cocos2d::Size arg2; + ok &= luaval_to_size(tolua_S, 4, &arg2, "cc.Sprite:setTextureRect"); + + if (!ok) { break; } + cobj->setTextureRect(arg0, arg1, arg2); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Rect arg0; + ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Sprite:setTextureRect"); + + if (!ok) { break; } + cobj->setTextureRect(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.Sprite:setTextureRect",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setTextureRect'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_initWithSpriteFrameName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_initWithSpriteFrameName'", 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.Sprite:initWithSpriteFrameName"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_initWithSpriteFrameName'", nullptr); + return 0; + } + bool ret = cobj->initWithSpriteFrameName(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.Sprite:initWithSpriteFrameName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_initWithSpriteFrameName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_isFrameDisplayed(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isFrameDisplayed'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::SpriteFrame* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_isFrameDisplayed'", nullptr); + return 0; + } + bool ret = cobj->isFrameDisplayed(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.Sprite:isFrameDisplayed",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isFrameDisplayed'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_getAtlasIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getAtlasIndex'", 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_Sprite_getAtlasIndex'", nullptr); + return 0; + } + ssize_t ret = cobj->getAtlasIndex(); + 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.Sprite:getAtlasIndex",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getAtlasIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setBatchNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setBatchNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::SpriteBatchNode* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteBatchNode",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setBatchNode'", nullptr); + return 0; + } + cobj->setBatchNode(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setBatchNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setBatchNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_getBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getBlendFunc'", 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_Sprite_getBlendFunc'", nullptr); + return 0; + } + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + blendfunc_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getBlendFunc",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + ssize_t arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:setDisplayFrameWithAnimationName"); + + ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.Sprite:setDisplayFrameWithAnimationName"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName'", nullptr); + return 0; + } + cobj->setDisplayFrameWithAnimationName(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.Sprite:setDisplayFrameWithAnimationName",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setTextureAtlas(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setTextureAtlas'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::TextureAtlas* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setTextureAtlas'", nullptr); + return 0; + } + cobj->setTextureAtlas(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setTextureAtlas",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setTextureAtlas'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_getSpriteFrame(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getSpriteFrame'", 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_Sprite_getSpriteFrame'", nullptr); + return 0; + } + cocos2d::SpriteFrame* ret = cobj->getSpriteFrame(); + object_to_luaval(tolua_S, "cc.SpriteFrame",(cocos2d::SpriteFrame*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getSpriteFrame",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getSpriteFrame'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_isDirty(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isDirty'", 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_Sprite_isDirty'", nullptr); + return 0; + } + bool ret = cobj->isDirty(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:isDirty",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isDirty'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setAtlasIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setAtlasIndex'", 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.Sprite:setAtlasIndex"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setAtlasIndex'", nullptr); + return 0; + } + cobj->setAtlasIndex(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setAtlasIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setAtlasIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setDirty(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setDirty'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite:setDirty"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setDirty'", nullptr); + return 0; + } + cobj->setDirty(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setDirty",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setDirty'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_isTextureRectRotated(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isTextureRectRotated'", 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_Sprite_isTextureRectRotated'", nullptr); + return 0; + } + bool ret = cobj->isTextureRectRotated(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:isTextureRectRotated",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isTextureRectRotated'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_getTextureRect(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getTextureRect'", 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_Sprite_getTextureRect'", nullptr); + return 0; + } + const cocos2d::Rect& ret = cobj->getTextureRect(); + rect_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getTextureRect",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getTextureRect'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_initWithFile(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_initWithFile'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:initWithFile"); + + if (!ok) { break; } + cocos2d::Rect arg1; + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:initWithFile"); + + if (!ok) { break; } + bool ret = cobj->initWithFile(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:initWithFile"); + + if (!ok) { break; } + bool ret = cobj->initWithFile(arg0); + 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.Sprite:initWithFile",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_initWithFile'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setBlendFunc'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::BlendFunc arg0; + + ok &= luaval_to_blendfunc(tolua_S, 2, &arg0, "cc.Sprite:setBlendFunc"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setBlendFunc'", nullptr); + return 0; + } + cobj->setBlendFunc(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setBlendFunc",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_getTextureAtlas(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getTextureAtlas'", 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_Sprite_getTextureAtlas'", nullptr); + return 0; + } + cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); + object_to_luaval(tolua_S, "cc.TextureAtlas",(cocos2d::TextureAtlas*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getTextureAtlas",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getTextureAtlas'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_initWithSpriteFrame(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_initWithSpriteFrame'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::SpriteFrame* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_initWithSpriteFrame'", nullptr); + return 0; + } + bool ret = cobj->initWithSpriteFrame(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.Sprite:initWithSpriteFrame",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_initWithSpriteFrame'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_isFlippedX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isFlippedX'", 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_Sprite_isFlippedX'", nullptr); + return 0; + } + bool ret = cobj->isFlippedX(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:isFlippedX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isFlippedX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_isFlippedY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_isFlippedY'", 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_Sprite_isFlippedY'", nullptr); + return 0; + } + bool ret = cobj->isFlippedY(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:isFlippedY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_isFlippedY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_setVertexRect(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_setVertexRect'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Rect arg0; + + ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Sprite:setVertexRect"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setVertexRect'", nullptr); + return 0; + } + cobj->setVertexRect(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:setVertexRect",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_setVertexRect'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Sprite_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.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:create"); + if (!ok) { break; } + cocos2d::Sprite* ret = cocos2d::Sprite::create(arg0); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 0) + { + cocos2d::Sprite* ret = cocos2d::Sprite::create(); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite:create"); + if (!ok) { break; } + cocos2d::Rect arg1; + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:create"); + if (!ok) { break; } + cocos2d::Sprite* ret = cocos2d::Sprite::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Sprite_createWithTexture(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.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + if (!ok) { break; } + cocos2d::Rect arg1; + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:createWithTexture"); + if (!ok) { break; } + cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0, arg1); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + if (!ok) { break; } + cocos2d::Rect arg1; + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:createWithTexture"); + if (!ok) { break; } + bool arg2; + ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Sprite:createWithTexture"); + if (!ok) { break; } + cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 1) + { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + if (!ok) { break; } + cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite:createWithTexture",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_createWithTexture'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Sprite_createWithSpriteFrameName(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.Sprite",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.Sprite:createWithSpriteFrameName"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_createWithSpriteFrameName'", nullptr); + return 0; + } + cocos2d::Sprite* ret = cocos2d::Sprite::createWithSpriteFrameName(arg0); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite:createWithSpriteFrameName",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_createWithSpriteFrameName'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Sprite_createWithSpriteFrame(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.Sprite",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::SpriteFrame* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_createWithSpriteFrame'", nullptr); + return 0; + } + cocos2d::Sprite* ret = cocos2d::Sprite::createWithSpriteFrame(arg0); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite:createWithSpriteFrame",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_createWithSpriteFrame'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Sprite_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite* 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_Sprite_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Sprite(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Sprite"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:Sprite",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Sprite_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Sprite)"); + return 0; +} + +int lua_register_cocos2dx_Sprite(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Sprite"); + tolua_cclass(tolua_S,"Sprite","cc.Sprite","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"Sprite"); + tolua_function(tolua_S,"new",lua_cocos2dx_Sprite_constructor); + tolua_function(tolua_S,"setSpriteFrame",lua_cocos2dx_Sprite_setSpriteFrame); + tolua_function(tolua_S,"setTexture",lua_cocos2dx_Sprite_setTexture); + tolua_function(tolua_S,"getTexture",lua_cocos2dx_Sprite_getTexture); + tolua_function(tolua_S,"setFlippedY",lua_cocos2dx_Sprite_setFlippedY); + tolua_function(tolua_S,"setFlippedX",lua_cocos2dx_Sprite_setFlippedX); + tolua_function(tolua_S,"initWithTexture",lua_cocos2dx_Sprite_initWithTexture); + tolua_function(tolua_S,"getBatchNode",lua_cocos2dx_Sprite_getBatchNode); + tolua_function(tolua_S,"getOffsetPosition",lua_cocos2dx_Sprite_getOffsetPosition); + tolua_function(tolua_S,"removeAllChildrenWithCleanup",lua_cocos2dx_Sprite_removeAllChildrenWithCleanup); + tolua_function(tolua_S,"setTextureRect",lua_cocos2dx_Sprite_setTextureRect); + tolua_function(tolua_S,"initWithSpriteFrameName",lua_cocos2dx_Sprite_initWithSpriteFrameName); + tolua_function(tolua_S,"isFrameDisplayed",lua_cocos2dx_Sprite_isFrameDisplayed); + tolua_function(tolua_S,"getAtlasIndex",lua_cocos2dx_Sprite_getAtlasIndex); + tolua_function(tolua_S,"setBatchNode",lua_cocos2dx_Sprite_setBatchNode); + tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_Sprite_getBlendFunc); + tolua_function(tolua_S,"setDisplayFrameWithAnimationName",lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName); + tolua_function(tolua_S,"setTextureAtlas",lua_cocos2dx_Sprite_setTextureAtlas); + tolua_function(tolua_S,"getSpriteFrame",lua_cocos2dx_Sprite_getSpriteFrame); + tolua_function(tolua_S,"isDirty",lua_cocos2dx_Sprite_isDirty); + tolua_function(tolua_S,"setAtlasIndex",lua_cocos2dx_Sprite_setAtlasIndex); + tolua_function(tolua_S,"setDirty",lua_cocos2dx_Sprite_setDirty); + tolua_function(tolua_S,"isTextureRectRotated",lua_cocos2dx_Sprite_isTextureRectRotated); + tolua_function(tolua_S,"getTextureRect",lua_cocos2dx_Sprite_getTextureRect); + tolua_function(tolua_S,"initWithFile",lua_cocos2dx_Sprite_initWithFile); + tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_Sprite_setBlendFunc); + tolua_function(tolua_S,"getTextureAtlas",lua_cocos2dx_Sprite_getTextureAtlas); + tolua_function(tolua_S,"initWithSpriteFrame",lua_cocos2dx_Sprite_initWithSpriteFrame); + tolua_function(tolua_S,"isFlippedX",lua_cocos2dx_Sprite_isFlippedX); + tolua_function(tolua_S,"isFlippedY",lua_cocos2dx_Sprite_isFlippedY); + tolua_function(tolua_S,"setVertexRect",lua_cocos2dx_Sprite_setVertexRect); + tolua_function(tolua_S,"create", lua_cocos2dx_Sprite_create); + tolua_function(tolua_S,"createWithTexture", lua_cocos2dx_Sprite_createWithTexture); + tolua_function(tolua_S,"createWithSpriteFrameName", lua_cocos2dx_Sprite_createWithSpriteFrameName); + tolua_function(tolua_S,"createWithSpriteFrame", lua_cocos2dx_Sprite_createWithSpriteFrame); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Sprite).name(); + g_luaType[typeName] = "cc.Sprite"; + g_typeCast["Sprite"] = "cc.Sprite"; + return 1; +} + +int lua_cocos2dx_Image_hasPremultipliedAlpha(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_hasPremultipliedAlpha'", 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_Image_hasPremultipliedAlpha'", nullptr); + return 0; + } + bool ret = cobj->hasPremultipliedAlpha(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:hasPremultipliedAlpha",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_hasPremultipliedAlpha'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_saveToFile(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_saveToFile'", 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.Image:saveToFile"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Image_saveToFile'", nullptr); + return 0; + } + bool ret = cobj->saveToFile(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + if (argc == 2) + { + std::string arg0; + bool arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Image:saveToFile"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Image:saveToFile"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Image_saveToFile'", nullptr); + return 0; + } + bool ret = cobj->saveToFile(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.Image:saveToFile",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_saveToFile'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_hasAlpha(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_hasAlpha'", 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_Image_hasAlpha'", nullptr); + return 0; + } + bool ret = cobj->hasAlpha(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:hasAlpha",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_hasAlpha'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_isCompressed(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_isCompressed'", 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_Image_isCompressed'", nullptr); + return 0; + } + bool ret = cobj->isCompressed(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:isCompressed",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_isCompressed'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_getHeight(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getHeight'", 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_Image_getHeight'", nullptr); + return 0; + } + int ret = cobj->getHeight(); + 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.Image:getHeight",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getHeight'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_initWithImageFile(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_initWithImageFile'", 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.Image:initWithImageFile"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Image_initWithImageFile'", nullptr); + return 0; + } + bool ret = cobj->initWithImageFile(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.Image:initWithImageFile",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_initWithImageFile'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_getWidth(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getWidth'", 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_Image_getWidth'", nullptr); + return 0; + } + int ret = cobj->getWidth(); + 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.Image:getWidth",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getWidth'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_getBitPerPixel(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getBitPerPixel'", 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_Image_getBitPerPixel'", nullptr); + return 0; + } + int ret = cobj->getBitPerPixel(); + 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.Image:getBitPerPixel",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getBitPerPixel'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_getFileType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getFileType'", 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_Image_getFileType'", nullptr); + return 0; + } + int ret = (int)cobj->getFileType(); + 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.Image:getFileType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getFileType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_getNumberOfMipmaps(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getNumberOfMipmaps'", 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_Image_getNumberOfMipmaps'", nullptr); + return 0; + } + int ret = cobj->getNumberOfMipmaps(); + 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.Image:getNumberOfMipmaps",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getNumberOfMipmaps'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_getRenderFormat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getRenderFormat'", 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_Image_getRenderFormat'", nullptr); + return 0; + } + int ret = (int)cobj->getRenderFormat(); + 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.Image:getRenderFormat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getRenderFormat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(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.Image",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + bool arg0; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Image:setPVRImagesHavePremultipliedAlpha"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha'", nullptr); + return 0; + } + cocos2d::Image::setPVRImagesHavePremultipliedAlpha(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Image:setPVRImagesHavePremultipliedAlpha",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Image_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Image* 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_Image_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Image(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Image"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:Image",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Image_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Image)"); + return 0; +} + +int lua_register_cocos2dx_Image(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Image"); + tolua_cclass(tolua_S,"Image","cc.Image","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Image"); + tolua_function(tolua_S,"new",lua_cocos2dx_Image_constructor); + tolua_function(tolua_S,"hasPremultipliedAlpha",lua_cocos2dx_Image_hasPremultipliedAlpha); + tolua_function(tolua_S,"saveToFile",lua_cocos2dx_Image_saveToFile); + tolua_function(tolua_S,"hasAlpha",lua_cocos2dx_Image_hasAlpha); + tolua_function(tolua_S,"isCompressed",lua_cocos2dx_Image_isCompressed); + tolua_function(tolua_S,"getHeight",lua_cocos2dx_Image_getHeight); + tolua_function(tolua_S,"initWithImageFile",lua_cocos2dx_Image_initWithImageFile); + tolua_function(tolua_S,"getWidth",lua_cocos2dx_Image_getWidth); + tolua_function(tolua_S,"getBitPerPixel",lua_cocos2dx_Image_getBitPerPixel); + tolua_function(tolua_S,"getFileType",lua_cocos2dx_Image_getFileType); + tolua_function(tolua_S,"getNumberOfMipmaps",lua_cocos2dx_Image_getNumberOfMipmaps); + tolua_function(tolua_S,"getRenderFormat",lua_cocos2dx_Image_getRenderFormat); + tolua_function(tolua_S,"setPVRImagesHavePremultipliedAlpha", lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Image).name(); + g_luaType[typeName] = "cc.Image"; + g_typeCast["Image"] = "cc.Image"; + return 1; +} + +int lua_cocos2dx_RenderTexture_setVirtualViewport(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setVirtualViewport'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + cocos2d::Vec2 arg0; + cocos2d::Rect arg1; + cocos2d::Rect arg2; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.RenderTexture:setVirtualViewport"); + + ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.RenderTexture:setVirtualViewport"); + + ok &= luaval_to_rect(tolua_S, 4, &arg2, "cc.RenderTexture:setVirtualViewport"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setVirtualViewport'", nullptr); + return 0; + } + cobj->setVirtualViewport(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.RenderTexture:setVirtualViewport",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setVirtualViewport'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_clearStencil(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_clearStencil'", 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.RenderTexture:clearStencil"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_clearStencil'", nullptr); + return 0; + } + cobj->clearStencil(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:clearStencil",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_clearStencil'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_getClearDepth(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getClearDepth'", 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_RenderTexture_getClearDepth'", nullptr); + return 0; + } + double ret = cobj->getClearDepth(); + 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.RenderTexture:getClearDepth",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getClearDepth'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_getClearStencil(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getClearStencil'", 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_RenderTexture_getClearStencil'", nullptr); + return 0; + } + int ret = cobj->getClearStencil(); + 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.RenderTexture:getClearStencil",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getClearStencil'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_end(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_end'", 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_RenderTexture_end'", nullptr); + return 0; + } + cobj->end(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:end",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_end'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_setClearStencil(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setClearStencil'", 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.RenderTexture:setClearStencil"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setClearStencil'", nullptr); + return 0; + } + cobj->setClearStencil(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setClearStencil",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setClearStencil'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_setSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setSprite'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Sprite* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setSprite'", nullptr); + return 0; + } + cobj->setSprite(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setSprite",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_getSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getSprite'", 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_RenderTexture_getSprite'", nullptr); + return 0; + } + cocos2d::Sprite* ret = cobj->getSprite(); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:getSprite",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_isAutoDraw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_isAutoDraw'", 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_RenderTexture_isAutoDraw'", nullptr); + return 0; + } + bool ret = cobj->isAutoDraw(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:isAutoDraw",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_isAutoDraw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_setKeepMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setKeepMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.RenderTexture:setKeepMatrix"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setKeepMatrix'", nullptr); + return 0; + } + cobj->setKeepMatrix(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setKeepMatrix",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setKeepMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_setClearFlags(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setClearFlags'", 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.RenderTexture:setClearFlags"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setClearFlags'", nullptr); + return 0; + } + cobj->setClearFlags(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setClearFlags",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setClearFlags'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_begin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_begin'", 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_RenderTexture_begin'", nullptr); + return 0; + } + cobj->begin(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:begin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_begin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_saveToFile(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_saveToFile'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + cocos2d::Image::Format arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + bool ret = cobj->saveToFile(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + cocos2d::Image::Format arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + bool arg2; + ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + bool ret = cobj->saveToFile(arg0, arg1, arg2); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 4) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + cocos2d::Image::Format arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + bool arg2; + ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + std::function &)> arg3; + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + + if (!ok) { break; } + bool ret = cobj->saveToFile(arg0, arg1, arg2, arg3); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + bool ret = cobj->saveToFile(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + bool arg1; + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + bool ret = cobj->saveToFile(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + bool arg1; + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.RenderTexture:saveToFile"); + + if (!ok) { break; } + std::function &)> arg2; + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + + if (!ok) { break; } + bool ret = cobj->saveToFile(arg0, arg1, arg2); + 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.RenderTexture:saveToFile",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_saveToFile'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_setAutoDraw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setAutoDraw'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.RenderTexture:setAutoDraw"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setAutoDraw'", nullptr); + return 0; + } + cobj->setAutoDraw(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setAutoDraw",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setAutoDraw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_setClearColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setClearColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Color4F arg0; + + ok &=luaval_to_color4f(tolua_S, 2, &arg0, "cc.RenderTexture:setClearColor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setClearColor'", nullptr); + return 0; + } + cobj->setClearColor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setClearColor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setClearColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_endToLua(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_endToLua'", 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_RenderTexture_endToLua'", nullptr); + return 0; + } + cobj->endToLua(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:endToLua",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_endToLua'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_beginWithClear(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_beginWithClear'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 5) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg3; + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg4; + ok &= luaval_to_number(tolua_S, 6,&arg4, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + cobj->beginWithClear(arg0, arg1, arg2, arg3, arg4); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 4) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg3; + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + cobj->beginWithClear(arg0, arg1, arg2, arg3); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 6) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg3; + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + double arg4; + ok &= luaval_to_number(tolua_S, 6,&arg4, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + int arg5; + ok &= luaval_to_int32(tolua_S, 7,(int *)&arg5, "cc.RenderTexture:beginWithClear"); + + if (!ok) { break; } + cobj->beginWithClear(arg0, arg1, arg2, arg3, arg4, arg5); + 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.RenderTexture:beginWithClear",argc, 6); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_beginWithClear'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_clearDepth(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_clearDepth'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:clearDepth"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_clearDepth'", nullptr); + return 0; + } + cobj->clearDepth(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:clearDepth",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_clearDepth'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_getClearColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getClearColor'", 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_RenderTexture_getClearColor'", nullptr); + return 0; + } + const cocos2d::Color4F& ret = cobj->getClearColor(); + color4f_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:getClearColor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getClearColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_clear(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_clear'", 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.RenderTexture:clear"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.RenderTexture:clear"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.RenderTexture:clear"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.RenderTexture:clear"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_clear'", nullptr); + return 0; + } + cobj->clear(arg0, arg1, arg2, arg3); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:clear",argc, 4); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_clear'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_getClearFlags(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getClearFlags'", 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_RenderTexture_getClearFlags'", nullptr); + return 0; + } + unsigned int ret = cobj->getClearFlags(); + 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.RenderTexture:getClearFlags",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getClearFlags'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_newImage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_newImage'", 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_RenderTexture_newImage'", nullptr); + return 0; + } + cocos2d::Image* ret = cobj->newImage(); + object_to_luaval(tolua_S, "cc.Image",(cocos2d::Image*)ret); + return 1; + } + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.RenderTexture:newImage"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_newImage'", nullptr); + return 0; + } + cocos2d::Image* ret = cobj->newImage(arg0); + object_to_luaval(tolua_S, "cc.Image",(cocos2d::Image*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:newImage",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_newImage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_setClearDepth(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setClearDepth'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.RenderTexture:setClearDepth"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setClearDepth'", nullptr); + return 0; + } + cobj->setClearDepth(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setClearDepth",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setClearDepth'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_initWithWidthAndHeight(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_initWithWidthAndHeight'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 4) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:initWithWidthAndHeight"); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:initWithWidthAndHeight"); + + if (!ok) { break; } + cocos2d::Texture2D::PixelFormat arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:initWithWidthAndHeight"); + + if (!ok) { break; } + unsigned int arg3; + ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.RenderTexture:initWithWidthAndHeight"); + + if (!ok) { break; } + bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2, arg3); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:initWithWidthAndHeight"); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:initWithWidthAndHeight"); + + if (!ok) { break; } + cocos2d::Texture2D::PixelFormat arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:initWithWidthAndHeight"); + + if (!ok) { break; } + bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2); + 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.RenderTexture:initWithWidthAndHeight",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_initWithWidthAndHeight'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderTexture_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.RenderTexture",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 3) + { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:create"); + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:create"); + if (!ok) { break; } + cocos2d::Texture2D::PixelFormat arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:create"); + if (!ok) { break; } + cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.RenderTexture",(cocos2d::RenderTexture*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 4) + { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:create"); + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:create"); + if (!ok) { break; } + cocos2d::Texture2D::PixelFormat arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:create"); + if (!ok) { break; } + unsigned int arg3; + ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.RenderTexture:create"); + if (!ok) { break; } + cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.RenderTexture",(cocos2d::RenderTexture*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:create"); + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:create"); + if (!ok) { break; } + cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.RenderTexture",(cocos2d::RenderTexture*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.RenderTexture:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_RenderTexture_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderTexture* 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_RenderTexture_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::RenderTexture(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.RenderTexture"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:RenderTexture",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_RenderTexture_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (RenderTexture)"); + return 0; +} + +int lua_register_cocos2dx_RenderTexture(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.RenderTexture"); + tolua_cclass(tolua_S,"RenderTexture","cc.RenderTexture","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"RenderTexture"); + tolua_function(tolua_S,"new",lua_cocos2dx_RenderTexture_constructor); + tolua_function(tolua_S,"setVirtualViewport",lua_cocos2dx_RenderTexture_setVirtualViewport); + tolua_function(tolua_S,"clearStencil",lua_cocos2dx_RenderTexture_clearStencil); + tolua_function(tolua_S,"getClearDepth",lua_cocos2dx_RenderTexture_getClearDepth); + tolua_function(tolua_S,"getClearStencil",lua_cocos2dx_RenderTexture_getClearStencil); + tolua_function(tolua_S,"end",lua_cocos2dx_RenderTexture_end); + tolua_function(tolua_S,"setClearStencil",lua_cocos2dx_RenderTexture_setClearStencil); + tolua_function(tolua_S,"setSprite",lua_cocos2dx_RenderTexture_setSprite); + tolua_function(tolua_S,"getSprite",lua_cocos2dx_RenderTexture_getSprite); + tolua_function(tolua_S,"isAutoDraw",lua_cocos2dx_RenderTexture_isAutoDraw); + tolua_function(tolua_S,"setKeepMatrix",lua_cocos2dx_RenderTexture_setKeepMatrix); + tolua_function(tolua_S,"setClearFlags",lua_cocos2dx_RenderTexture_setClearFlags); + tolua_function(tolua_S,"begin",lua_cocos2dx_RenderTexture_begin); + tolua_function(tolua_S,"saveToFile",lua_cocos2dx_RenderTexture_saveToFile); + tolua_function(tolua_S,"setAutoDraw",lua_cocos2dx_RenderTexture_setAutoDraw); + tolua_function(tolua_S,"setClearColor",lua_cocos2dx_RenderTexture_setClearColor); + tolua_function(tolua_S,"endToLua",lua_cocos2dx_RenderTexture_endToLua); + tolua_function(tolua_S,"beginWithClear",lua_cocos2dx_RenderTexture_beginWithClear); + tolua_function(tolua_S,"clearDepth",lua_cocos2dx_RenderTexture_clearDepth); + tolua_function(tolua_S,"getClearColor",lua_cocos2dx_RenderTexture_getClearColor); + tolua_function(tolua_S,"clear",lua_cocos2dx_RenderTexture_clear); + tolua_function(tolua_S,"getClearFlags",lua_cocos2dx_RenderTexture_getClearFlags); + tolua_function(tolua_S,"newImage",lua_cocos2dx_RenderTexture_newImage); + tolua_function(tolua_S,"setClearDepth",lua_cocos2dx_RenderTexture_setClearDepth); + tolua_function(tolua_S,"initWithWidthAndHeight",lua_cocos2dx_RenderTexture_initWithWidthAndHeight); + tolua_function(tolua_S,"create", lua_cocos2dx_RenderTexture_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::RenderTexture).name(); + g_luaType[typeName] = "cc.RenderTexture"; + g_typeCast["RenderTexture"] = "cc.RenderTexture"; + return 1; +} + +int lua_cocos2dx_TransitionEaseScene_easeActionWithAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionEaseScene* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionEaseScene",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionEaseScene*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionEaseScene_easeActionWithAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionInterval* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionEaseScene_easeActionWithAction'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionEaseScene:easeActionWithAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionEaseScene_easeActionWithAction'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_TransitionEaseScene_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionEaseScene)"); + return 0; +} + +int lua_register_cocos2dx_TransitionEaseScene(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionEaseScene"); + tolua_cclass(tolua_S,"TransitionEaseScene","cc.TransitionEaseScene","",nullptr); + + tolua_beginmodule(tolua_S,"TransitionEaseScene"); + tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionEaseScene_easeActionWithAction); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionEaseScene).name(); + g_luaType[typeName] = "cc.TransitionEaseScene"; + g_typeCast["TransitionEaseScene"] = "cc.TransitionEaseScene"; + return 1; +} + +int lua_cocos2dx_TransitionScene_getInScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionScene* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_getInScene'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_getInScene'", nullptr); + return 0; + } + cocos2d::Scene* ret = cobj->getInScene(); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:getInScene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_getInScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionScene_finish(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionScene* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_finish'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_finish'", nullptr); + return 0; + } + cobj->finish(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:finish",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_finish'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionScene_initWithDuration(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionScene* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_initWithDuration'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + double arg0; + cocos2d::Scene* arg1; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionScene:initWithDuration"); + + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_initWithDuration'", nullptr); + return 0; + } + bool ret = cobj->initWithDuration(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.TransitionScene:initWithDuration",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_initWithDuration'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionScene_getDuration(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionScene* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_getDuration'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_getDuration'", nullptr); + return 0; + } + double ret = cobj->getDuration(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:getDuration",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_getDuration'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionScene_hideOutShowIn(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionScene* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_hideOutShowIn'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_hideOutShowIn'", nullptr); + return 0; + } + cobj->hideOutShowIn(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:hideOutShowIn",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_hideOutShowIn'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionScene_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.TransitionScene",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_create'", nullptr); + return 0; + } + cocos2d::TransitionScene* ret = cocos2d::TransitionScene::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionScene",(cocos2d::TransitionScene*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionScene:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionScene_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionScene* 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_TransitionScene_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionScene(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionScene"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:TransitionScene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionScene_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionScene)"); + return 0; +} + +int lua_register_cocos2dx_TransitionScene(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionScene"); + tolua_cclass(tolua_S,"TransitionScene","cc.TransitionScene","cc.Scene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionScene"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionScene_constructor); + tolua_function(tolua_S,"getInScene",lua_cocos2dx_TransitionScene_getInScene); + tolua_function(tolua_S,"finish",lua_cocos2dx_TransitionScene_finish); + tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_TransitionScene_initWithDuration); + tolua_function(tolua_S,"getDuration",lua_cocos2dx_TransitionScene_getDuration); + tolua_function(tolua_S,"hideOutShowIn",lua_cocos2dx_TransitionScene_hideOutShowIn); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionScene_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionScene).name(); + g_luaType[typeName] = "cc.TransitionScene"; + g_typeCast["TransitionScene"] = "cc.TransitionScene"; + return 1; +} + +int lua_cocos2dx_TransitionSceneOriented_initWithDuration(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSceneOriented* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionSceneOriented",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionSceneOriented*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSceneOriented_initWithDuration'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + double arg0; + cocos2d::Scene* arg1; + cocos2d::TransitionScene::Orientation arg2; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSceneOriented:initWithDuration"); + + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionSceneOriented:initWithDuration"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSceneOriented_initWithDuration'", nullptr); + return 0; + } + bool ret = cobj->initWithDuration(arg0, arg1, arg2); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSceneOriented:initWithDuration",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSceneOriented_initWithDuration'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionSceneOriented_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.TransitionSceneOriented",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 3) + { + double arg0; + 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_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionSceneOriented:create"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSceneOriented_create'", nullptr); + return 0; + } + cocos2d::TransitionSceneOriented* ret = cocos2d::TransitionSceneOriented::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TransitionSceneOriented",(cocos2d::TransitionSceneOriented*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSceneOriented:create",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSceneOriented_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionSceneOriented_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSceneOriented* 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_TransitionSceneOriented_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionSceneOriented(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSceneOriented"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSceneOriented:TransitionSceneOriented",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSceneOriented_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionSceneOriented_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionSceneOriented)"); + return 0; +} + +int lua_register_cocos2dx_TransitionSceneOriented(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionSceneOriented"); + tolua_cclass(tolua_S,"TransitionSceneOriented","cc.TransitionSceneOriented","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionSceneOriented"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSceneOriented_constructor); + tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_TransitionSceneOriented_initWithDuration); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSceneOriented_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionSceneOriented).name(); + g_luaType[typeName] = "cc.TransitionSceneOriented"; + g_typeCast["TransitionSceneOriented"] = "cc.TransitionSceneOriented"; + return 1; +} + +int lua_cocos2dx_TransitionRotoZoom_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.TransitionRotoZoom",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionRotoZoom_create'", nullptr); + return 0; + } + cocos2d::TransitionRotoZoom* ret = cocos2d::TransitionRotoZoom::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionRotoZoom",(cocos2d::TransitionRotoZoom*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionRotoZoom:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionRotoZoom_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionRotoZoom_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionRotoZoom* 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_TransitionRotoZoom_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionRotoZoom(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionRotoZoom"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionRotoZoom:TransitionRotoZoom",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionRotoZoom_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionRotoZoom_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionRotoZoom)"); + return 0; +} + +int lua_register_cocos2dx_TransitionRotoZoom(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionRotoZoom"); + tolua_cclass(tolua_S,"TransitionRotoZoom","cc.TransitionRotoZoom","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionRotoZoom"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionRotoZoom_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionRotoZoom_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionRotoZoom).name(); + g_luaType[typeName] = "cc.TransitionRotoZoom"; + g_typeCast["TransitionRotoZoom"] = "cc.TransitionRotoZoom"; + return 1; +} + +int lua_cocos2dx_TransitionJumpZoom_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.TransitionJumpZoom",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionJumpZoom_create'", nullptr); + return 0; + } + cocos2d::TransitionJumpZoom* ret = cocos2d::TransitionJumpZoom::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionJumpZoom",(cocos2d::TransitionJumpZoom*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionJumpZoom:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionJumpZoom_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionJumpZoom_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionJumpZoom* 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_TransitionJumpZoom_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionJumpZoom(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionJumpZoom"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionJumpZoom:TransitionJumpZoom",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionJumpZoom_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionJumpZoom_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionJumpZoom)"); + return 0; +} + +int lua_register_cocos2dx_TransitionJumpZoom(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionJumpZoom"); + tolua_cclass(tolua_S,"TransitionJumpZoom","cc.TransitionJumpZoom","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionJumpZoom"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionJumpZoom_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionJumpZoom_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionJumpZoom).name(); + g_luaType[typeName] = "cc.TransitionJumpZoom"; + g_typeCast["TransitionJumpZoom"] = "cc.TransitionJumpZoom"; + return 1; +} + +int lua_cocos2dx_TransitionMoveInL_action(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionMoveInL* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionMoveInL",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionMoveInL*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionMoveInL_action'", 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_TransitionMoveInL_action'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->action(); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInL:action",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInL_action'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionMoveInL_easeActionWithAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionMoveInL* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionMoveInL",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionMoveInL*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionMoveInL_easeActionWithAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionInterval* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInL_easeActionWithAction'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInL:easeActionWithAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInL_easeActionWithAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionMoveInL_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.TransitionMoveInL",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInL_create'", nullptr); + return 0; + } + cocos2d::TransitionMoveInL* ret = cocos2d::TransitionMoveInL::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionMoveInL",(cocos2d::TransitionMoveInL*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionMoveInL:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInL_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionMoveInL_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionMoveInL* 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_TransitionMoveInL_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionMoveInL(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionMoveInL"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInL:TransitionMoveInL",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInL_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionMoveInL_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionMoveInL)"); + return 0; +} + +int lua_register_cocos2dx_TransitionMoveInL(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionMoveInL"); + tolua_cclass(tolua_S,"TransitionMoveInL","cc.TransitionMoveInL","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionMoveInL"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionMoveInL_constructor); + tolua_function(tolua_S,"action",lua_cocos2dx_TransitionMoveInL_action); + tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionMoveInL_easeActionWithAction); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionMoveInL_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionMoveInL).name(); + g_luaType[typeName] = "cc.TransitionMoveInL"; + g_typeCast["TransitionMoveInL"] = "cc.TransitionMoveInL"; + return 1; +} + +int lua_cocos2dx_TransitionMoveInR_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.TransitionMoveInR",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInR_create'", nullptr); + return 0; + } + cocos2d::TransitionMoveInR* ret = cocos2d::TransitionMoveInR::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionMoveInR",(cocos2d::TransitionMoveInR*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionMoveInR:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInR_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionMoveInR_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionMoveInR* 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_TransitionMoveInR_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionMoveInR(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionMoveInR"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInR:TransitionMoveInR",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInR_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionMoveInR_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionMoveInR)"); + return 0; +} + +int lua_register_cocos2dx_TransitionMoveInR(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionMoveInR"); + tolua_cclass(tolua_S,"TransitionMoveInR","cc.TransitionMoveInR","cc.TransitionMoveInL",nullptr); + + tolua_beginmodule(tolua_S,"TransitionMoveInR"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionMoveInR_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionMoveInR_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionMoveInR).name(); + g_luaType[typeName] = "cc.TransitionMoveInR"; + g_typeCast["TransitionMoveInR"] = "cc.TransitionMoveInR"; + return 1; +} + +int lua_cocos2dx_TransitionMoveInT_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.TransitionMoveInT",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInT_create'", nullptr); + return 0; + } + cocos2d::TransitionMoveInT* ret = cocos2d::TransitionMoveInT::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionMoveInT",(cocos2d::TransitionMoveInT*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionMoveInT:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInT_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionMoveInT_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionMoveInT* 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_TransitionMoveInT_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionMoveInT(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionMoveInT"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInT:TransitionMoveInT",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInT_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionMoveInT_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionMoveInT)"); + return 0; +} + +int lua_register_cocos2dx_TransitionMoveInT(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionMoveInT"); + tolua_cclass(tolua_S,"TransitionMoveInT","cc.TransitionMoveInT","cc.TransitionMoveInL",nullptr); + + tolua_beginmodule(tolua_S,"TransitionMoveInT"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionMoveInT_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionMoveInT_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionMoveInT).name(); + g_luaType[typeName] = "cc.TransitionMoveInT"; + g_typeCast["TransitionMoveInT"] = "cc.TransitionMoveInT"; + return 1; +} + +int lua_cocos2dx_TransitionMoveInB_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.TransitionMoveInB",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInB_create'", nullptr); + return 0; + } + cocos2d::TransitionMoveInB* ret = cocos2d::TransitionMoveInB::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionMoveInB",(cocos2d::TransitionMoveInB*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionMoveInB:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInB_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionMoveInB_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionMoveInB* 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_TransitionMoveInB_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionMoveInB(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionMoveInB"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionMoveInB:TransitionMoveInB",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionMoveInB_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionMoveInB_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionMoveInB)"); + return 0; +} + +int lua_register_cocos2dx_TransitionMoveInB(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionMoveInB"); + tolua_cclass(tolua_S,"TransitionMoveInB","cc.TransitionMoveInB","cc.TransitionMoveInL",nullptr); + + tolua_beginmodule(tolua_S,"TransitionMoveInB"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionMoveInB_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionMoveInB_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionMoveInB).name(); + g_luaType[typeName] = "cc.TransitionMoveInB"; + g_typeCast["TransitionMoveInB"] = "cc.TransitionMoveInB"; + return 1; +} + +int lua_cocos2dx_TransitionSlideInL_action(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSlideInL* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionSlideInL",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionSlideInL*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSlideInL_action'", 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_TransitionSlideInL_action'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->action(); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInL:action",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInL_action'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionSlideInL_easeActionWithAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSlideInL* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionSlideInL",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionSlideInL*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSlideInL_easeActionWithAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionInterval* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInL_easeActionWithAction'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInL:easeActionWithAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInL_easeActionWithAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionSlideInL_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.TransitionSlideInL",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInL_create'", nullptr); + return 0; + } + cocos2d::TransitionSlideInL* ret = cocos2d::TransitionSlideInL::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionSlideInL",(cocos2d::TransitionSlideInL*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSlideInL:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInL_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionSlideInL_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSlideInL* 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_TransitionSlideInL_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionSlideInL(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSlideInL"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInL:TransitionSlideInL",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInL_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionSlideInL_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionSlideInL)"); + return 0; +} + +int lua_register_cocos2dx_TransitionSlideInL(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionSlideInL"); + tolua_cclass(tolua_S,"TransitionSlideInL","cc.TransitionSlideInL","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionSlideInL"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSlideInL_constructor); + tolua_function(tolua_S,"action",lua_cocos2dx_TransitionSlideInL_action); + tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionSlideInL_easeActionWithAction); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSlideInL_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionSlideInL).name(); + g_luaType[typeName] = "cc.TransitionSlideInL"; + g_typeCast["TransitionSlideInL"] = "cc.TransitionSlideInL"; + return 1; +} + +int lua_cocos2dx_TransitionSlideInR_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.TransitionSlideInR",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInR_create'", nullptr); + return 0; + } + cocos2d::TransitionSlideInR* ret = cocos2d::TransitionSlideInR::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionSlideInR",(cocos2d::TransitionSlideInR*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSlideInR:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInR_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionSlideInR_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSlideInR* 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_TransitionSlideInR_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionSlideInR(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSlideInR"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInR:TransitionSlideInR",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInR_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionSlideInR_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionSlideInR)"); + return 0; +} + +int lua_register_cocos2dx_TransitionSlideInR(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionSlideInR"); + tolua_cclass(tolua_S,"TransitionSlideInR","cc.TransitionSlideInR","cc.TransitionSlideInL",nullptr); + + tolua_beginmodule(tolua_S,"TransitionSlideInR"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSlideInR_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSlideInR_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionSlideInR).name(); + g_luaType[typeName] = "cc.TransitionSlideInR"; + g_typeCast["TransitionSlideInR"] = "cc.TransitionSlideInR"; + return 1; +} + +int lua_cocos2dx_TransitionSlideInB_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.TransitionSlideInB",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInB_create'", nullptr); + return 0; + } + cocos2d::TransitionSlideInB* ret = cocos2d::TransitionSlideInB::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionSlideInB",(cocos2d::TransitionSlideInB*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSlideInB:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInB_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionSlideInB_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSlideInB* 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_TransitionSlideInB_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionSlideInB(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSlideInB"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInB:TransitionSlideInB",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInB_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionSlideInB_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionSlideInB)"); + return 0; +} + +int lua_register_cocos2dx_TransitionSlideInB(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionSlideInB"); + tolua_cclass(tolua_S,"TransitionSlideInB","cc.TransitionSlideInB","cc.TransitionSlideInL",nullptr); + + tolua_beginmodule(tolua_S,"TransitionSlideInB"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSlideInB_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSlideInB_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionSlideInB).name(); + g_luaType[typeName] = "cc.TransitionSlideInB"; + g_typeCast["TransitionSlideInB"] = "cc.TransitionSlideInB"; + return 1; +} + +int lua_cocos2dx_TransitionSlideInT_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.TransitionSlideInT",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInT_create'", nullptr); + return 0; + } + cocos2d::TransitionSlideInT* ret = cocos2d::TransitionSlideInT::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionSlideInT",(cocos2d::TransitionSlideInT*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSlideInT:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInT_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionSlideInT_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSlideInT* 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_TransitionSlideInT_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionSlideInT(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSlideInT"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSlideInT:TransitionSlideInT",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSlideInT_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionSlideInT_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionSlideInT)"); + return 0; +} + +int lua_register_cocos2dx_TransitionSlideInT(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionSlideInT"); + tolua_cclass(tolua_S,"TransitionSlideInT","cc.TransitionSlideInT","cc.TransitionSlideInL",nullptr); + + tolua_beginmodule(tolua_S,"TransitionSlideInT"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSlideInT_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSlideInT_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionSlideInT).name(); + g_luaType[typeName] = "cc.TransitionSlideInT"; + g_typeCast["TransitionSlideInT"] = "cc.TransitionSlideInT"; + return 1; +} + +int lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionShrinkGrow* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionShrinkGrow",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionShrinkGrow*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionInterval* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionShrinkGrow:easeActionWithAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionShrinkGrow_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.TransitionShrinkGrow",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionShrinkGrow_create'", nullptr); + return 0; + } + cocos2d::TransitionShrinkGrow* ret = cocos2d::TransitionShrinkGrow::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionShrinkGrow",(cocos2d::TransitionShrinkGrow*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionShrinkGrow:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionShrinkGrow_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionShrinkGrow_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionShrinkGrow* 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_TransitionShrinkGrow_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionShrinkGrow(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionShrinkGrow"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionShrinkGrow:TransitionShrinkGrow",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionShrinkGrow_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionShrinkGrow_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionShrinkGrow)"); + return 0; +} + +int lua_register_cocos2dx_TransitionShrinkGrow(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionShrinkGrow"); + tolua_cclass(tolua_S,"TransitionShrinkGrow","cc.TransitionShrinkGrow","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionShrinkGrow"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionShrinkGrow_constructor); + tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionShrinkGrow_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionShrinkGrow).name(); + g_luaType[typeName] = "cc.TransitionShrinkGrow"; + g_typeCast["TransitionShrinkGrow"] = "cc.TransitionShrinkGrow"; + return 1; +} + +int lua_cocos2dx_TransitionFlipX_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.TransitionFlipX",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionFlipX* ret = cocos2d::TransitionFlipX::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionFlipX",(cocos2d::TransitionFlipX*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionScene::Orientation arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionFlipX:create"); + if (!ok) { break; } + cocos2d::TransitionFlipX* ret = cocos2d::TransitionFlipX::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TransitionFlipX",(cocos2d::TransitionFlipX*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionFlipX:create",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipX_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionFlipX_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFlipX* 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_TransitionFlipX_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionFlipX(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFlipX"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFlipX:TransitionFlipX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipX_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionFlipX_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionFlipX)"); + return 0; +} + +int lua_register_cocos2dx_TransitionFlipX(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionFlipX"); + tolua_cclass(tolua_S,"TransitionFlipX","cc.TransitionFlipX","cc.TransitionSceneOriented",nullptr); + + tolua_beginmodule(tolua_S,"TransitionFlipX"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFlipX_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFlipX_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionFlipX).name(); + g_luaType[typeName] = "cc.TransitionFlipX"; + g_typeCast["TransitionFlipX"] = "cc.TransitionFlipX"; + return 1; +} + +int lua_cocos2dx_TransitionFlipY_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.TransitionFlipY",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionFlipY* ret = cocos2d::TransitionFlipY::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionFlipY",(cocos2d::TransitionFlipY*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionScene::Orientation arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionFlipY:create"); + if (!ok) { break; } + cocos2d::TransitionFlipY* ret = cocos2d::TransitionFlipY::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TransitionFlipY",(cocos2d::TransitionFlipY*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionFlipY:create",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipY_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionFlipY_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFlipY* 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_TransitionFlipY_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionFlipY(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFlipY"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFlipY:TransitionFlipY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipY_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionFlipY_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionFlipY)"); + return 0; +} + +int lua_register_cocos2dx_TransitionFlipY(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionFlipY"); + tolua_cclass(tolua_S,"TransitionFlipY","cc.TransitionFlipY","cc.TransitionSceneOriented",nullptr); + + tolua_beginmodule(tolua_S,"TransitionFlipY"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFlipY_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFlipY_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionFlipY).name(); + g_luaType[typeName] = "cc.TransitionFlipY"; + g_typeCast["TransitionFlipY"] = "cc.TransitionFlipY"; + return 1; +} + +int lua_cocos2dx_TransitionFlipAngular_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.TransitionFlipAngular",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionFlipAngular* ret = cocos2d::TransitionFlipAngular::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionFlipAngular",(cocos2d::TransitionFlipAngular*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionScene::Orientation arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionFlipAngular:create"); + if (!ok) { break; } + cocos2d::TransitionFlipAngular* ret = cocos2d::TransitionFlipAngular::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TransitionFlipAngular",(cocos2d::TransitionFlipAngular*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionFlipAngular:create",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipAngular_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionFlipAngular_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFlipAngular* 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_TransitionFlipAngular_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionFlipAngular(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFlipAngular"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFlipAngular:TransitionFlipAngular",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFlipAngular_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionFlipAngular_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionFlipAngular)"); + return 0; +} + +int lua_register_cocos2dx_TransitionFlipAngular(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionFlipAngular"); + tolua_cclass(tolua_S,"TransitionFlipAngular","cc.TransitionFlipAngular","cc.TransitionSceneOriented",nullptr); + + tolua_beginmodule(tolua_S,"TransitionFlipAngular"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFlipAngular_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFlipAngular_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionFlipAngular).name(); + g_luaType[typeName] = "cc.TransitionFlipAngular"; + g_typeCast["TransitionFlipAngular"] = "cc.TransitionFlipAngular"; + return 1; +} + +int lua_cocos2dx_TransitionZoomFlipX_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.TransitionZoomFlipX",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionZoomFlipX* ret = cocos2d::TransitionZoomFlipX::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionZoomFlipX",(cocos2d::TransitionZoomFlipX*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionScene::Orientation arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionZoomFlipX:create"); + if (!ok) { break; } + cocos2d::TransitionZoomFlipX* ret = cocos2d::TransitionZoomFlipX::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TransitionZoomFlipX",(cocos2d::TransitionZoomFlipX*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionZoomFlipX:create",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipX_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionZoomFlipX_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionZoomFlipX* 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_TransitionZoomFlipX_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionZoomFlipX(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionZoomFlipX"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionZoomFlipX:TransitionZoomFlipX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipX_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionZoomFlipX_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionZoomFlipX)"); + return 0; +} + +int lua_register_cocos2dx_TransitionZoomFlipX(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionZoomFlipX"); + tolua_cclass(tolua_S,"TransitionZoomFlipX","cc.TransitionZoomFlipX","cc.TransitionSceneOriented",nullptr); + + tolua_beginmodule(tolua_S,"TransitionZoomFlipX"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionZoomFlipX_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionZoomFlipX_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionZoomFlipX).name(); + g_luaType[typeName] = "cc.TransitionZoomFlipX"; + g_typeCast["TransitionZoomFlipX"] = "cc.TransitionZoomFlipX"; + return 1; +} + +int lua_cocos2dx_TransitionZoomFlipY_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.TransitionZoomFlipY",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionZoomFlipY* ret = cocos2d::TransitionZoomFlipY::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionZoomFlipY",(cocos2d::TransitionZoomFlipY*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionScene::Orientation arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionZoomFlipY:create"); + if (!ok) { break; } + cocos2d::TransitionZoomFlipY* ret = cocos2d::TransitionZoomFlipY::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TransitionZoomFlipY",(cocos2d::TransitionZoomFlipY*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionZoomFlipY:create",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipY_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionZoomFlipY_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionZoomFlipY* 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_TransitionZoomFlipY_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionZoomFlipY(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionZoomFlipY"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionZoomFlipY:TransitionZoomFlipY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipY_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionZoomFlipY_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionZoomFlipY)"); + return 0; +} + +int lua_register_cocos2dx_TransitionZoomFlipY(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionZoomFlipY"); + tolua_cclass(tolua_S,"TransitionZoomFlipY","cc.TransitionZoomFlipY","cc.TransitionSceneOriented",nullptr); + + tolua_beginmodule(tolua_S,"TransitionZoomFlipY"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionZoomFlipY_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionZoomFlipY_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionZoomFlipY).name(); + g_luaType[typeName] = "cc.TransitionZoomFlipY"; + g_typeCast["TransitionZoomFlipY"] = "cc.TransitionZoomFlipY"; + return 1; +} + +int lua_cocos2dx_TransitionZoomFlipAngular_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.TransitionZoomFlipAngular",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionZoomFlipAngular* ret = cocos2d::TransitionZoomFlipAngular::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionZoomFlipAngular",(cocos2d::TransitionZoomFlipAngular*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionScene::Orientation arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionZoomFlipAngular:create"); + if (!ok) { break; } + cocos2d::TransitionZoomFlipAngular* ret = cocos2d::TransitionZoomFlipAngular::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TransitionZoomFlipAngular",(cocos2d::TransitionZoomFlipAngular*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionZoomFlipAngular:create",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipAngular_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionZoomFlipAngular_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionZoomFlipAngular* 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_TransitionZoomFlipAngular_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionZoomFlipAngular(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionZoomFlipAngular"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionZoomFlipAngular:TransitionZoomFlipAngular",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionZoomFlipAngular_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionZoomFlipAngular_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionZoomFlipAngular)"); + return 0; +} + +int lua_register_cocos2dx_TransitionZoomFlipAngular(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionZoomFlipAngular"); + tolua_cclass(tolua_S,"TransitionZoomFlipAngular","cc.TransitionZoomFlipAngular","cc.TransitionSceneOriented",nullptr); + + tolua_beginmodule(tolua_S,"TransitionZoomFlipAngular"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionZoomFlipAngular_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionZoomFlipAngular_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionZoomFlipAngular).name(); + g_luaType[typeName] = "cc.TransitionZoomFlipAngular"; + g_typeCast["TransitionZoomFlipAngular"] = "cc.TransitionZoomFlipAngular"; + return 1; +} + +int lua_cocos2dx_TransitionFade_initWithDuration(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFade* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionFade",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::TransitionFade*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionFade_initWithDuration'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFade:initWithDuration"); + + if (!ok) { break; } + cocos2d::Scene* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + + if (!ok) { break; } + bool ret = cobj->initWithDuration(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFade:initWithDuration"); + + if (!ok) { break; } + cocos2d::Scene* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + + if (!ok) { break; } + cocos2d::Color3B arg2; + ok &= luaval_to_color3b(tolua_S, 4, &arg2, "cc.TransitionFade:initWithDuration"); + + if (!ok) { break; } + bool ret = cobj->initWithDuration(arg0, arg1, arg2); + 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.TransitionFade:initWithDuration",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFade_initWithDuration'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionFade_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.TransitionFade",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::TransitionFade* ret = cocos2d::TransitionFade::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionFade",(cocos2d::TransitionFade*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + double arg0; + 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); + if (!ok) { break; } + cocos2d::Color3B arg2; + ok &= luaval_to_color3b(tolua_S, 4, &arg2, "cc.TransitionFade:create"); + if (!ok) { break; } + cocos2d::TransitionFade* ret = cocos2d::TransitionFade::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TransitionFade",(cocos2d::TransitionFade*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.TransitionFade:create",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFade_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionFade_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFade* 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_TransitionFade_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionFade(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFade"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFade:TransitionFade",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFade_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionFade_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionFade)"); + return 0; +} + +int lua_register_cocos2dx_TransitionFade(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionFade"); + tolua_cclass(tolua_S,"TransitionFade","cc.TransitionFade","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionFade"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFade_constructor); + tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_TransitionFade_initWithDuration); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFade_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionFade).name(); + g_luaType[typeName] = "cc.TransitionFade"; + g_typeCast["TransitionFade"] = "cc.TransitionFade"; + return 1; +} + +int lua_cocos2dx_TransitionCrossFade_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.TransitionCrossFade",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionCrossFade_create'", nullptr); + return 0; + } + cocos2d::TransitionCrossFade* ret = cocos2d::TransitionCrossFade::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionCrossFade",(cocos2d::TransitionCrossFade*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionCrossFade:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionCrossFade_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionCrossFade_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionCrossFade* 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_TransitionCrossFade_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionCrossFade(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionCrossFade"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionCrossFade:TransitionCrossFade",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionCrossFade_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionCrossFade_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionCrossFade)"); + return 0; +} + +int lua_register_cocos2dx_TransitionCrossFade(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionCrossFade"); + tolua_cclass(tolua_S,"TransitionCrossFade","cc.TransitionCrossFade","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionCrossFade"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionCrossFade_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionCrossFade_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionCrossFade).name(); + g_luaType[typeName] = "cc.TransitionCrossFade"; + g_typeCast["TransitionCrossFade"] = "cc.TransitionCrossFade"; + return 1; +} + +int lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionTurnOffTiles* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionTurnOffTiles",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionTurnOffTiles*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionInterval* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionTurnOffTiles:easeActionWithAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionTurnOffTiles_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.TransitionTurnOffTiles",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionTurnOffTiles_create'", nullptr); + return 0; + } + cocos2d::TransitionTurnOffTiles* ret = cocos2d::TransitionTurnOffTiles::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionTurnOffTiles",(cocos2d::TransitionTurnOffTiles*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionTurnOffTiles:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionTurnOffTiles_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionTurnOffTiles_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionTurnOffTiles* 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_TransitionTurnOffTiles_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionTurnOffTiles(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionTurnOffTiles"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionTurnOffTiles:TransitionTurnOffTiles",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionTurnOffTiles_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionTurnOffTiles_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionTurnOffTiles)"); + return 0; +} + +int lua_register_cocos2dx_TransitionTurnOffTiles(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionTurnOffTiles"); + tolua_cclass(tolua_S,"TransitionTurnOffTiles","cc.TransitionTurnOffTiles","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionTurnOffTiles"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionTurnOffTiles_constructor); + tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionTurnOffTiles_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionTurnOffTiles).name(); + g_luaType[typeName] = "cc.TransitionTurnOffTiles"; + g_typeCast["TransitionTurnOffTiles"] = "cc.TransitionTurnOffTiles"; + return 1; +} + +int lua_cocos2dx_TransitionSplitCols_action(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSplitCols* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionSplitCols",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionSplitCols*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSplitCols_action'", 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_TransitionSplitCols_action'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->action(); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSplitCols:action",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitCols_action'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionSplitCols_easeActionWithAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSplitCols* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionSplitCols",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionSplitCols*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionSplitCols_easeActionWithAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionInterval* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSplitCols_easeActionWithAction'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSplitCols:easeActionWithAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitCols_easeActionWithAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionSplitCols_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.TransitionSplitCols",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSplitCols_create'", nullptr); + return 0; + } + cocos2d::TransitionSplitCols* ret = cocos2d::TransitionSplitCols::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionSplitCols",(cocos2d::TransitionSplitCols*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSplitCols:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitCols_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionSplitCols_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSplitCols* 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_TransitionSplitCols_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionSplitCols(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSplitCols"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSplitCols:TransitionSplitCols",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitCols_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionSplitCols_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionSplitCols)"); + return 0; +} + +int lua_register_cocos2dx_TransitionSplitCols(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionSplitCols"); + tolua_cclass(tolua_S,"TransitionSplitCols","cc.TransitionSplitCols","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionSplitCols"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSplitCols_constructor); + tolua_function(tolua_S,"action",lua_cocos2dx_TransitionSplitCols_action); + tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionSplitCols_easeActionWithAction); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSplitCols_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionSplitCols).name(); + g_luaType[typeName] = "cc.TransitionSplitCols"; + g_typeCast["TransitionSplitCols"] = "cc.TransitionSplitCols"; + return 1; +} + +int lua_cocos2dx_TransitionSplitRows_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.TransitionSplitRows",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSplitRows_create'", nullptr); + return 0; + } + cocos2d::TransitionSplitRows* ret = cocos2d::TransitionSplitRows::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionSplitRows",(cocos2d::TransitionSplitRows*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionSplitRows:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitRows_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionSplitRows_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionSplitRows* 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_TransitionSplitRows_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionSplitRows(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionSplitRows"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionSplitRows:TransitionSplitRows",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionSplitRows_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionSplitRows_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionSplitRows)"); + return 0; +} + +int lua_register_cocos2dx_TransitionSplitRows(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionSplitRows"); + tolua_cclass(tolua_S,"TransitionSplitRows","cc.TransitionSplitRows","cc.TransitionSplitCols",nullptr); + + tolua_beginmodule(tolua_S,"TransitionSplitRows"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionSplitRows_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionSplitRows_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionSplitRows).name(); + g_luaType[typeName] = "cc.TransitionSplitRows"; + g_typeCast["TransitionSplitRows"] = "cc.TransitionSplitRows"; + return 1; +} + +int lua_cocos2dx_TransitionFadeTR_easeActionWithAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFadeTR* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionFadeTR",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionFadeTR*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionFadeTR_easeActionWithAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionInterval* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeTR_easeActionWithAction'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->easeActionWithAction(arg0); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeTR:easeActionWithAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeTR_easeActionWithAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionFadeTR_actionWithSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFadeTR* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionFadeTR",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionFadeTR*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionFadeTR_actionWithSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Size arg0; + + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TransitionFadeTR:actionWithSize"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeTR_actionWithSize'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->actionWithSize(arg0); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeTR:actionWithSize",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeTR_actionWithSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionFadeTR_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.TransitionFadeTR",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeTR_create'", nullptr); + return 0; + } + cocos2d::TransitionFadeTR* ret = cocos2d::TransitionFadeTR::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionFadeTR",(cocos2d::TransitionFadeTR*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionFadeTR:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeTR_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionFadeTR_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFadeTR* 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_TransitionFadeTR_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionFadeTR(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFadeTR"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeTR:TransitionFadeTR",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeTR_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionFadeTR_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionFadeTR)"); + return 0; +} + +int lua_register_cocos2dx_TransitionFadeTR(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionFadeTR"); + tolua_cclass(tolua_S,"TransitionFadeTR","cc.TransitionFadeTR","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionFadeTR"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFadeTR_constructor); + tolua_function(tolua_S,"easeActionWithAction",lua_cocos2dx_TransitionFadeTR_easeActionWithAction); + tolua_function(tolua_S,"actionWithSize",lua_cocos2dx_TransitionFadeTR_actionWithSize); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFadeTR_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionFadeTR).name(); + g_luaType[typeName] = "cc.TransitionFadeTR"; + g_typeCast["TransitionFadeTR"] = "cc.TransitionFadeTR"; + return 1; +} + +int lua_cocos2dx_TransitionFadeBL_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.TransitionFadeBL",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeBL_create'", nullptr); + return 0; + } + cocos2d::TransitionFadeBL* ret = cocos2d::TransitionFadeBL::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionFadeBL",(cocos2d::TransitionFadeBL*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionFadeBL:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeBL_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionFadeBL_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFadeBL* 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_TransitionFadeBL_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionFadeBL(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFadeBL"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeBL:TransitionFadeBL",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeBL_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionFadeBL_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionFadeBL)"); + return 0; +} + +int lua_register_cocos2dx_TransitionFadeBL(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionFadeBL"); + tolua_cclass(tolua_S,"TransitionFadeBL","cc.TransitionFadeBL","cc.TransitionFadeTR",nullptr); + + tolua_beginmodule(tolua_S,"TransitionFadeBL"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFadeBL_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFadeBL_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionFadeBL).name(); + g_luaType[typeName] = "cc.TransitionFadeBL"; + g_typeCast["TransitionFadeBL"] = "cc.TransitionFadeBL"; + return 1; +} + +int lua_cocos2dx_TransitionFadeUp_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.TransitionFadeUp",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeUp_create'", nullptr); + return 0; + } + cocos2d::TransitionFadeUp* ret = cocos2d::TransitionFadeUp::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionFadeUp",(cocos2d::TransitionFadeUp*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionFadeUp:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeUp_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionFadeUp_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFadeUp* 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_TransitionFadeUp_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionFadeUp(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFadeUp"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeUp:TransitionFadeUp",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeUp_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionFadeUp_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionFadeUp)"); + return 0; +} + +int lua_register_cocos2dx_TransitionFadeUp(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionFadeUp"); + tolua_cclass(tolua_S,"TransitionFadeUp","cc.TransitionFadeUp","cc.TransitionFadeTR",nullptr); + + tolua_beginmodule(tolua_S,"TransitionFadeUp"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFadeUp_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFadeUp_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionFadeUp).name(); + g_luaType[typeName] = "cc.TransitionFadeUp"; + g_typeCast["TransitionFadeUp"] = "cc.TransitionFadeUp"; + return 1; +} + +int lua_cocos2dx_TransitionFadeDown_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.TransitionFadeDown",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeDown_create'", nullptr); + return 0; + } + cocos2d::TransitionFadeDown* ret = cocos2d::TransitionFadeDown::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionFadeDown",(cocos2d::TransitionFadeDown*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionFadeDown:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeDown_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionFadeDown_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionFadeDown* 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_TransitionFadeDown_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionFadeDown(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionFadeDown"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionFadeDown:TransitionFadeDown",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionFadeDown_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionFadeDown_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionFadeDown)"); + return 0; +} + +int lua_register_cocos2dx_TransitionFadeDown(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionFadeDown"); + tolua_cclass(tolua_S,"TransitionFadeDown","cc.TransitionFadeDown","cc.TransitionFadeTR",nullptr); + + tolua_beginmodule(tolua_S,"TransitionFadeDown"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionFadeDown_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionFadeDown_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionFadeDown).name(); + g_luaType[typeName] = "cc.TransitionFadeDown"; + g_typeCast["TransitionFadeDown"] = "cc.TransitionFadeDown"; + return 1; +} + +int lua_cocos2dx_TransitionPageTurn_actionWithSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionPageTurn* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionPageTurn",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionPageTurn*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionPageTurn_actionWithSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Size arg0; + + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TransitionPageTurn:actionWithSize"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionPageTurn_actionWithSize'", nullptr); + return 0; + } + cocos2d::ActionInterval* ret = cobj->actionWithSize(arg0); + object_to_luaval(tolua_S, "cc.ActionInterval",(cocos2d::ActionInterval*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionPageTurn:actionWithSize",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionPageTurn_actionWithSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionPageTurn_initWithDuration(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionPageTurn* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TransitionPageTurn",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TransitionPageTurn*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionPageTurn_initWithDuration'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + double arg0; + cocos2d::Scene* arg1; + bool arg2; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionPageTurn:initWithDuration"); + + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + + ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.TransitionPageTurn:initWithDuration"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionPageTurn_initWithDuration'", nullptr); + return 0; + } + bool ret = cobj->initWithDuration(arg0, arg1, arg2); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionPageTurn:initWithDuration",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionPageTurn_initWithDuration'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TransitionPageTurn_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.TransitionPageTurn",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 3) + { + double arg0; + 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_boolean(tolua_S, 4,&arg2, "cc.TransitionPageTurn:create"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionPageTurn_create'", nullptr); + return 0; + } + cocos2d::TransitionPageTurn* ret = cocos2d::TransitionPageTurn::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TransitionPageTurn",(cocos2d::TransitionPageTurn*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionPageTurn:create",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionPageTurn_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionPageTurn_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionPageTurn* 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_TransitionPageTurn_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionPageTurn(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionPageTurn"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionPageTurn:TransitionPageTurn",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionPageTurn_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionPageTurn_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionPageTurn)"); + return 0; +} + +int lua_register_cocos2dx_TransitionPageTurn(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionPageTurn"); + tolua_cclass(tolua_S,"TransitionPageTurn","cc.TransitionPageTurn","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionPageTurn"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionPageTurn_constructor); + tolua_function(tolua_S,"actionWithSize",lua_cocos2dx_TransitionPageTurn_actionWithSize); + tolua_function(tolua_S,"initWithDuration",lua_cocos2dx_TransitionPageTurn_initWithDuration); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionPageTurn_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionPageTurn).name(); + g_luaType[typeName] = "cc.TransitionPageTurn"; + g_typeCast["TransitionPageTurn"] = "cc.TransitionPageTurn"; + return 1; +} + +int lua_cocos2dx_TransitionProgress_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.TransitionProgress",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgress_create'", nullptr); + return 0; + } + cocos2d::TransitionProgress* ret = cocos2d::TransitionProgress::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionProgress",(cocos2d::TransitionProgress*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgress:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgress_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionProgress_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionProgress* 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_TransitionProgress_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionProgress(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgress"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgress:TransitionProgress",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgress_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionProgress_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionProgress)"); + return 0; +} + +int lua_register_cocos2dx_TransitionProgress(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionProgress"); + tolua_cclass(tolua_S,"TransitionProgress","cc.TransitionProgress","cc.TransitionScene",nullptr); + + tolua_beginmodule(tolua_S,"TransitionProgress"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgress_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgress_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionProgress).name(); + g_luaType[typeName] = "cc.TransitionProgress"; + g_typeCast["TransitionProgress"] = "cc.TransitionProgress"; + return 1; +} + +int lua_cocos2dx_TransitionProgressRadialCCW_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.TransitionProgressRadialCCW",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressRadialCCW_create'", nullptr); + return 0; + } + cocos2d::TransitionProgressRadialCCW* ret = cocos2d::TransitionProgressRadialCCW::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionProgressRadialCCW",(cocos2d::TransitionProgressRadialCCW*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressRadialCCW:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressRadialCCW_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionProgressRadialCCW_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionProgressRadialCCW* 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_TransitionProgressRadialCCW_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionProgressRadialCCW(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressRadialCCW"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressRadialCCW:TransitionProgressRadialCCW",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressRadialCCW_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionProgressRadialCCW_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionProgressRadialCCW)"); + return 0; +} + +int lua_register_cocos2dx_TransitionProgressRadialCCW(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionProgressRadialCCW"); + tolua_cclass(tolua_S,"TransitionProgressRadialCCW","cc.TransitionProgressRadialCCW","cc.TransitionProgress",nullptr); + + tolua_beginmodule(tolua_S,"TransitionProgressRadialCCW"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressRadialCCW_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressRadialCCW_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionProgressRadialCCW).name(); + g_luaType[typeName] = "cc.TransitionProgressRadialCCW"; + g_typeCast["TransitionProgressRadialCCW"] = "cc.TransitionProgressRadialCCW"; + return 1; +} + +int lua_cocos2dx_TransitionProgressRadialCW_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.TransitionProgressRadialCW",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressRadialCW_create'", nullptr); + return 0; + } + cocos2d::TransitionProgressRadialCW* ret = cocos2d::TransitionProgressRadialCW::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionProgressRadialCW",(cocos2d::TransitionProgressRadialCW*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressRadialCW:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressRadialCW_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionProgressRadialCW_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionProgressRadialCW* 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_TransitionProgressRadialCW_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionProgressRadialCW(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressRadialCW"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressRadialCW:TransitionProgressRadialCW",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressRadialCW_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionProgressRadialCW_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionProgressRadialCW)"); + return 0; +} + +int lua_register_cocos2dx_TransitionProgressRadialCW(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionProgressRadialCW"); + tolua_cclass(tolua_S,"TransitionProgressRadialCW","cc.TransitionProgressRadialCW","cc.TransitionProgress",nullptr); + + tolua_beginmodule(tolua_S,"TransitionProgressRadialCW"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressRadialCW_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressRadialCW_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionProgressRadialCW).name(); + g_luaType[typeName] = "cc.TransitionProgressRadialCW"; + g_typeCast["TransitionProgressRadialCW"] = "cc.TransitionProgressRadialCW"; + return 1; +} + +int lua_cocos2dx_TransitionProgressHorizontal_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.TransitionProgressHorizontal",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressHorizontal_create'", nullptr); + return 0; + } + cocos2d::TransitionProgressHorizontal* ret = cocos2d::TransitionProgressHorizontal::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionProgressHorizontal",(cocos2d::TransitionProgressHorizontal*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressHorizontal:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressHorizontal_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionProgressHorizontal_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionProgressHorizontal* 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_TransitionProgressHorizontal_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionProgressHorizontal(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressHorizontal"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressHorizontal:TransitionProgressHorizontal",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressHorizontal_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionProgressHorizontal_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionProgressHorizontal)"); + return 0; +} + +int lua_register_cocos2dx_TransitionProgressHorizontal(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionProgressHorizontal"); + tolua_cclass(tolua_S,"TransitionProgressHorizontal","cc.TransitionProgressHorizontal","cc.TransitionProgress",nullptr); + + tolua_beginmodule(tolua_S,"TransitionProgressHorizontal"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressHorizontal_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressHorizontal_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionProgressHorizontal).name(); + g_luaType[typeName] = "cc.TransitionProgressHorizontal"; + g_typeCast["TransitionProgressHorizontal"] = "cc.TransitionProgressHorizontal"; + return 1; +} + +int lua_cocos2dx_TransitionProgressVertical_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.TransitionProgressVertical",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressVertical_create'", nullptr); + return 0; + } + cocos2d::TransitionProgressVertical* ret = cocos2d::TransitionProgressVertical::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionProgressVertical",(cocos2d::TransitionProgressVertical*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressVertical:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressVertical_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionProgressVertical_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionProgressVertical* 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_TransitionProgressVertical_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionProgressVertical(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressVertical"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressVertical:TransitionProgressVertical",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressVertical_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionProgressVertical_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionProgressVertical)"); + return 0; +} + +int lua_register_cocos2dx_TransitionProgressVertical(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionProgressVertical"); + tolua_cclass(tolua_S,"TransitionProgressVertical","cc.TransitionProgressVertical","cc.TransitionProgress",nullptr); + + tolua_beginmodule(tolua_S,"TransitionProgressVertical"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressVertical_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressVertical_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionProgressVertical).name(); + g_luaType[typeName] = "cc.TransitionProgressVertical"; + g_typeCast["TransitionProgressVertical"] = "cc.TransitionProgressVertical"; + return 1; +} + +int lua_cocos2dx_TransitionProgressInOut_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.TransitionProgressInOut",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressInOut_create'", nullptr); + return 0; + } + cocos2d::TransitionProgressInOut* ret = cocos2d::TransitionProgressInOut::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionProgressInOut",(cocos2d::TransitionProgressInOut*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressInOut:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressInOut_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionProgressInOut_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionProgressInOut* 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_TransitionProgressInOut_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionProgressInOut(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressInOut"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressInOut:TransitionProgressInOut",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressInOut_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionProgressInOut_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionProgressInOut)"); + return 0; +} + +int lua_register_cocos2dx_TransitionProgressInOut(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionProgressInOut"); + tolua_cclass(tolua_S,"TransitionProgressInOut","cc.TransitionProgressInOut","cc.TransitionProgress",nullptr); + + tolua_beginmodule(tolua_S,"TransitionProgressInOut"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressInOut_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressInOut_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionProgressInOut).name(); + g_luaType[typeName] = "cc.TransitionProgressInOut"; + g_typeCast["TransitionProgressInOut"] = "cc.TransitionProgressInOut"; + return 1; +} + +int lua_cocos2dx_TransitionProgressOutIn_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.TransitionProgressOutIn",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + 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); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressOutIn_create'", nullptr); + return 0; + } + cocos2d::TransitionProgressOutIn* ret = cocos2d::TransitionProgressOutIn::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.TransitionProgressOutIn",(cocos2d::TransitionProgressOutIn*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TransitionProgressOutIn:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressOutIn_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_TransitionProgressOutIn_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TransitionProgressOutIn* 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_TransitionProgressOutIn_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::TransitionProgressOutIn(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TransitionProgressOutIn"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionProgressOutIn:TransitionProgressOutIn",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionProgressOutIn_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_TransitionProgressOutIn_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (TransitionProgressOutIn)"); + return 0; +} + +int lua_register_cocos2dx_TransitionProgressOutIn(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.TransitionProgressOutIn"); + tolua_cclass(tolua_S,"TransitionProgressOutIn","cc.TransitionProgressOutIn","cc.TransitionProgress",nullptr); + + tolua_beginmodule(tolua_S,"TransitionProgressOutIn"); + tolua_function(tolua_S,"new",lua_cocos2dx_TransitionProgressOutIn_constructor); + tolua_function(tolua_S,"create", lua_cocos2dx_TransitionProgressOutIn_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::TransitionProgressOutIn).name(); + g_luaType[typeName] = "cc.TransitionProgressOutIn"; + g_typeCast["TransitionProgressOutIn"] = "cc.TransitionProgressOutIn"; + return 1; +} + +int lua_cocos2dx_Camera_setScene(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_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); + 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_getProjectionMatrix'", nullptr); + return 0; + } + 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:getProjectionMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getProjectionMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getViewProjectionMatrix(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_getViewProjectionMatrix'", 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_getViewProjectionMatrix'", nullptr); + return 0; + } + const cocos2d::Mat4& ret = cobj->getViewProjectionMatrix(); + 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:getViewProjectionMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getViewProjectionMatrix'.",&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 + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getViewMatrix'", nullptr); + return 0; + } + 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:getViewMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getViewMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getCameraFlag(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_getCameraFlag'", 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_getCameraFlag'", nullptr); + return 0; + } + int ret = (int)cobj->getCameraFlag(); + 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:getCameraFlag",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getCameraFlag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getType(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_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_Camera_getType'", nullptr); + return 0; + } + int ret = (int)cobj->getType(); + 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:getType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getType'.",&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; +} +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_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; + 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_isVisibleInFrustum'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + const cocos2d::AABB* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.AABB",&arg0); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_isVisibleInFrustum'", nullptr); + return 0; + } + bool ret = cobj->isVisibleInFrustum(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.Camera:isVisibleInFrustum",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_isVisibleInFrustum'.",&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_initOrthographic(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_initOrthographic'", 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:initOrthographic"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:initOrthographic"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:initOrthographic"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:initOrthographic"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_initOrthographic'", nullptr); + return 0; + } + bool ret = cobj->initOrthographic(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:initOrthographic",argc, 4); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_initOrthographic'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_setAdditionalProjection(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_setAdditionalProjection'", 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:setAdditionalProjection"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setAdditionalProjection'", nullptr); + return 0; + } + cobj->setAdditionalProjection(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:setAdditionalProjection",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setAdditionalProjection'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getDepth(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_getDepth'", 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_getDepth'", nullptr); + return 0; + } + 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:getDepth",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDepth'.",&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_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.Camera",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_Camera_create'", nullptr); + return 0; + } + cocos2d::Camera* ret = cocos2d::Camera::create(); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Camera_createPerspective(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.Camera",0,&tolua_err)) goto tolua_lerror; +#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:createPerspective"); + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:createPerspective"); + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:createPerspective"); + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:createPerspective"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_createPerspective'", nullptr); + return 0; + } + cocos2d::Camera* ret = cocos2d::Camera::createPerspective(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:createPerspective",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_createPerspective'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Camera_createOrthographic(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.Camera",0,&tolua_err)) goto tolua_lerror; +#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:createOrthographic"); + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:createOrthographic"); + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:createOrthographic"); + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:createOrthographic"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_createOrthographic'", nullptr); + return 0; + } + cocos2d::Camera* ret = cocos2d::Camera::createOrthographic(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:createOrthographic",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_createOrthographic'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Camera_getDefaultCamera(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.Camera",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_Camera_getDefaultCamera'", nullptr); + return 0; + } + cocos2d::Camera* ret = cocos2d::Camera::getDefaultCamera(); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:getDefaultCamera",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDefaultCamera'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Camera_getVisitingCamera(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.Camera",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_Camera_getVisitingCamera'", nullptr); + return 0; + } + const cocos2d::Camera* ret = cocos2d::Camera::getVisitingCamera(); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:getVisitingCamera",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getVisitingCamera'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Camera_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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_Camera_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Camera(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Camera"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:Camera",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Camera_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Camera)"); + return 0; +} + +int lua_register_cocos2dx_Camera(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Camera"); + tolua_cclass(tolua_S,"Camera","cc.Camera","cc.Node",nullptr); + + 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,"getViewProjectionMatrix",lua_cocos2dx_Camera_getViewProjectionMatrix); + tolua_function(tolua_S,"getViewMatrix",lua_cocos2dx_Camera_getViewMatrix); + 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,"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,"initOrthographic",lua_cocos2dx_Camera_initOrthographic); + 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,"create", lua_cocos2dx_Camera_create); + tolua_function(tolua_S,"createPerspective", lua_cocos2dx_Camera_createPerspective); + tolua_function(tolua_S,"createOrthographic", lua_cocos2dx_Camera_createOrthographic); + tolua_function(tolua_S,"getDefaultCamera", lua_cocos2dx_Camera_getDefaultCamera); + tolua_function(tolua_S,"getVisitingCamera", lua_cocos2dx_Camera_getVisitingCamera); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Camera).name(); + g_luaType[typeName] = "cc.Camera"; + g_typeCast["Camera"] = "cc.Camera"; + return 1; +} + int lua_cocos2dx_GridBase_setGridSize(lua_State* tolua_S) { int argc = 0; @@ -75691,1135 +77065,6 @@ int lua_register_cocos2dx_TiledGrid3D(lua_State* tolua_S) return 1; } -int lua_cocos2dx_Camera_setScene(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_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); - 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_getProjectionMatrix'", nullptr); - return 0; - } - 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:getProjectionMatrix",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getProjectionMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_getViewProjectionMatrix(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_getViewProjectionMatrix'", 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_getViewProjectionMatrix'", nullptr); - return 0; - } - const cocos2d::Mat4& ret = cobj->getViewProjectionMatrix(); - 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:getViewProjectionMatrix",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getViewProjectionMatrix'.",&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 - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getViewMatrix'", nullptr); - return 0; - } - 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:getViewMatrix",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getViewMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_getCameraFlag(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_getCameraFlag'", 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_getCameraFlag'", nullptr); - return 0; - } - int ret = (int)cobj->getCameraFlag(); - 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:getCameraFlag",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getCameraFlag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_getType(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_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_Camera_getType'", nullptr); - return 0; - } - int ret = (int)cobj->getType(); - 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:getType",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getType'.",&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; -} -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_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; - 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_isVisibleInFrustum'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - const cocos2d::AABB* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.AABB",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_isVisibleInFrustum'", nullptr); - return 0; - } - bool ret = cobj->isVisibleInFrustum(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.Camera:isVisibleInFrustum",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_isVisibleInFrustum'.",&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_initOrthographic(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_initOrthographic'", 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:initOrthographic"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:initOrthographic"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:initOrthographic"); - - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:initOrthographic"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_initOrthographic'", nullptr); - return 0; - } - bool ret = cobj->initOrthographic(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:initOrthographic",argc, 4); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_initOrthographic'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_setAdditionalProjection(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_setAdditionalProjection'", 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:setAdditionalProjection"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setAdditionalProjection'", nullptr); - return 0; - } - cobj->setAdditionalProjection(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:setAdditionalProjection",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setAdditionalProjection'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_getDepth(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_getDepth'", 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_getDepth'", nullptr); - return 0; - } - 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:getDepth",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDepth'.",&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_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.Camera",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_Camera_create'", nullptr); - return 0; - } - cocos2d::Camera* ret = cocos2d::Camera::create(); - object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:create",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Camera_createPerspective(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.Camera",0,&tolua_err)) goto tolua_lerror; -#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:createPerspective"); - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:createPerspective"); - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:createPerspective"); - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:createPerspective"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_createPerspective'", nullptr); - return 0; - } - cocos2d::Camera* ret = cocos2d::Camera::createPerspective(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:createPerspective",argc, 4); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_createPerspective'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Camera_createOrthographic(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.Camera",0,&tolua_err)) goto tolua_lerror; -#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:createOrthographic"); - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:createOrthographic"); - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:createOrthographic"); - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:createOrthographic"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_createOrthographic'", nullptr); - return 0; - } - cocos2d::Camera* ret = cocos2d::Camera::createOrthographic(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:createOrthographic",argc, 4); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_createOrthographic'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Camera_getDefaultCamera(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.Camera",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_Camera_getDefaultCamera'", nullptr); - return 0; - } - cocos2d::Camera* ret = cocos2d::Camera::getDefaultCamera(); - object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:getDefaultCamera",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDefaultCamera'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Camera_getVisitingCamera(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.Camera",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_Camera_getVisitingCamera'", nullptr); - return 0; - } - const cocos2d::Camera* ret = cocos2d::Camera::getVisitingCamera(); - object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:getVisitingCamera",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getVisitingCamera'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Camera_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* 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_Camera_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::Camera(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Camera"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:Camera",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Camera_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Camera)"); - return 0; -} - -int lua_register_cocos2dx_Camera(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Camera"); - tolua_cclass(tolua_S,"Camera","cc.Camera","cc.Node",nullptr); - - 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,"getViewProjectionMatrix",lua_cocos2dx_Camera_getViewProjectionMatrix); - tolua_function(tolua_S,"getViewMatrix",lua_cocos2dx_Camera_getViewMatrix); - 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,"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,"initOrthographic",lua_cocos2dx_Camera_initOrthographic); - 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,"create", lua_cocos2dx_Camera_create); - tolua_function(tolua_S,"createPerspective", lua_cocos2dx_Camera_createPerspective); - tolua_function(tolua_S,"createOrthographic", lua_cocos2dx_Camera_createOrthographic); - tolua_function(tolua_S,"getDefaultCamera", lua_cocos2dx_Camera_getDefaultCamera); - tolua_function(tolua_S,"getVisitingCamera", lua_cocos2dx_Camera_getVisitingCamera); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Camera).name(); - g_luaType[typeName] = "cc.Camera"; - g_typeCast["Camera"] = "cc.Camera"; - return 1; -} - int lua_cocos2dx_BaseLight_setEnabled(lua_State* tolua_S) { int argc = 0; @@ -87445,182 +87690,6 @@ int lua_register_cocos2dx_Component(lua_State* tolua_S) return 1; } -int lua_cocos2dx_AsyncTaskPool_stopTasks(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AsyncTaskPool* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.AsyncTaskPool",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AsyncTaskPool*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AsyncTaskPool_stopTasks'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::AsyncTaskPool::TaskType arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AsyncTaskPool:stopTasks"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_AsyncTaskPool_stopTasks'", nullptr); - return 0; - } - cobj->stopTasks(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.AsyncTaskPool:stopTasks",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AsyncTaskPool_stopTasks'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AsyncTaskPool_destoryInstance(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.AsyncTaskPool",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_AsyncTaskPool_destoryInstance'", nullptr); - return 0; - } - cocos2d::AsyncTaskPool::destoryInstance(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AsyncTaskPool:destoryInstance",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AsyncTaskPool_destoryInstance'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_AsyncTaskPool_getInstance(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.AsyncTaskPool",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_AsyncTaskPool_getInstance'", nullptr); - return 0; - } - cocos2d::AsyncTaskPool* ret = cocos2d::AsyncTaskPool::getInstance(); - object_to_luaval(tolua_S, "cc.AsyncTaskPool",(cocos2d::AsyncTaskPool*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AsyncTaskPool:getInstance",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AsyncTaskPool_getInstance'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_AsyncTaskPool_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AsyncTaskPool* 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_AsyncTaskPool_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::AsyncTaskPool(); - tolua_pushusertype(tolua_S,(void*)cobj,"cc.AsyncTaskPool"); - 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.AsyncTaskPool:AsyncTaskPool",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AsyncTaskPool_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_AsyncTaskPool_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (AsyncTaskPool)"); - return 0; -} - -int lua_register_cocos2dx_AsyncTaskPool(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.AsyncTaskPool"); - tolua_cclass(tolua_S,"AsyncTaskPool","cc.AsyncTaskPool","",nullptr); - - tolua_beginmodule(tolua_S,"AsyncTaskPool"); - tolua_function(tolua_S,"new",lua_cocos2dx_AsyncTaskPool_constructor); - tolua_function(tolua_S,"stopTasks",lua_cocos2dx_AsyncTaskPool_stopTasks); - tolua_function(tolua_S,"destoryInstance", lua_cocos2dx_AsyncTaskPool_destoryInstance); - tolua_function(tolua_S,"getInstance", lua_cocos2dx_AsyncTaskPool_getInstance); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::AsyncTaskPool).name(); - g_luaType[typeName] = "cc.AsyncTaskPool"; - g_typeCast["AsyncTaskPool"] = "cc.AsyncTaskPool"; - return 1; -} - int lua_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist(lua_State* tolua_S) { int argc = 0; @@ -87954,15 +88023,17 @@ 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_EventListenerMouse(tolua_S); + lua_register_cocos2dx_ActionEase(tolua_S); + lua_register_cocos2dx_EaseBounce(tolua_S); + lua_register_cocos2dx_EaseBounceIn(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); lua_register_cocos2dx_EaseBackOut(tolua_S); + lua_register_cocos2dx_Texture2D(tolua_S); lua_register_cocos2dx_TransitionSceneOriented(tolua_S); lua_register_cocos2dx_TransitionFlipX(tolua_S); lua_register_cocos2dx_GridAction(tolua_S); @@ -87971,7 +88042,6 @@ 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_ParticleBatchNode(tolua_S); lua_register_cocos2dx_SkewTo(tolua_S); lua_register_cocos2dx_SkewBy(tolua_S); lua_register_cocos2dx_EaseQuadraticActionOut(tolua_S); @@ -87992,7 +88062,6 @@ 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); @@ -88005,11 +88074,13 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_MenuItemSprite(tolua_S); lua_register_cocos2dx_MenuItemImage(tolua_S); lua_register_cocos2dx_ParticleFire(tolua_S); + lua_register_cocos2dx_ParticleSmoke(tolua_S); lua_register_cocos2dx_TransitionZoomFlipAngular(tolua_S); lua_register_cocos2dx_EaseRateAction(tolua_S); lua_register_cocos2dx_EaseIn(tolua_S); lua_register_cocos2dx_EaseExponentialInOut(tolua_S); - lua_register_cocos2dx_EaseBackInOut(tolua_S); + lua_register_cocos2dx_CardinalSplineTo(tolua_S); + lua_register_cocos2dx_CatmullRomTo(tolua_S); lua_register_cocos2dx_Waves3D(tolua_S); lua_register_cocos2dx_EaseExponentialOut(tolua_S); lua_register_cocos2dx_SpriteBatchNode(tolua_S); @@ -88021,12 +88092,12 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_ParticleSnow(tolua_S); lua_register_cocos2dx_EaseElasticIn(tolua_S); lua_register_cocos2dx_EaseCircleActionInOut(tolua_S); + lua_register_cocos2dx_TransitionFadeTR(tolua_S); lua_register_cocos2dx_EaseQuarticActionOut(tolua_S); lua_register_cocos2dx_EventAcceleration(tolua_S); lua_register_cocos2dx_EaseCubicActionIn(tolua_S); lua_register_cocos2dx_TextureCache(tolua_S); lua_register_cocos2dx_ActionTween(tolua_S); - lua_register_cocos2dx_TransitionFadeTR(tolua_S); lua_register_cocos2dx_TransitionFadeDown(tolua_S); lua_register_cocos2dx_ParticleSun(tolua_S); lua_register_cocos2dx_TransitionProgressHorizontal(tolua_S); @@ -88037,7 +88108,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_EventKeyboard(tolua_S); lua_register_cocos2dx_TransitionSplitCols(tolua_S); lua_register_cocos2dx_Timer(tolua_S); - lua_register_cocos2dx_Repeat(tolua_S); + lua_register_cocos2dx_RepeatForever(tolua_S); lua_register_cocos2dx_Place(tolua_S); lua_register_cocos2dx_EventListenerAcceleration(tolua_S); lua_register_cocos2dx_TiledGrid3D(tolua_S); @@ -88046,9 +88117,9 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TintBy(tolua_S); lua_register_cocos2dx_TransitionShrinkGrow(tolua_S); lua_register_cocos2dx_ClippingNode(tolua_S); + lua_register_cocos2dx_ActionFloat(tolua_S); lua_register_cocos2dx_ParticleFlower(tolua_S); lua_register_cocos2dx_EaseCircleActionIn(tolua_S); - lua_register_cocos2dx_ParticleSmoke(tolua_S); lua_register_cocos2dx_Image(tolua_S); lua_register_cocos2dx_LayerMultiplex(tolua_S); lua_register_cocos2dx_Blink(tolua_S); @@ -88056,11 +88127,12 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_ParticleExplosion(tolua_S); lua_register_cocos2dx_TransitionJumpZoom(tolua_S); lua_register_cocos2dx_Touch(tolua_S); - lua_register_cocos2dx_AnimationFrame(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_EaseBounceIn(tolua_S); + lua_register_cocos2dx_EventListenerMouse(tolua_S); lua_register_cocos2dx_Camera(tolua_S); lua_register_cocos2dx_GLProgram(tolua_S); lua_register_cocos2dx_ParticleGalaxy(tolua_S); @@ -88073,13 +88145,11 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_EventListenerTouchAllAtOnce(tolua_S); lua_register_cocos2dx_GLViewImpl(tolua_S); lua_register_cocos2dx_ToggleVisibility(tolua_S); - lua_register_cocos2dx_RepeatForever(tolua_S); - lua_register_cocos2dx_CardinalSplineTo(tolua_S); - lua_register_cocos2dx_CardinalSplineBy(tolua_S); + lua_register_cocos2dx_Repeat(tolua_S); lua_register_cocos2dx_TransitionFlipY(tolua_S); lua_register_cocos2dx_TurnOffTiles(tolua_S); lua_register_cocos2dx_TintTo(tolua_S); - lua_register_cocos2dx_CatmullRomTo(tolua_S); + lua_register_cocos2dx_EaseBackInOut(tolua_S); lua_register_cocos2dx_TransitionFadeBL(tolua_S); lua_register_cocos2dx_TargetedAction(tolua_S); lua_register_cocos2dx_DrawNode(tolua_S); @@ -88092,12 +88162,13 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TransitionPageTurn(tolua_S); lua_register_cocos2dx_BezierBy(tolua_S); lua_register_cocos2dx_BezierTo(tolua_S); - lua_register_cocos2dx_Menu(tolua_S); - lua_register_cocos2dx_Texture2D(tolua_S); - lua_register_cocos2dx_ActionManager(tolua_S); + lua_register_cocos2dx_ParticleMeteor(tolua_S); + lua_register_cocos2dx_SpriteFrame(tolua_S); + lua_register_cocos2dx_Liquid(tolua_S); lua_register_cocos2dx_UserDefault(tolua_S); lua_register_cocos2dx_TransitionZoomFlipX(tolua_S); lua_register_cocos2dx_EventFocus(tolua_S); + lua_register_cocos2dx_TransitionFade(tolua_S); lua_register_cocos2dx_EaseQuinticActionInOut(tolua_S); lua_register_cocos2dx_SpriteFrameCache(tolua_S); lua_register_cocos2dx_PointLight(tolua_S); @@ -88122,8 +88193,8 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_Animate(tolua_S); lua_register_cocos2dx_ShuffleTiles(tolua_S); lua_register_cocos2dx_ProgressTimer(tolua_S); - lua_register_cocos2dx_ParticleMeteor(tolua_S); lua_register_cocos2dx_EaseQuarticActionIn(tolua_S); + lua_register_cocos2dx_Menu(tolua_S); lua_register_cocos2dx_EaseInOut(tolua_S); lua_register_cocos2dx_TransitionZoomFlipY(tolua_S); lua_register_cocos2dx_ScaleBy(tolua_S); @@ -88132,21 +88203,20 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TMXMapInfo(tolua_S); lua_register_cocos2dx_EaseExponentialIn(tolua_S); lua_register_cocos2dx_ReuseGrid(tolua_S); - lua_register_cocos2dx_SpriteFrame(tolua_S); + lua_register_cocos2dx_EaseQuinticActionOut(tolua_S); lua_register_cocos2dx_EventDispatcher(tolua_S); lua_register_cocos2dx_MenuItemAtlasFont(tolua_S); - lua_register_cocos2dx_Liquid(tolua_S); + lua_register_cocos2dx_ActionManager(tolua_S); lua_register_cocos2dx_OrbitCamera(tolua_S); lua_register_cocos2dx_ParallaxNode(tolua_S); lua_register_cocos2dx_ClippingRectangleNode(tolua_S); lua_register_cocos2dx_EventCustom(tolua_S); - lua_register_cocos2dx_TransitionFade(tolua_S); + lua_register_cocos2dx_ParticleBatchNode(tolua_S); lua_register_cocos2dx_Component(tolua_S); lua_register_cocos2dx_EaseCubicActionOut(tolua_S); lua_register_cocos2dx_EventListenerTouchOneByOne(tolua_S); lua_register_cocos2dx_ParticleRain(tolua_S); lua_register_cocos2dx_Waves(tolua_S); - lua_register_cocos2dx_EaseQuinticActionOut(tolua_S); lua_register_cocos2dx_EaseOut(tolua_S); lua_register_cocos2dx_MenuItemFont(tolua_S); lua_register_cocos2dx_TransitionFadeUp(tolua_S); @@ -88162,7 +88232,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_Sprite(tolua_S); lua_register_cocos2dx_ProgressTo(tolua_S); lua_register_cocos2dx_TransitionProgressOutIn(tolua_S); - lua_register_cocos2dx_CatmullRomBy(tolua_S); + lua_register_cocos2dx_AnimationFrame(tolua_S); lua_register_cocos2dx_Sequence(tolua_S); lua_register_cocos2dx_Shaky3D(tolua_S); lua_register_cocos2dx_TransitionProgressRadialCW(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 e517be2dc8..ea1bdd252d 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1968,6 +1968,8 @@ int register_all_cocos2dx(lua_State* tolua_S); + + diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_physics_manual.cpp b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_physics_manual.cpp index 5599c1fb3c..f8bfed42a8 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_physics_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_physics_manual.cpp @@ -705,7 +705,7 @@ int lua_cocos2dx_physics_PhysicsShape_recenterPoints(lua_State* tolua_S) vec2_array_to_luaval(tolua_S, arg0, arg1); CC_SAFE_DELETE_ARRAY(arg0); - return 0; + return 1; } if (argc == 2) { @@ -726,7 +726,7 @@ int lua_cocos2dx_physics_PhysicsShape_recenterPoints(lua_State* tolua_S) cocos2d::PhysicsShape::recenterPoints(arg0, arg1, arg2); vec2_array_to_luaval(tolua_S, arg0, arg1); CC_SAFE_DELETE_ARRAY(arg0); - return 0; + return 1; } luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "recenterPoints",argc, 2); return 0; @@ -809,7 +809,7 @@ int lua_cocos2dx_physics_PhysicsShapeBox_getPoints(lua_State* tolua_S) cocos2d::Vec2 arg0[4]; cobj->getPoints(arg0); vec2_array_to_luaval(tolua_S, arg0, 4); - return 0; + return 1; } luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "getPoints",argc, 1); return 0; @@ -853,7 +853,7 @@ int lua_cocos2dx_physics_PhysicsShapePolygon_getPoints(lua_State* tolua_S) cobj->getPoints(arg0); vec2_array_to_luaval(tolua_S, arg0, count); CC_SAFE_DELETE_ARRAY(arg0); - return 0; + return 1; } luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "getPoints",argc, 1); return 0; @@ -1094,7 +1094,7 @@ int lua_cocos2dx_physics_PhysicsShapeEdgeBox_getPoints(lua_State* tolua_S) cobj->getPoints(arg0); vec2_array_to_luaval(tolua_S, arg0, count); CC_SAFE_DELETE_ARRAY(arg0); - return 0; + return 1; } luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "getPoints",argc, 1); return 0; @@ -1138,7 +1138,7 @@ int lua_cocos2dx_physics_PhysicsShapeEdgePolygon_getPoints(lua_State* tolua_S) cobj->getPoints(arg0); vec2_array_to_luaval(tolua_S, arg0, count); CC_SAFE_DELETE_ARRAY(arg0); - return 0; + return 1; } luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "getPoints",argc, 1); return 0; @@ -1182,7 +1182,7 @@ int lua_cocos2dx_physics_PhysicsShapeEdgeChain_getPoints(lua_State* tolua_S) cobj->getPoints(arg0); vec2_array_to_luaval(tolua_S, arg0, count); CC_SAFE_DELETE_ARRAY(arg0); - return 0; + return 1; } luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "getPoints",argc, 1); return 0; diff --git a/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h b/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h index 4e0b09ecbb..e7a12bf8a7 100644 --- a/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h +++ b/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h @@ -4,7 +4,6 @@ #include #include #include -#include "cocos2d.h" using namespace std; @@ -12,7 +11,6 @@ extern "C" { #include "lua.h" } -using namespace cocos2d; #define LUAJ_ERR_OK 0 #define LUAJ_ERR_TYPE_NOT_SUPPORT (-1) diff --git a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj index 84877003c9..442584f70c 100644 --- a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj +++ b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj @@ -222,20 +222,18 @@ StaticLibrary Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp StaticLibrary Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp @@ -250,7 +248,7 @@ - <_ProjectFileVersion>10.0.40219.1 + <_ProjectFileVersion>12.0.21005.1 $(SolutionDir)$(Configuration).win32\ $(Configuration).win32\$(ProjectName)\ $(SolutionDir)$(Configuration).win32\ diff --git a/cocos/storage/local-storage/LocalStorage-android.cpp b/cocos/storage/local-storage/LocalStorage-android.cpp index 67ebc8240e..1854109156 100644 --- a/cocos/storage/local-storage/LocalStorage-android.cpp +++ b/cocos/storage/local-storage/LocalStorage-android.cpp @@ -147,4 +147,16 @@ void localStorageRemoveItem( const std::string& key ) } +/** removes all items from the LS */ +void localStorageClear() +{ + assert( _initialized ); + JniMethodInfo t; + + if (JniHelper::getStaticMethodInfo(t, "org/cocos2dx/lib/Cocos2dxLocalStorage", "clear", "()V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID); + t.env->DeleteLocalRef(t.classID); + } +} + #endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) diff --git a/cocos/storage/local-storage/LocalStorage.cpp b/cocos/storage/local-storage/LocalStorage.cpp index 4580015617..da61f960ac 100644 --- a/cocos/storage/local-storage/LocalStorage.cpp +++ b/cocos/storage/local-storage/LocalStorage.cpp @@ -42,6 +42,7 @@ static sqlite3 *_db; static sqlite3_stmt *_stmt_select; static sqlite3_stmt *_stmt_remove; static sqlite3_stmt *_stmt_update; +static sqlite3_stmt *_stmt_clear; static void localStorageCreateTable() @@ -80,6 +81,10 @@ void localStorageInit( const std::string& fullpath/* = "" */) // DELETE const char *sql_remove = "DELETE FROM data WHERE key=?;"; ret |= sqlite3_prepare_v2(_db, sql_remove, -1, &_stmt_remove, nullptr); + + // Clear + const char *sql_clear = "DELETE FROM data;"; + ret |= sqlite3_prepare_v2(_db, sql_clear, -1, &_stmt_clear, nullptr); if( ret != SQLITE_OK ) { printf("Error initializing DB\n"); @@ -130,11 +135,15 @@ bool localStorageGetItem( const std::string& key, std::string *outItem ) ok |= sqlite3_step(_stmt_select); const unsigned char *text = sqlite3_column_text(_stmt_select, 0); - if( (ok != SQLITE_OK && ok != SQLITE_DONE && ok != SQLITE_ROW) || !text) + if ( ok != SQLITE_OK && ok != SQLITE_DONE && ok != SQLITE_ROW ) { printf("Error in localStorage.getItem()\n"); return false; } + else if (!text) + { + return false; + } else { outItem->assign((const char*)text); @@ -157,4 +166,15 @@ void localStorageRemoveItem( const std::string& key ) printf("Error in localStorage.removeItem()\n"); } +/** removes all items from the LS */ +void localStorageClear() +{ + assert( _initialized ); + + int ok = sqlite3_step(_stmt_clear); + + if( ok != SQLITE_OK && ok != SQLITE_DONE) + printf("Error in localStorage.clear()\n"); +} + #endif // #if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) diff --git a/cocos/storage/local-storage/LocalStorage.h b/cocos/storage/local-storage/LocalStorage.h index 642451a221..2c8dd1b8a1 100644 --- a/cocos/storage/local-storage/LocalStorage.h +++ b/cocos/storage/local-storage/LocalStorage.h @@ -51,6 +51,9 @@ bool CC_DLL localStorageGetItem( const std::string& key, std::string *outItem ); /** Removes an item from the JS. */ void CC_DLL localStorageRemoveItem( const std::string& key ); +/** Removes all items from the JS. */ +void CC_DLL localStorageClear(); + // end group /// @} diff --git a/cocos/ui/UILayout.h b/cocos/ui/UILayout.h index e457019a6b..f070041729 100644 --- a/cocos/ui/UILayout.h +++ b/cocos/ui/UILayout.h @@ -92,7 +92,7 @@ public: virtual void doLayout() = 0; }; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #ifdef RELATIVE #undef RELATIVE #endif diff --git a/cocos/ui/UILayoutParameter.h b/cocos/ui/UILayoutParameter.h index b9262ba23f..930ee3c469 100644 --- a/cocos/ui/UILayoutParameter.h +++ b/cocos/ui/UILayoutParameter.h @@ -110,7 +110,7 @@ public: }; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #ifdef RELATIVE #undef RELATIVE #endif diff --git a/cocos/ui/UIWebViewImpl-ios.mm b/cocos/ui/UIWebViewImpl-ios.mm index 0ffbd31028..b1a5b3c2d3 100644 --- a/cocos/ui/UIWebViewImpl-ios.mm +++ b/cocos/ui/UIWebViewImpl-ios.mm @@ -124,6 +124,7 @@ static std::string getFixedBaseUrl(const std::string& baseUrl) - (void)dealloc { self.uiWebView.delegate = nil; [self.uiWebView removeFromSuperview]; + self.uiWebView = nil; self.jsScheme = nil; [super dealloc]; } diff --git a/cocos/ui/UIWidget.h b/cocos/ui/UIWidget.h index 9cce4156bf..a283cc7c26 100644 --- a/cocos/ui/UIWidget.h +++ b/cocos/ui/UIWidget.h @@ -63,7 +63,7 @@ typedef void (Ref::*SEL_TouchEvent)(Ref*,TouchEventType); #define toucheventselector(_SELECTOR) (SEL_TouchEvent)(&_SELECTOR) -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #ifdef ABSOLUTE #undef ABSOLUTE #endif diff --git a/cocos/ui/proj.win32/libui.vcxproj b/cocos/ui/proj.win32/libui.vcxproj index 619b8508d4..d2e2674f9a 100644 --- a/cocos/ui/proj.win32/libui.vcxproj +++ b/cocos/ui/proj.win32/libui.vcxproj @@ -92,9 +92,6 @@ DynamicLibrary true - v100 - v110 - v110_xp v120 v120_xp Unicode @@ -102,9 +99,6 @@ DynamicLibrary false - v100 - v110 - v110_xp v120 v120_xp true diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 70a0e2e0f0..dd38bb5290 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -47,8 +47,8 @@ * Xcode 5.1 or newer for iOS or Mac * gcc 4.9 or newer for Linux * ndk-r10c for Android -* Visual Studio 2012 or newer for Windows (win32) -* Visual Studio 2012 or newer for Windows Phone 8 +* Visual Studio 2013 or newer for Windows (win32) +* Visual Studio 2013 or newer for Windows Phone 8 ## How to run tests diff --git a/extensions/Android.mk b/extensions/Android.mk index 3574e252b4..90a1561c6f 100644 --- a/extensions/Android.mk +++ b/extensions/Android.mk @@ -178,11 +178,12 @@ Particle3D/PU/CCPUBehaviour.cpp \ Particle3D/PU/CCPUBehaviourManager.cpp \ Particle3D/PU/CCPUBehaviourTranslator.cpp \ Particle3D/PU/CCPUSlaveBehaviour.cpp \ -Particle3D/PU/CCPUSlaveBehaviourTranslator.cpp \ +Particle3D/PU/CCPUSlaveBehaviourTranslator.cpp LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static LOCAL_STATIC_LIBRARIES += cocos_curl_static LOCAL_STATIC_LIBRARIES += box2d_static +LOCAL_STATIC_LIBRARIES += bullet_static LOCAL_CXXFLAGS += -fexceptions diff --git a/extensions/Particle3D/CCParticle3DRender.cpp b/extensions/Particle3D/CCParticle3DRender.cpp index 04eb04d17c..0c46554e0b 100755 --- a/extensions/Particle3D/CCParticle3DRender.cpp +++ b/extensions/Particle3D/CCParticle3DRender.cpp @@ -30,6 +30,7 @@ #include "renderer/CCGLProgramState.h" #include "renderer/CCGLProgramCache.h" #include "renderer/CCVertexIndexBuffer.h" +#include "renderer/CCVertexAttribBinding.h" #include "base/CCDirector.h" #include "3d/CCSprite3D.h" #include "2d/CCCamera.h" diff --git a/extensions/Particle3D/PU/CCPUBillboardChain.cpp b/extensions/Particle3D/PU/CCPUBillboardChain.cpp index 4b7d46f236..260df910c0 100644 --- a/extensions/Particle3D/PU/CCPUBillboardChain.cpp +++ b/extensions/Particle3D/PU/CCPUBillboardChain.cpp @@ -32,6 +32,7 @@ #include "renderer/CCGLProgramState.h" #include "renderer/CCGLProgramCache.h" #include "renderer/CCVertexIndexBuffer.h" +#include "renderer/CCVertexAttribBinding.h" #include "2d/CCCamera.h" #include "3d/CCSprite3D.h" diff --git a/extensions/Particle3D/PU/CCPUMaterialManager.cpp b/extensions/Particle3D/PU/CCPUMaterialManager.cpp index a8d9e7e804..96dda1b2c7 100644 --- a/extensions/Particle3D/PU/CCPUMaterialManager.cpp +++ b/extensions/Particle3D/PU/CCPUMaterialManager.cpp @@ -153,7 +153,10 @@ bool PUMaterialCache::loadMaterialsFromSearchPaths( const std::string &fileFolde while ((fileName = AAssetDir_getNextFileName(dir)) != nullptr) { std::string fullpath = fileFolder + seg + std::string(fileName); - loadMaterials(fullpath); + if (strlen(fileName) > 9 && (strcmp(".material", fileName + strlen(fileName) - 9) == 0)) + { + loadMaterials(fullpath); + } } AAssetDir_close(dir); diff --git a/extensions/Particle3D/PU/CCPURender.cpp b/extensions/Particle3D/PU/CCPURender.cpp index b8e676db20..96d74e3a03 100644 --- a/extensions/Particle3D/PU/CCPURender.cpp +++ b/extensions/Particle3D/PU/CCPURender.cpp @@ -33,6 +33,7 @@ #include "renderer/CCGLProgramState.h" #include "renderer/CCGLProgramCache.h" #include "renderer/CCVertexIndexBuffer.h" +#include "renderer/CCVertexAttribBinding.h" #include "base/CCDirector.h" #include "3d/CCSprite3D.h" #include "3d/CCMesh.h" diff --git a/extensions/assets-manager/AssetsManager.cpp b/extensions/assets-manager/AssetsManager.cpp index 9f34ea124b..00d0859666 100644 --- a/extensions/assets-manager/AssetsManager.cpp +++ b/extensions/assets-manager/AssetsManager.cpp @@ -29,7 +29,7 @@ #include #include -#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 #include @@ -454,7 +454,7 @@ bool AssetsManager::uncompress() */ bool AssetsManager::createDirectory(const char *path) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) return FileUtils::getInstance()->createDirectory(_storagePath.c_str()); #elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) BOOL ret = CreateDirectoryA(path, nullptr); @@ -646,7 +646,7 @@ AssetsManager* AssetsManager::create(const char* packageUrl, const char* version void AssetsManager::createStoragePath() { // Remove downloaded files -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) FileUtils::getInstance()->createDirectory(_storagePath.c_str()); #elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) if ((GetFileAttributesA(_storagePath.c_str())) == INVALID_FILE_ATTRIBUTES) @@ -669,7 +669,7 @@ void AssetsManager::destroyStoragePath() deleteVersion(); // Remove downloaded files -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) FileUtils::getInstance()->removeDirectory(_storagePath.c_str()); #elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) string command = "rd /s /q "; diff --git a/extensions/assets-manager/Downloader.cpp b/extensions/assets-manager/Downloader.cpp index 930952cfc4..1175e6baa3 100644 --- a/extensions/assets-manager/Downloader.cpp +++ b/extensions/assets-manager/Downloader.cpp @@ -273,7 +273,7 @@ void Downloader::prepareDownload(const std::string &srcUrl, const std::string &s } } -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if(CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) Downloader::HeaderInfo Downloader::prepare(const std::string &srcUrl) { return prepareHeader(srcUrl); @@ -335,7 +335,7 @@ long Downloader::getContentSize(const std::string &srcUrl) void Downloader::getHeaderAsync(const std::string &srcUrl, const HeaderCallback &callback) { setHeaderCallback(callback); -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#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); @@ -701,7 +701,6 @@ void Downloader::groupBatchDownload(const DownloadUnits &units) } // Clean up and close files - curl_multi_cleanup(multi_handle); for (auto it = _files.begin(); it != _files.end(); ++it) { FILE *f = (*it)->fp; @@ -710,6 +709,7 @@ void Downloader::groupBatchDownload(const DownloadUnits &units) curl_multi_remove_handle(multi_handle, single); curl_easy_cleanup(single); } + curl_multi_cleanup(multi_handle); // Check unfinished files and notify errors, succeed files will be renamed from temporary file name to real name for (auto it = _progDatas.begin(); it != _progDatas.end(); ++it) { diff --git a/extensions/assets-manager/Downloader.h b/extensions/assets-manager/Downloader.h index c012787daa..46893ec6ce 100644 --- a/extensions/assets-manager/Downloader.h +++ b/extensions/assets-manager/Downloader.h @@ -170,7 +170,7 @@ 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_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if(CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) HeaderInfo prepare(const std::string &srcUrl); #endif HeaderInfo prepareHeader(const std::string &srcUrl, void* header = nullptr); diff --git a/external/config.json b/external/config.json index 971ac68d0d..8ca703e5d2 100644 --- a/external/config.json +++ b/external/config.json @@ -1,5 +1,5 @@ { - "version":"v3-deps-49", + "version":"v3-deps-52", "zip_file_size":"116842586", "repo_name":"cocos2d-x-3rd-party-libs-bin", "repo_parent":"https://github.com/cocos2d/", diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index bdf6bb7b41..cbee26cf0e 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -6,15 +6,14 @@ "README.cmake", "README.md", "build/android-build.py", - "build/cocos2d-js-win32.vc2012.sln", + "build/cocos2d-js-win32.vc2013.sln", "build/cocos2d-js-win8.1-universal.sln", - "build/cocos2d-win32.vc2012.sln", + "build/cocos2d-win32.vc2013.sln", "build/cocos2d-win8.1-universal.sln", "build/cocos2d_js_tests.xcodeproj/project.pbxproj", "build/cocos2d_libs.xcodeproj/project.pbxproj", "build/cocos2d_tests.xcodeproj/project.pbxproj", "build/install-deps-linux.sh", - "build/win32-msvc-2012-x86.cmd", "build/win32-msvc-2013-x86.cmd", "cmake/BuildHelpers.CMakeLists.txt", "cmake/Modules/CMakeParseArguments.cmake", @@ -381,6 +380,8 @@ "cocos/base/CCNS.h", "cocos/base/CCProfiling.cpp", "cocos/base/CCProfiling.h", + "cocos/base/CCProperties.cpp", + "cocos/base/CCProperties.h", "cocos/base/CCProtocols.h", "cocos/base/CCRef.cpp", "cocos/base/CCRef.h", @@ -800,6 +801,23 @@ "cocos/physics/CCPhysicsWorld.cpp", "cocos/physics/CCPhysicsWorld.h", "cocos/physics/CMakeLists.txt", + "cocos/physics3d/CCPhysics3D.cpp", + "cocos/physics3d/CCPhysics3D.h", + "cocos/physics3d/CCPhysics3DComponent.cpp", + "cocos/physics3d/CCPhysics3DComponent.h", + "cocos/physics3d/CCPhysics3DConstraint.cpp", + "cocos/physics3d/CCPhysics3DConstraint.h", + "cocos/physics3d/CCPhysics3DDebugDrawer.cpp", + "cocos/physics3d/CCPhysics3DDebugDrawer.h", + "cocos/physics3d/CCPhysics3DObject.cpp", + "cocos/physics3d/CCPhysics3DObject.h", + "cocos/physics3d/CCPhysics3DShape.cpp", + "cocos/physics3d/CCPhysics3DShape.h", + "cocos/physics3d/CCPhysics3DWorld.cpp", + "cocos/physics3d/CCPhysics3DWorld.h", + "cocos/physics3d/CCPhysicsSprite3D.cpp", + "cocos/physics3d/CCPhysicsSprite3D.h", + "cocos/physics3d/CMakeLists.txt", "cocos/platform/CCApplication.h", "cocos/platform/CCApplicationProtocol.h", "cocos/platform/CCCommon.h", @@ -1051,6 +1069,8 @@ "cocos/renderer/CCTextureCache.h", "cocos/renderer/CCTrianglesCommand.cpp", "cocos/renderer/CCTrianglesCommand.h", + "cocos/renderer/CCVertexAttribBinding.cpp", + "cocos/renderer/CCVertexAttribBinding.h", "cocos/renderer/CCVertexIndexBuffer.cpp", "cocos/renderer/CCVertexIndexBuffer.h", "cocos/renderer/CCVertexIndexData.cpp", @@ -2722,6 +2742,7 @@ "external/jpeg/include/android/jmorecfg.h", "external/jpeg/include/android/jpeglib.h", "external/jpeg/include/ios/jconfig.h", + "external/jpeg/include/ios/jerror.h", "external/jpeg/include/ios/jmorecfg.h", "external/jpeg/include/ios/jpeglib.h", "external/jpeg/include/linux/jconfig.h", @@ -4904,6 +4925,94 @@ "tools/gen-prebuilt/module_organize.py", "tools/missing-tools.txt", "tools/particle/convert_YCoordFlipped.py", + "tools/simulator/.cocos-project.json", + "tools/simulator/.project", + "tools/simulator/config.json", + "tools/simulator/frameworks/runtime-src/Classes/AppDelegate.cpp", + "tools/simulator/frameworks/runtime-src/Classes/AppDelegate.h", + "tools/simulator/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h", + "tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeJsImpl.cpp", + "tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeJsImpl.h", + "tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp", + "tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h", + "tools/simulator/frameworks/runtime-src/Classes/ide-support/lang", + "tools/simulator/frameworks/runtime-src/Classes/ide-support/lua_debugger.c", + "tools/simulator/frameworks/runtime-src/Classes/ide-support/lua_debugger.h", + "tools/simulator/frameworks/runtime-src/Classes/js_module_register.h", + "tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h", + "tools/simulator/frameworks/runtime-src/proj.android/.classpath", + "tools/simulator/frameworks/runtime-src/proj.android/.project", + "tools/simulator/frameworks/runtime-src/proj.android/.settings/org.eclipse.jdt.core.prefs", + "tools/simulator/frameworks/runtime-src/proj.android/AndroidManifest.xml", + "tools/simulator/frameworks/runtime-src/proj.android/ant.properties", + "tools/simulator/frameworks/runtime-src/proj.android/build-cfg.json", + "tools/simulator/frameworks/runtime-src/proj.android/build.xml", + "tools/simulator/frameworks/runtime-src/proj.android/jni/Android.mk", + "tools/simulator/frameworks/runtime-src/proj.android/jni/Application.mk", + "tools/simulator/frameworks/runtime-src/proj.android/jni/hellolua/main.cpp", + "tools/simulator/frameworks/runtime-src/proj.android/proguard-project.txt", + "tools/simulator/frameworks/runtime-src/proj.android/project.properties", + "tools/simulator/frameworks/runtime-src/proj.android/res/drawable-hdpi/icon.png", + "tools/simulator/frameworks/runtime-src/proj.android/res/drawable-ldpi/icon.png", + "tools/simulator/frameworks/runtime-src/proj.android/res/drawable-mdpi/icon.png", + "tools/simulator/frameworks/runtime-src/proj.android/res/values/strings.xml", + "tools/simulator/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/AppController.h", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-568h@2x.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default@2x.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-100.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-114.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-120.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-144.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-152.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-29.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-40.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-50.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-57.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-58.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-72.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-76.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-80.png", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Info.plist", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.h", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/build-cfg.json", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/main.m", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/ConsoleWindow.xib", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/MainMenu.xib", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/ConsoleWindowController.h", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/ConsoleWindowController.m", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Info.plist", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Prefix.pch", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.h", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/en.lproj/MainMenu.xib", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/main.m", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/ConsoleWindow.strings", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/MainMenu.xib", + "tools/simulator/frameworks/runtime-src/proj.ios_mac/simulator.xcodeproj/project.pbxproj", + "tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.cpp", + "tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.h", + "tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json", + "tools/simulator/frameworks/runtime-src/proj.win32/game.rc", + "tools/simulator/frameworks/runtime-src/proj.win32/main.cpp", + "tools/simulator/frameworks/runtime-src/proj.win32/main.h", + "tools/simulator/frameworks/runtime-src/proj.win32/res/game.ico", + "tools/simulator/frameworks/runtime-src/proj.win32/resource.h", + "tools/simulator/frameworks/runtime-src/proj.win32/simulator.sln", + "tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj", + "tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.filters", + "tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.user", + "tools/simulator/frameworks/runtime-src/proj.win32/stdafx.cpp", + "tools/simulator/frameworks/runtime-src/proj.win32/stdafx.h", + "tools/simulator/frameworks/runtime-src/proj.win32/targetver.h", "tools/simulator/libsimulator/lib/AppEvent.cpp", "tools/simulator/libsimulator/lib/AppEvent.h", "tools/simulator/libsimulator/lib/AppLang.cpp", @@ -5047,6 +5156,7 @@ "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_3d_extension_auto_api.js", "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_extension_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", @@ -5059,6 +5169,8 @@ "cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp", "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_extension_auto.cpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp", @@ -5090,6 +5202,8 @@ "cocos/scripting/js-bindings/manual/cocostudio/jsb_cocos2dx_studio_conversions.h", "cocos/scripting/js-bindings/manual/cocostudio/jsb_cocos2dx_studio_manual.cpp", "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/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", @@ -5923,10 +6037,8 @@ "external/spidermonkey/prebuilt/linux/32-bit/libjs_static.a", "external/spidermonkey/prebuilt/linux/64-bit/libjs_static.a", "external/spidermonkey/prebuilt/mac/libjs_static.a", - "external/spidermonkey/prebuilt/win32/debug-build/mozjs-33.dll", - "external/spidermonkey/prebuilt/win32/debug-build/mozjs-33.lib", - "external/spidermonkey/prebuilt/win32/release-build/mozjs-33.dll", - "external/spidermonkey/prebuilt/win32/release-build/mozjs-33.lib", + "external/spidermonkey/prebuilt/win32/mozjs-33.dll", + "external/spidermonkey/prebuilt/win32/mozjs-33.lib", "external/spidermonkey/prebuilt/winrt_8.1/arm/mozjs-33.dll", "external/spidermonkey/prebuilt/winrt_8.1/arm/mozjs-33.lib", "external/spidermonkey/prebuilt/winrt_8.1/win32/mozjs-33.dll", @@ -5940,6 +6052,7 @@ "tools/tojs/cocos2dx_3d.ini", "tools/tojs/cocos2dx_3d_ext.ini", "tools/tojs/cocos2dx_builder.ini", + "tools/tojs/cocos2dx_experimental.ini", "tools/tojs/cocos2dx_extension.ini", "tools/tojs/cocos2dx_spine.ini", "tools/tojs/cocos2dx_studio.ini", @@ -6294,6 +6407,7 @@ "cocos/scripting/lua-bindings/auto/api/ActionCamera.lua", "cocos/scripting/lua-bindings/auto/api/ActionEase.lua", "cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua", + "cocos/scripting/lua-bindings/auto/api/ActionFloat.lua", "cocos/scripting/lua-bindings/auto/api/ActionFrame.lua", "cocos/scripting/lua-bindings/auto/api/ActionInstant.lua", "cocos/scripting/lua-bindings/auto/api/ActionInterval.lua", diff --git a/templates/cpp-template-default/proj.win32/HelloCpp.sln b/templates/cpp-template-default/proj.win32/HelloCpp.sln index 211cf94446..08c69b276b 100644 --- a/templates/cpp-template-default/proj.win32/HelloCpp.sln +++ b/templates/cpp-template-default/proj.win32/HelloCpp.sln @@ -1,6 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "HelloCpp.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" ProjectSection(ProjectDependencies) = postProject {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} @@ -12,6 +14,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\cocos2d\exte EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\cocos2d\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -34,6 +38,10 @@ Global {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 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.ActiveCfg = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.Build.0 = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj b/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj index cc57de42e3..663a68f0fd 100644 --- a/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj +++ b/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj @@ -20,20 +20,18 @@ Application Unicode true - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp Application Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp @@ -50,7 +48,7 @@ - <_ProjectFileVersion>10.0.40219.1 + <_ProjectFileVersion>12.0.21005.1 $(SolutionDir)$(Configuration).win32\ $(Configuration).win32\ true diff --git a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/App.xaml.cpp b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/App.xaml.cpp index f4365b88c5..a4069f4b56 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/App.xaml.cpp +++ b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/App.xaml.cpp @@ -1,21 +1,128 @@ #include "App.xaml.h" #include "OpenGLESPage.xaml.h" +using namespace Platform; +using namespace Windows::ApplicationModel; +using namespace Windows::ApplicationModel::Activation; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; +using namespace Windows::UI::Xaml::Media::Animation; +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::Interop; +using namespace Windows::UI::Xaml::Media; +using namespace Windows::UI::Xaml::Navigation; using namespace cocos2d; App::App() { InitializeComponent(); + Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending); } -void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +/// +/// Invoked when the application is launched normally by the end user. Other entry points +/// will be used when the application is launched to open a specific file, to display +/// search results, and so forth. +/// +/// Details about the launch request and process. +void App::OnLaunched(LaunchActivatedEventArgs^ e) { - if (mPage == nullptr) + auto rootFrame = dynamic_cast(Window::Current->Content); + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active. + if (rootFrame == nullptr) { - mPage = ref new OpenGLESPage(&mOpenGLES); + // Create a Frame to act as the navigation context and associate it with + // a SuspensionManager key + rootFrame = ref new Frame(); + + // TODO: Change this value to a cache size that is appropriate for your application. + rootFrame->CacheSize = 1; + + if (e->PreviousExecutionState == ApplicationExecutionState::Terminated) + { + // TODO: Restore the saved session state only when appropriate, scheduling the + // final launch steps after the restore is complete. + } + + // Place the frame in the current Window + Window::Current->Content = rootFrame; } - // 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(); + if (rootFrame->Content == nullptr) + { +#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP + // Removes the turnstile navigation for startup. + if (rootFrame->ContentTransitions != nullptr) + { + _transitions = ref new TransitionCollection(); + for (auto transition : rootFrame->ContentTransitions) + { + _transitions->Append(transition); + } + } + + rootFrame->ContentTransitions = nullptr; + _firstNavigatedToken = rootFrame->Navigated += ref new NavigatedEventHandler(this, &App::RootFrame_FirstNavigated); +#endif + + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter. + + rootFrame->Content = mPage = ref new OpenGLESPage(&mOpenGLES); + +#if 0 + if (!rootFrame->Navigate(OpenGLESPage::typeid, e->Arguments)) + { + throw ref new FailureException("Failed to create initial page"); + } +#endif + } + + // Ensure the current window is active + Window::Current->Activate(); +} + +#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP +/// +/// Restores the content transitions after the app has launched. +/// +void App::RootFrame_FirstNavigated(Object^ sender, NavigationEventArgs^ e) +{ + auto rootFrame = safe_cast(sender); + + TransitionCollection^ newTransitions; + if (_transitions == nullptr) + { + newTransitions = ref new TransitionCollection(); + newTransitions->Append(ref new NavigationThemeTransition()); + } + else + { + newTransitions = _transitions; + } + + rootFrame->ContentTransitions = newTransitions; + + rootFrame->Navigated -= _firstNavigatedToken; +} +#endif + +/// +/// Invoked when application execution is being suspended. Application state is saved +/// without knowing whether the application will be terminated or resumed with the contents +/// of memory still intact. +/// +void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e) +{ + (void) sender; // Unused parameter + (void) e; // Unused parameter + + // TODO: Save application state and stop any background activity } diff --git a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/App.xaml.h b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/App.xaml.h index 1309c610d7..e438eee247 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/App.xaml.h +++ b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/App.xaml.h @@ -13,6 +13,16 @@ namespace cocos2d virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; private: + +#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP + Windows::UI::Xaml::Media::Animation::TransitionCollection^ _transitions; + Windows::Foundation::EventRegistrationToken _firstNavigatedToken; + + void RootFrame_FirstNavigated(Platform::Object^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs^ e); +#endif + + void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e); + OpenGLESPage^ mPage; OpenGLES mOpenGLES; }; diff --git a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/Cocos2dRenderer.cpp b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/Cocos2dRenderer.cpp index d8ffe6913b..85212dfded 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/Cocos2dRenderer.cpp +++ b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/Cocos2dRenderer.cpp @@ -149,4 +149,10 @@ 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.win8.1-universal/App.Shared/Cocos2dRenderer.h b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/Cocos2dRenderer.h index cb513eaaae..b348c50043 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/Cocos2dRenderer.h +++ b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/Cocos2dRenderer.h @@ -34,8 +34,9 @@ namespace cocos2d 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 QueueBackButtonEvent(); + 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(); diff --git a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/OpenGLESPage.xaml.cpp b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/OpenGLESPage.xaml.cpp index b53511535b..fc4a36bc71 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/OpenGLESPage.xaml.cpp +++ b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/OpenGLESPage.xaml.cpp @@ -36,7 +36,7 @@ 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) +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 using namespace Windows::Phone::UI::Input; #endif @@ -63,6 +63,12 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : 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); @@ -78,6 +84,17 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : 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); @@ -87,6 +104,7 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : auto pointerVisualizationSettings = Windows::UI::Input::PointerVisualizationSettings::GetForCurrentView(); pointerVisualizationSettings->IsContactFeedbackEnabled = false; pointerVisualizationSettings->IsBarrelButtonFeedbackEnabled = false; +#endif #endif // Register our SwapChainPanel to get independent input pointer events @@ -104,13 +122,12 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : 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. + // 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() @@ -150,6 +167,38 @@ void OpenGLESPage::OnPointerReleased(Object^ sender, PointerEventArgs^ 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); @@ -168,7 +217,7 @@ void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Wi } } -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) +#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. @@ -217,7 +266,7 @@ void OpenGLESPage::GetSwapChainPanelSize(GLsizei* width, GLsizei* height) void OpenGLESPage::CreateRenderSurface() { - if (mOpenGLES) + if (mOpenGLES && mRenderSurface == EGL_NO_SURFACE) { // // A Custom render surface size can be specified by uncommenting the following lines. diff --git a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/OpenGLESPage.xaml.h b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/OpenGLESPage.xaml.h index 3f6eecc3b2..26e3ff1fe0 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.Shared/OpenGLESPage.xaml.h +++ b/templates/cpp-template-default/proj.win8.1-universal/App.Shared/OpenGLESPage.xaml.h @@ -39,7 +39,7 @@ namespace cocos2d 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) +#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); @@ -71,6 +71,9 @@ namespace cocos2d 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); 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 53c9e04314..be071c12a8 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/HelloCpp.sln +++ b/templates/cpp-template-default/proj.win8.1-universal/HelloCpp.sln @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.30723.0 -MinimumVisualStudioVersion = 10.0.40219.1 +MinimumVisualStudioVersion = 12.0.21005.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HelloCpp", "HelloCpp", "{36AFDE04-D127-4D84-9730-D84E3E51EAA7}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "App.Shared", "App.Shared\HelloCpp.Shared.vcxitems", "{A3AD93E4-0B2F-4C58-9181-69BED2E42E3E}" diff --git a/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.sln b/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.sln index 03074bfac7..5aa0716c3a 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.sln +++ b/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 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} @@ -17,6 +17,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\..\cocos2d 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}") = "libbullet", "..\..\cocos2d-x\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -43,6 +45,10 @@ Global {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 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.ActiveCfg = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.Build.0 = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -50,5 +56,6 @@ Global GlobalSection(NestedProjects) = preSolution {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {8C6B0381-B325-4D7F-B1BB-474ABACE46AC} {929480E7-23C0-4DF6-8456-096D71547116} = {8C6B0381-B325-4D7F-B1BB-474ABACE46AC} + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} = {8C6B0381-B325-4D7F-B1BB-474ABACE46AC} EndGlobalSection EndGlobal 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 3c1e1d1fd1..8620004ace 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 @@ -18,20 +18,18 @@ Application Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp Application Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp @@ -48,7 +46,7 @@ - <_ProjectFileVersion>10.0.40219.1 + <_ProjectFileVersion>12.0.21005.1 $(SolutionDir)$(Configuration).win32\ $(Configuration).win32\ false @@ -102,7 +100,7 @@ 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\spidermonkey\prebuilt\win32\*.*" "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*" "$(OutDir)" @@ -157,7 +155,7 @@ copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y 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\spidermonkey\prebuilt\win32\*.*" "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*" "$(OutDir)" 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 fb1b307993..3658166bb4 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 @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 +MinimumVisualStudioVersion = 12.0.21005.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HelloJavascript", "HelloJavascript", "{36AFDE04-D127-4D84-9730-D84E3E51EAA7}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloJavascript.Shared", "App.Shared\HelloJavascript.Shared.vcxitems", "{A3AD93E4-0B2F-4C58-9181-69BED2E42E3E}" 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 index fa00857116..1c13dacd89 100644 --- a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lang +++ b/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lang @@ -6,7 +6,13 @@ "Portrait": "竖屏", "Landscape": "横屏", "Refresh": "刷新(重启)", - "Zoom Out": "缩放" + "Zoom Out": "缩放", + "Simulator": "模拟器", + "Open File": "打开文件", + "Open Project": "打开工程", + "Error": "错误", + "Help": "帮助(&H)", + "About": "关于(&A)" }, "zh-Hans": { "View": "视图", @@ -15,6 +21,9 @@ "Portrait": "竖屏", "Landscape": "横屏", "Refresh": "刷新(重启)", - "Zoom Out": "缩放" + "Zoom Out": "缩放", + "Simulator": "模拟器", + "Help": "帮助(&H)", + "About": "关于(&A)" } } \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.win32/HelloLua.sln b/templates/lua-template-default/frameworks/runtime-src/proj.win32/HelloLua.sln index 07902498c9..fcecb96c92 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.win32/HelloLua.sln +++ b/templates/lua-template-default/frameworks/runtime-src/proj.win32/HelloLua.sln @@ -1,8 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 VisualStudioVersion = 12.0.30501.0 -MinimumVisualStudioVersion = 10.0.40219.1 +MinimumVisualStudioVersion = 12.0.21005.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "HelloLua.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}" ProjectSection(ProjectDependencies) = postProject {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} @@ -18,6 +18,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\..\cocos2d-x 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 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 8b4eaaa1d1..12d7aafba4 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 @@ -19,19 +19,19 @@ Application true Unicode - v110 v120 - v110_xp v120_xp + v140 + v140_xp Application false Unicode - v110 v120 - v110_xp v120_xp + v140 + v140_xp diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.win32/SimulatorWin.cpp b/templates/lua-template-default/frameworks/runtime-src/proj.win32/SimulatorWin.cpp index d2d889fb66..ae2d30f235 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.win32/SimulatorWin.cpp +++ b/templates/lua-template-default/frameworks/runtime-src/proj.win32/SimulatorWin.cpp @@ -31,6 +31,14 @@ #include "platform/win32/PlayerWin.h" #include "platform/win32/PlayerMenuServiceWin.h" +// define 1 to open console ui and setup windows system menu, 0 to disable +#include "ide-support/CodeIDESupport.h" +#if (CC_CODE_IDE_DEBUG_SUPPORT > 0) +#define SIMULATOR_WITH_CONSOLE_AND_MENU 1 +#else +#define SIMULATOR_WITH_CONSOLE_AND_MENU 0 +#endif + USING_NS_CC; static WNDPROC g_oldWindowProc = NULL; @@ -243,6 +251,7 @@ int SimulatorWin::run() _app = new AppDelegate(); RuntimeEngine::getInstance()->setProjectConfig(_project); +#if (SIMULATOR_WITH_CONSOLE_AND_MENU > 0) // create console window if (_project.isShowConsole()) { @@ -262,6 +271,7 @@ int SimulatorWin::run() } } } +#endif // log file if (_project.isWriteDebugLogToFile()) @@ -356,9 +366,11 @@ int SimulatorWin::run() // path for looking Lang file, Studio Default images FileUtils::getInstance()->addSearchPath(getApplicationPath().c_str()); +#if SIMULATOR_WITH_CONSOLE_AND_MENU > 0 // init player services setupUI(); DrawMenuBar(_hwnd); +#endif // prepare FileUtils::getInstance()->setPopupNotify(false); @@ -367,11 +379,6 @@ int SimulatorWin::run() g_oldWindowProc = (WNDPROC)SetWindowLong(_hwnd, GWL_WNDPROC, (LONG)SimulatorWin::windowProc); - // update window size - RECT rect; - GetWindowRect(_hwnd, &rect); - MoveWindow(_hwnd, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top + GetSystemMetrics(SM_CYMENU), FALSE); - // startup message loop return app->run(); } @@ -442,6 +449,10 @@ void SimulatorWin::setupUI() scaleMenuVector.push_back(scale50Menu); scaleMenuVector.push_back(scale25Menu); + // About + menuBar->addItem("HELP_MENU", tr("Help")); + menuBar->addItem("ABOUT_MENUITEM", tr("About"), "HELP_MENU"); + menuBar->addItem("REFRESH_MENU_SEP", "-", "VIEW_MENU"); menuBar->addItem("REFRESH_MENU", tr("Refresh"), "VIEW_MENU"); @@ -527,6 +538,11 @@ void SimulatorWin::setupUI() project.changeFrameOrientationToLandscape(); _instance->openProjectWithProjectConfig(project); } + else if (data == "ABOUT_MENUITEM") + { + onHelpAbout(); + } + } } } @@ -725,6 +741,7 @@ LRESULT CALLBACK SimulatorWin::windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L switch (uMsg) { + case WM_SYSCOMMAND: case WM_COMMAND: { if (HIWORD(wParam) == 0) @@ -754,10 +771,12 @@ LRESULT CALLBACK SimulatorWin::windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L } case WM_KEYDOWN: { +#if (SIMULATOR_WITH_CONSOLE_AND_MENU > 0) if (wParam == VK_F5) { _instance->relaunch(); } +#endif break; } diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.win32/resource.h b/templates/lua-template-default/frameworks/runtime-src/proj.win32/resource.h index d3ddc2bd16..bafd69ad92 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.win32/resource.h +++ b/templates/lua-template-default/frameworks/runtime-src/proj.win32/resource.h @@ -3,10 +3,9 @@ // Used by game.rc // #define IDS_PROJNAME 100 -#define IDR_TESTLUA 100 -#define IDR_MENU_COCOS 201 +#define IDR_MENU_COCOS 200 #define IDD_DIALOG1 202 -#define IDD_DIALOG_ABOUT 202 +#define IDD_DIALOG_ABOUT 203 #define IDC_EDIT2 1001 #define ID_VIEW_SIZE 30001 #define ID_FILE_NEW_WINDOW 32771 @@ -27,7 +26,7 @@ #define ID_CONTROL_TOP 32793 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 201 diff --git a/tests/cpp-empty-test/.cocos-project.json b/tests/cpp-empty-test/.cocos-project.json index 083f76ad90..97103e9e8f 100644 --- a/tests/cpp-empty-test/.cocos-project.json +++ b/tests/cpp-empty-test/.cocos-project.json @@ -1,7 +1,7 @@ { "win32_cfg": { "project_path": "../../build", - "sln_file": "cocos2d-win32.vc2012.sln", + "sln_file": "cocos2d-win32.vc2013.sln", "project_name": "cpp-empty-test", "build_cfg_path": "proj.win32" }, diff --git a/tests/cpp-empty-test/Classes/AppDelegate.cpp b/tests/cpp-empty-test/Classes/AppDelegate.cpp index b1208d79f5..740b147211 100644 --- a/tests/cpp-empty-test/Classes/AppDelegate.cpp +++ b/tests/cpp-empty-test/Classes/AppDelegate.cpp @@ -36,12 +36,7 @@ bool AppDelegate::applicationDidFinishLaunching() { director->setOpenGLView(glview); // Set the design resolution -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - // a bug in DirectX 11 level9-x on the device prevents ResolutionPolicy::NO_BORDER from working correctly - glview->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::SHOW_ALL); -#else glview->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::NO_BORDER); -#endif Size frameSize = glview->getFrameSize(); diff --git a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj index 6d6907763d..148f148278 100644 --- a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj +++ b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj @@ -20,20 +20,18 @@ Application Unicode true - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp Application Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp @@ -49,7 +47,7 @@ - <_ProjectFileVersion>10.0.40219.1 + <_ProjectFileVersion>12.0.21005.1 $(SolutionDir)$(Configuration).win32\cpp-empty-test\ $(Configuration).win32\ true diff --git a/tests/cpp-empty-test/proj.win8.1-universal/HelloCpp.Shared/App.xaml.cpp b/tests/cpp-empty-test/proj.win8.1-universal/HelloCpp.Shared/App.xaml.cpp index f4365b88c5..a4069f4b56 100644 --- a/tests/cpp-empty-test/proj.win8.1-universal/HelloCpp.Shared/App.xaml.cpp +++ b/tests/cpp-empty-test/proj.win8.1-universal/HelloCpp.Shared/App.xaml.cpp @@ -1,21 +1,128 @@ #include "App.xaml.h" #include "OpenGLESPage.xaml.h" +using namespace Platform; +using namespace Windows::ApplicationModel; +using namespace Windows::ApplicationModel::Activation; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; +using namespace Windows::UI::Xaml::Media::Animation; +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::Interop; +using namespace Windows::UI::Xaml::Media; +using namespace Windows::UI::Xaml::Navigation; using namespace cocos2d; App::App() { InitializeComponent(); + Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending); } -void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +/// +/// Invoked when the application is launched normally by the end user. Other entry points +/// will be used when the application is launched to open a specific file, to display +/// search results, and so forth. +/// +/// Details about the launch request and process. +void App::OnLaunched(LaunchActivatedEventArgs^ e) { - if (mPage == nullptr) + auto rootFrame = dynamic_cast(Window::Current->Content); + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active. + if (rootFrame == nullptr) { - mPage = ref new OpenGLESPage(&mOpenGLES); + // Create a Frame to act as the navigation context and associate it with + // a SuspensionManager key + rootFrame = ref new Frame(); + + // TODO: Change this value to a cache size that is appropriate for your application. + rootFrame->CacheSize = 1; + + if (e->PreviousExecutionState == ApplicationExecutionState::Terminated) + { + // TODO: Restore the saved session state only when appropriate, scheduling the + // final launch steps after the restore is complete. + } + + // Place the frame in the current Window + Window::Current->Content = rootFrame; } - // 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(); + if (rootFrame->Content == nullptr) + { +#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP + // Removes the turnstile navigation for startup. + if (rootFrame->ContentTransitions != nullptr) + { + _transitions = ref new TransitionCollection(); + for (auto transition : rootFrame->ContentTransitions) + { + _transitions->Append(transition); + } + } + + rootFrame->ContentTransitions = nullptr; + _firstNavigatedToken = rootFrame->Navigated += ref new NavigatedEventHandler(this, &App::RootFrame_FirstNavigated); +#endif + + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter. + + rootFrame->Content = mPage = ref new OpenGLESPage(&mOpenGLES); + +#if 0 + if (!rootFrame->Navigate(OpenGLESPage::typeid, e->Arguments)) + { + throw ref new FailureException("Failed to create initial page"); + } +#endif + } + + // Ensure the current window is active + Window::Current->Activate(); +} + +#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP +/// +/// Restores the content transitions after the app has launched. +/// +void App::RootFrame_FirstNavigated(Object^ sender, NavigationEventArgs^ e) +{ + auto rootFrame = safe_cast(sender); + + TransitionCollection^ newTransitions; + if (_transitions == nullptr) + { + newTransitions = ref new TransitionCollection(); + newTransitions->Append(ref new NavigationThemeTransition()); + } + else + { + newTransitions = _transitions; + } + + rootFrame->ContentTransitions = newTransitions; + + rootFrame->Navigated -= _firstNavigatedToken; +} +#endif + +/// +/// Invoked when application execution is being suspended. Application state is saved +/// without knowing whether the application will be terminated or resumed with the contents +/// of memory still intact. +/// +void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e) +{ + (void) sender; // Unused parameter + (void) e; // Unused parameter + + // TODO: Save application state and stop any background activity } diff --git a/tests/cpp-empty-test/proj.win8.1-universal/HelloCpp.Shared/App.xaml.h b/tests/cpp-empty-test/proj.win8.1-universal/HelloCpp.Shared/App.xaml.h index 1309c610d7..e438eee247 100644 --- a/tests/cpp-empty-test/proj.win8.1-universal/HelloCpp.Shared/App.xaml.h +++ b/tests/cpp-empty-test/proj.win8.1-universal/HelloCpp.Shared/App.xaml.h @@ -13,6 +13,16 @@ namespace cocos2d virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; private: + +#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP + Windows::UI::Xaml::Media::Animation::TransitionCollection^ _transitions; + Windows::Foundation::EventRegistrationToken _firstNavigatedToken; + + void RootFrame_FirstNavigated(Platform::Object^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs^ e); +#endif + + void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e); + OpenGLESPage^ mPage; OpenGLES mOpenGLES; }; diff --git a/tests/cpp-tests/.cocos-project.json b/tests/cpp-tests/.cocos-project.json index 173028a970..34e7c97a15 100644 --- a/tests/cpp-tests/.cocos-project.json +++ b/tests/cpp-tests/.cocos-project.json @@ -1,7 +1,7 @@ { "win32_cfg": { "project_path": "../../build", - "sln_file": "cocos2d-win32.vc2012.sln", + "sln_file": "cocos2d-win32.vc2013.sln", "project_name": "cpp-tests", "build_cfg_path": "proj.win32" }, diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index 337fe8350f..b5705ba2d8 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -223,6 +223,12 @@ if(USE_BOX2D) ) endif() +if(USE_BULLET) + list(APPEND TESTS_SRC + Classes/Physics3DTest/Physics3DTest.cpp + ) +endif() + if(LINUX) set(EXTENDED_TESTS_SRC ) diff --git a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp index 52bb9e2c5e..21af5b7b5b 100644 --- a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp +++ b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp @@ -86,6 +86,7 @@ ActionsTests::ActionsTests() ADD_TEST_CASE(Issue1327); ADD_TEST_CASE(Issue1398); ADD_TEST_CASE(Issue2599) + ADD_TEST_CASE(ActionFloatTest); } std::string ActionsDemo::title() const @@ -2218,3 +2219,43 @@ std::string ActionRemoveSelf::subtitle() const { return "Sequence: Move + Rotate + Scale + RemoveSelf"; } + +//------------------------------------------------------------------ +// +// ActionFloat +// +//------------------------------------------------------------------ +void ActionFloatTest::onEnter() +{ + ActionsDemo::onEnter(); + + centerSprites(3); + + auto s = Director::getInstance()->getWinSize(); + + // create float action with duration and from to value, using lambda function we can easly animate any property of the Node. + auto actionFloat = ActionFloat::create(2.f, 0, 3, [this](float value) { + _tamara->setScale(value); + }); + + float grossiniY = _grossini->getPositionY(); + + auto actionFloat1 = ActionFloat::create(3.f, grossiniY, grossiniY + 50, [this](float value) { + _grossini->setPositionY(value); + }); + + auto actionFloat2 = ActionFloat::create(3.f, 3, 1, [this] (float value) { + _kathia->setScale(value); + }); + + _tamara->runAction(actionFloat); + _grossini->runAction(actionFloat1); + _kathia->runAction(actionFloat2); +} + +std::string ActionFloatTest::subtitle() const +{ + return "ActionFloat"; +} + + diff --git a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h index c639ced391..2bd1e6a6f0 100644 --- a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h +++ b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h @@ -580,4 +580,13 @@ private: cocos2d::Vector _pausedTargets; }; +class ActionFloatTest : public ActionsDemo +{ +public: + CREATE_FUNC(ActionFloatTest); + + virtual void onEnter() override; + virtual std::string subtitle() const override; +}; + #endif diff --git a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp index e23dc463b5..5a3500ec21 100644 --- a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp +++ b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp @@ -39,10 +39,7 @@ Camera3DTests::Camera3DTests() ADD_TEST_CASE(CameraRotationTest); ADD_TEST_CASE(Camera3DTestDemo); ADD_TEST_CASE(CameraCullingDemo); -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) - // 3DEffect use custom shader which is not supported on WP8 yet. ADD_TEST_CASE(FogTestDemo); -#endif ADD_TEST_CASE(CameraArcBallDemo); } @@ -1317,7 +1314,7 @@ void FogTestDemo::onEnter() _layer3D->setCameraMask(2); -#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*) { @@ -1380,7 +1377,7 @@ void FogTestDemo::onExit() _camera = 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) Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundListener); #endif } diff --git a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.h b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.h index f2350b11f4..6017d88ae9 100644 --- a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.h +++ b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.h @@ -250,7 +250,7 @@ protected: cocos2d::GLProgram* _shader; cocos2d::GLProgramState* _state; -#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) cocos2d::EventListenerCustom* _backToForegroundListener; #endif }; diff --git a/tests/cpp-tests/Classes/CocosDenshionTest/CocosDenshionTest.cpp b/tests/cpp-tests/Classes/CocosDenshionTest/CocosDenshionTest.cpp index 74dae4179e..7a6be1b285 100644 --- a/tests/cpp-tests/Classes/CocosDenshionTest/CocosDenshionTest.cpp +++ b/tests/cpp-tests/Classes/CocosDenshionTest/CocosDenshionTest.cpp @@ -14,7 +14,7 @@ #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #define MUSIC_FILE "music.mid" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #define MUSIC_FILE "background.wav" #elif (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX ) #define MUSIC_FILE "background.ogg" diff --git a/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.cpp b/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.cpp index 638e0c93aa..811da5a521 100644 --- a/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.cpp +++ b/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.cpp @@ -26,7 +26,7 @@ #include "../testResource.h" #include #include -#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 #include @@ -36,11 +36,6 @@ #include #endif -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 -#include "CCWinRTUtils.h" -#include -#endif - USING_NS_CC; //------------------------------------------------------------------ @@ -86,24 +81,6 @@ ConsoleCustomCommand::ConsoleCustomCommand() }}, }; _console->addCommand(commands[0]); - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - - std::stringstream ss; - ss << "WP8 Device IP Addresses:" << std::endl; - ss << getDeviceIPAddresses(); - - auto origin = Director::getInstance()->getVisibleOrigin(); - auto visibleSize = Director::getInstance()->getVisibleSize(); - auto label = LabelTTF::create(ss.str(), "Arial", 12); - - // position the label on the center of the screen - label->setPosition(origin.x + visibleSize.width/2, - origin.y + visibleSize.height/2 + (label->getContentSize().height/2)); - - // add the label as a child to this layer - this->addChild(label, 1); -#endif } ConsoleCustomCommand::~ConsoleCustomCommand() @@ -122,11 +99,7 @@ std::string ConsoleCustomCommand::title() const std::string ConsoleCustomCommand::subtitle() const { -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - return "telnet [ip address] 5678"; -#else return "telnet localhost 5678"; -#endif } @@ -174,7 +147,7 @@ void ConsoleUploadFile::uploadFile() hints.ai_flags = 0; hints.ai_protocol = 0; /* Any protocol */ -#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; WSAStartup(MAKEWORD(2, 2),&wsaData); #endif @@ -200,7 +173,7 @@ void ConsoleUploadFile::uploadFile() if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1) break; /* Success */ -#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(sfd); #else close(sfd); @@ -260,7 +233,7 @@ void ConsoleUploadFile::uploadFile() // terminate fclose (fp); -#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(sfd); WSACleanup(); #else diff --git a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp index f7f2ffdced..dd35fe5e95 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp @@ -14,7 +14,7 @@ #include "CocoStudioComponentsTest/ComponentsTestScene.h" #include "CocoStudioSceneTest/SceneEditorTest.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "NetworkTest/WebSocketTest.h" #include "NetworkTest/SocketIOTest.h" #endif @@ -28,7 +28,7 @@ ExtensionsTests::ExtensionsTests() #if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) && (CC_TARGET_PLATFORM != CC_PLATFORM_NACL) addTest("HttpClientTest", [](){ return new (std::nothrow) HttpClientTests; }); #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) addTest("WebSocketTest", [](){ return new (std::nothrow) WebSocketTests; }); addTest("SocketIOTest", [](){ return new (std::nothrow) SocketIOTests; }); #endif diff --git a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp index a2aa256e28..4c68128863 100644 --- a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp +++ b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp @@ -76,7 +76,8 @@ NewLabelTests::NewLabelTests() ADD_TEST_CASE(LabelIssue10089Test); ADD_TEST_CASE(LabelSystemFontColor); ADD_TEST_CASE(LabelIssue10773Test); - ADD_TEST_CASE(LabelIssue10576Test); + ADD_TEST_CASE(LabelIssue11576Test); + ADD_TEST_CASE(LabelIssue11699Test); }; LabelTTFAlignmentNew::LabelTTFAlignmentNew() @@ -1886,7 +1887,7 @@ std::string LabelIssue10773Test::subtitle() const return "Should not crash!"; } -LabelIssue10576Test::LabelIssue10576Test() +LabelIssue11576Test::LabelIssue11576Test() { auto center = VisibleRect::center(); @@ -1904,12 +1905,32 @@ LabelIssue10576Test::LabelIssue10576Test() addChild(label); } -std::string LabelIssue10576Test::title() const +std::string LabelIssue11576Test::title() const { - return "Test for Issue #10576"; + return "Test for Issue #11576"; } -std::string LabelIssue10576Test::subtitle() const +std::string LabelIssue11576Test::subtitle() const { return "You should see another string displayed correctly after 2 seconds."; } + +LabelIssue11699Test::LabelIssue11699Test() +{ + auto center = VisibleRect::center(); + + auto label = Label::createWithTTF("中国", "fonts/HKYuanMini.ttf", 150); + label->enableOutline(Color4B::RED, 2); + label->setPosition(center.x, center.y); + addChild(label); +} + +std::string LabelIssue11699Test::title() const +{ + return "Test for Issue #11699"; +} + +std::string LabelIssue11699Test::subtitle() const +{ + return "Outline should match with the characters exactly."; +} diff --git a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h index dffc7e912e..54bcb92be4 100644 --- a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h +++ b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h @@ -565,12 +565,23 @@ public: virtual std::string subtitle() const override; }; -class LabelIssue10576Test : public AtlasDemoNew +class LabelIssue11576Test : public AtlasDemoNew { public: - CREATE_FUNC(LabelIssue10576Test); + CREATE_FUNC(LabelIssue11576Test); - LabelIssue10576Test(); + LabelIssue11576Test(); + + virtual std::string title() const override; + virtual std::string subtitle() const override; +}; + +class LabelIssue11699Test : public AtlasDemoNew +{ +public: + CREATE_FUNC(LabelIssue11699Test); + + LabelIssue11699Test(); virtual std::string title() const override; virtual std::string subtitle() const override; diff --git a/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp b/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp index d41be524b5..9679b9818b 100644 --- a/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp +++ b/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp @@ -24,25 +24,30 @@ ****************************************************************************/ #include "MaterialSystemTest.h" + +#include + #include "../testResource.h" #include "cocos2d.h" -#include "renderer/CCMaterial.h" - USING_NS_CC; +static void printProperties(Properties* properties, int indent); + + +// MARK: Tests + MaterialSystemTest::MaterialSystemTest() { + ADD_TEST_CASE(Material_2DEffects); + ADD_TEST_CASE(Material_setTechnique); + ADD_TEST_CASE(Material_clone); ADD_TEST_CASE(Material_MultipleSprite3D); ADD_TEST_CASE(Material_Sprite3DTest); - -// ADD_TEST_CASE(Material_SpriteTest); - + ADD_TEST_CASE(Material_parsePerformance); } -// MARK: - std::string MaterialSystemBaseTest::title() const { return "Material System"; @@ -50,36 +55,6 @@ std::string MaterialSystemBaseTest::title() const // MARK: Tests start here -void Material_SpriteTest::onEnter() -{ - // Material remove from Sprite since it is hacking. - // Sprite (or Node) should have "Effect" instead of "Material" - - MaterialSystemBaseTest::onEnter(); - auto layer = LayerColor::create(Color4B::BLUE); - this->addChild(layer); - - - auto sprite = Sprite::create("Images/grossini.png"); - sprite->setNormalizedPosition(Vec2(0.5, 0.5)); - this->addChild(sprite); - -// auto material = Material::createWithFilename("Materials/effects.material"); -// sprite->setMaterial(material); - -// material->setTechnique("blur"); -// material->setTechnique("outline"); -// material->setTechnique("noise"); -// material->setTechnique("edge detect"); -// material->setTechnique("gray+blur"); -} - -std::string Material_SpriteTest::subtitle() const -{ - return "Material System on Sprite"; -} - - void Material_Sprite3DTest::onEnter() { MaterialSystemBaseTest::onEnter(); @@ -89,9 +64,6 @@ void Material_Sprite3DTest::onEnter() sprite->setTexture("Sprite3DTest/boss.png"); this->addChild(sprite); sprite->setNormalizedPosition(Vec2(0.5,0.5)); - -// auto material = Material::createWithFilename("Materials/spaceship.material"); -// sprite->setMaterial(material); } std::string Material_Sprite3DTest::subtitle() const @@ -99,10 +71,6 @@ std::string Material_Sprite3DTest::subtitle() const return "Material System on Sprite3D"; } - -// -// -// void Material_MultipleSprite3D::onEnter() { MaterialSystemBaseTest::onEnter(); @@ -136,3 +104,216 @@ std::string Material_MultipleSprite3D::subtitle() const return "Sprites with multiple meshes"; } +// +// +// +void Material_2DEffects::onEnter() +{ + MaterialSystemBaseTest::onEnter(); + + auto properties = Properties::createWithoutAutorelease("Materials/2d_effects.material#sample"); + + // Print the properties of every namespace within this one. + printProperties(properties, 0); + + Material *mat1 = Material::createWithProperties(properties); + + auto spriteBlur = Sprite::create("Images/grossini.png"); + spriteBlur->setNormalizedPosition(Vec2(0.2, 0.5)); + 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)); + 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)); + 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)); + this->addChild(spriteEdgeDetect); + spriteEdgeDetect->setGLProgramState(mat1->getTechniqueByName("edge_detect")->getPassByIndex(0)->getGLProgramState()); + + // properties is not a "Ref" object + CC_SAFE_DELETE(properties); +} + +std::string Material_2DEffects::subtitle() const +{ + return "Testing effects on Sprite"; +} + +// +// +// +void Material_setTechnique::onEnter() +{ + MaterialSystemBaseTest::onEnter(); + + auto sprite = Sprite3D::create("Sprite3DTest/boss1.obj"); + sprite->setScale(6); + this->addChild(sprite); + sprite->setNormalizedPosition(Vec2(0.5,0.5)); + _sprite = sprite; + + + Material *mat = Material::createWithFilename("Materials/3d_effects.material"); + sprite->setMaterial(mat); + + // lights + auto light1 = AmbientLight::create(Color3B::RED); + addChild(light1); + + auto light2 = DirectionLight::create(Vec3(-1,1,0), Color3B::GREEN); + addChild(light2); + + this->schedule(CC_CALLBACK_1(Material_setTechnique::changeMaterial, this), 1, "cookie"); + _techniqueState = 0; + + auto rot = RotateBy::create(5, Vec3(30,60,270)); + auto repeat = RepeatForever::create(rot); + sprite->runAction(repeat); +} + +std::string Material_setTechnique::subtitle() const +{ + return "Testing setTechnique()"; +} + +void Material_setTechnique::changeMaterial(float dt) +{ + // get it from Mesh 0 + switch (_techniqueState) + { + case 0: + _sprite->getMaterial(0)->setTechnique("lit"); + break; + case 1: + _sprite->getMaterial(0)->setTechnique("normal"); + break; + case 2: + _sprite->getMaterial(0)->setTechnique("outline"); + break; + default: + break; + } + + _techniqueState++; + if (_techniqueState>2) + _techniqueState = 0; +} + +// +// +// +void Material_clone::onEnter() +{ + MaterialSystemBaseTest::onEnter(); + + auto sprite = Sprite3D::create("Sprite3DTest/boss1.obj"); + sprite->setScale(3); + this->addChild(sprite); + sprite->setNormalizedPosition(Vec2(0.25, 0.5)); + + Material *mat = Material::createWithFilename("Materials/3d_effects.material"); + sprite->setMaterial(mat); + + auto rot = RotateBy::create(5, Vec3(360,240,120)); + auto repeat = RepeatForever::create(rot); + sprite->runAction(repeat); + + // sprite 2... using same material + auto sprite2 = Sprite3D::create("Sprite3DTest/boss1.obj"); + sprite2->setScale(3); + this->addChild(sprite2); + sprite2->setNormalizedPosition(Vec2(0.5, 0.5)); + sprite2->setMaterial(mat); + sprite2->runAction(repeat->clone()); + + // sprite 3... using cloned material + auto sprite3 = Sprite3D::create("Sprite3DTest/boss1.obj"); + sprite3->setScale(3); + this->addChild(sprite3); + sprite3->setNormalizedPosition(Vec2(0.75, 0.5)); + auto mat2 = mat->clone(); + sprite3->setMaterial(mat2); + sprite3->runAction(repeat->clone()); + + // testing clone + // should affect both sprite 1 and sprite 2 + mat->setTechnique("outline"); + + // should affect only sprite 3 +// mat2->setTechnique("normal"); + +} + +std::string Material_clone::subtitle() const +{ + return "Testing material->clone()"; +} + +// +// +// +void Material_parsePerformance::onEnter() +{ + MaterialSystemBaseTest::onEnter(); + + std::clock_t begin = std::clock(); + + for(int i=0;i<5000;i++) + { + Material::createWithFilename("Materials/2d_effects.material"); + Material::createWithFilename("Materials/3d_effects.material"); + } + + std::clock_t end = std::clock(); + double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC; + + log("Parsing took: %f", elapsed_secs); +} + +std::string Material_parsePerformance::subtitle() const +{ + return "Testing parsing performance"; +} + +// MARK: Helper functions + +static void printProperties(Properties* properties, int indent) +{ + // Print the name and ID of the current namespace. + const char* spacename = properties->getNamespace(); + const char* id = properties->getId(); + char chindent[64]; + int i=0; + for(i=0; igetNextProperty(); + const char* value = NULL; + while (name != NULL) + { + value = properties->getString(name); + log("%s%s = %s", chindent, name, value); + name = properties->getNextProperty(); + } + + Properties* space = properties->getNextNamespace(); + while (space != NULL) + { + printProperties(space, indent+1); + space = properties->getNextNamespace(); + } + + log("%s}\n",chindent); +} diff --git a/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.h b/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.h index 7ff09279d5..a16d20939b 100644 --- a/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.h +++ b/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.h @@ -35,15 +35,6 @@ public: virtual std::string title() const override; }; -class Material_SpriteTest : public MaterialSystemBaseTest -{ -public: - CREATE_FUNC(Material_SpriteTest); - - virtual void onEnter() override; - virtual std::string subtitle() const override; -}; - class Material_Sprite3DTest : public MaterialSystemBaseTest { public: @@ -62,4 +53,46 @@ public: virtual std::string subtitle() const override; }; +class Material_2DEffects : public MaterialSystemBaseTest +{ +public: + CREATE_FUNC(Material_2DEffects); + + virtual void onEnter() override; + virtual std::string subtitle() const override; +}; + +class Material_setTechnique : public MaterialSystemBaseTest +{ +public: + CREATE_FUNC(Material_setTechnique); + + virtual void onEnter() override; + virtual std::string subtitle() const override; + +private: + void changeMaterial(float dt); + + cocos2d::Sprite3D* _sprite; + int _techniqueState; +}; + +class Material_clone : public MaterialSystemBaseTest +{ +public: + CREATE_FUNC(Material_clone); + + virtual void onEnter() override; + virtual std::string subtitle() const override; +}; + +class Material_parsePerformance : public MaterialSystemBaseTest +{ +public: + CREATE_FUNC(Material_parsePerformance); + + virtual void onEnter() override; + virtual std::string subtitle() const override; +}; + diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.cpp index 392d234b55..fe39b0f78a 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.cpp @@ -35,21 +35,17 @@ using namespace cocos2d::ui; #undef CC_PROFILER_RESET_INSTANCE #define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ ProfilingResetTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) -static std::function createFunctions[] = +PerformceAllocTests::PerformceAllocTests() { - CL(NodeCreateTest), - CL(NodeDeallocTest), - CL(SpriteCreateEmptyTest), - CL(SpriteCreateTest), - CL(SpriteDeallocTest), -}; - -#define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0])) + ADD_TEST_CASE(NodeCreateTest); + ADD_TEST_CASE(NodeDeallocTest); + ADD_TEST_CASE(SpriteCreateEmptyTest); + ADD_TEST_CASE(SpriteCreateTest); + ADD_TEST_CASE(SpriteDeallocTest); +} enum { kTagInfoLayer = 1, - - kTagBase = 20000, }; enum { @@ -57,59 +53,29 @@ enum { kNodesIncrease = 500, }; -static int g_curCase = 0; - -//////////////////////////////////////////////////////// -// -// AllocBasicLayer -// -//////////////////////////////////////////////////////// - -AllocBasicLayer::AllocBasicLayer(bool bControlMenuVisible, int nMaxCases, int nCurCase) -: PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) -{ -} - -void AllocBasicLayer::showCurrentTest() -{ - int nodes = ((PerformceAllocScene*)getParent())->getQuantityOfNodes(); - - auto scene = createFunctions[_curCase](); - - g_curCase = _curCase; - - if (scene) - { - scene->initWithQuantityOfNodes(nodes); - - Director::getInstance()->replaceScene(scene); - } -} +int PerformceAllocScene::quantityOfNodes = kNodesIncrease; //////////////////////////////////////////////////////// // // PerformceAllocScene // //////////////////////////////////////////////////////// +bool PerformceAllocScene::init() +{ + if (TestCase::init()) + { + initWithQuantityOfNodes(quantityOfNodes); + return true; + } + + return false; +} + void PerformceAllocScene::initWithQuantityOfNodes(unsigned int nNodes) { //srand(time()); auto s = Director::getInstance()->getWinSize(); - // Title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1); - label->setPosition(Vec2(s.width/2, s.height-50)); - - // Subtitle - std::string strSubTitle = subtitle(); - if(strSubTitle.length()) - { - auto l = Label::createWithTTF(strSubTitle.c_str(), "fonts/Thonburi.ttf", 16); - addChild(l, 1); - l->setPosition(Vec2(s.width/2, s.height-80)); - } - lastRenderedCount = 0; currentQuantityOfNodes = 0; quantityOfNodes = nNodes; @@ -150,10 +116,6 @@ void PerformceAllocScene::initWithQuantityOfNodes(unsigned int nNodes) infoLabel->setPosition(Vec2(s.width/2, s.height/2-15)); addChild(infoLabel, 1, kTagInfoLayer); - auto menuLayer = new (std::nothrow) AllocBasicLayer(true, MAX_LAYER, g_curCase); - addChild(menuLayer); - menuLayer->release(); - updateQuantityLabel(); updateQuantityOfNodes(); updateProfilerName(); @@ -472,12 +434,3 @@ const char* SpriteDeallocTest::testName() { return "Sprite::~Sprite()"; } - -///---------------------------------------- -void runAllocPerformanceTest() -{ - auto scene = createFunctions[g_curCase](); - scene->initWithQuantityOfNodes(kNodesIncrease); - - Director::getInstance()->replaceScene(scene); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.h index 751dc289dd..fd70b950df 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.h @@ -4,19 +4,14 @@ #ifndef __PERFORMANCE_ALLOC_TEST_H__ #define __PERFORMANCE_ALLOC_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class AllocBasicLayer : public PerformBasicLayer -{ -public: - AllocBasicLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0); - - virtual void showCurrentTest(); -}; - -class PerformceAllocScene : public cocos2d::Scene +DEFINE_TEST_SUITE(PerformceAllocTests); + +class PerformceAllocScene : public TestCase { public: + virtual bool init() override; virtual void initWithQuantityOfNodes(unsigned int nNodes); virtual std::string title() const; virtual std::string subtitle() const; @@ -41,7 +36,7 @@ public: protected: char _profilerName[256]; int lastRenderedCount; - int quantityOfNodes; + static int quantityOfNodes; int currentQuantityOfNodes; }; @@ -115,7 +110,4 @@ public: virtual std::string subtitle() const override; }; - -void runAllocPerformanceTest(); - #endif // __PERFORMANCE_ALLOC_TEST_H__ diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp index 1ca4d3f649..20da0f7f0a 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp @@ -34,39 +34,11 @@ USING_NS_CC; #undef CC_PROFILER_RESET_INSTANCE #define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ ProfilingResetTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) -static std::function createFunctions[] = +PerformceCallbackTests::PerformceCallbackTests() { - CL(SimulateNewSchedulerCallbackPerfTest), - CL(InvokeMemberFunctionPerfTest), - CL(InvokeStdFunctionPerfTest), -}; - -#define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0])) - - -static int g_curCase = 0; - -//////////////////////////////////////////////////////// -// -// CallbackBasicLayer -// -//////////////////////////////////////////////////////// - -CallbackBasicLayer::CallbackBasicLayer(bool bControlMenuVisible, int nMaxCases, int nCurCase) -: PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) -{ -} - -void CallbackBasicLayer::showCurrentTest() -{ - auto scene = createFunctions[_curCase](); - - g_curCase = _curCase; - - if (scene) - { - Director::getInstance()->replaceScene(scene); - } + ADD_TEST_CASE(SimulateNewSchedulerCallbackPerfTest); + ADD_TEST_CASE(InvokeMemberFunctionPerfTest); + ADD_TEST_CASE(InvokeStdFunctionPerfTest); } //////////////////////////////////////////////////////// @@ -81,26 +53,6 @@ void PerformanceCallbackScene::onEnter() CC_PROFILER_PURGE_ALL(); - auto s = Director::getInstance()->getWinSize(); - - auto menuLayer = new (std::nothrow) CallbackBasicLayer(true, MAX_LAYER, g_curCase); - addChild(menuLayer); - menuLayer->release(); - - // Title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1); - label->setPosition(Vec2(s.width/2, s.height-50)); - - // Subtitle - std::string strSubTitle = subtitle(); - if(strSubTitle.length()) - { - auto l = Label::createWithTTF(strSubTitle.c_str(), "fonts/Thonburi.ttf", 16); - addChild(l, 1); - l->setPosition(Vec2(s.width/2, s.height-80)); - } - getScheduler()->schedule(CC_SCHEDULE_SELECTOR(PerformanceCallbackScene::onUpdate), this, 0.0f, false); getScheduler()->schedule(CC_SCHEDULE_SELECTOR(PerformanceCallbackScene::dumpProfilerInfo), this, 2, false); } @@ -210,10 +162,3 @@ void InvokeStdFunctionPerfTest::onUpdate(float dt) } CC_PROFILER_STOP(_profileName.c_str()); } - -void runCallbackPerformanceTest() -{ - auto scene = createFunctions[g_curCase](); - - Director::getInstance()->replaceScene(scene); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.h index 4db4b7c58b..bed606e66f 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.h @@ -4,17 +4,11 @@ #ifndef __PERFORMANCE_CALLBACK_TEST_H__ #define __PERFORMANCE_CALLBACK_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class CallbackBasicLayer : public PerformBasicLayer -{ -public: - CallbackBasicLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0); - - virtual void showCurrentTest(); -}; +DEFINE_TEST_SUITE(PerformceCallbackTests); -class PerformanceCallbackScene : public cocos2d::Scene +class PerformanceCallbackScene : public TestCase { public: virtual void onEnter() override; @@ -96,6 +90,4 @@ private: std::function _callback; }; -void runCallbackPerformanceTest(); - #endif /* __PERFORMANCE_CALLBACK_TEST_H__ */ diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.cpp index 84d1e020b2..5cd1753122 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.cpp @@ -33,17 +33,15 @@ USING_NS_CC; #undef CC_PROFILER_RESET_INSTANCE #define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ ProfilingResetTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) -static std::function createFunctions[] = +PerformceContainerTests::PerformceContainerTests() { - CL(TemplateVectorPerfTest), - CL(ArrayPerfTest), - CL(TemplateMapStringKeyPerfTest), - CL(DictionaryStringKeyPerfTest), - CL(TemplateMapIntKeyPerfTest), - CL(DictionaryIntKeyPerfTest) -}; - -#define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0])) + ADD_TEST_CASE(TemplateVectorPerfTest); + ADD_TEST_CASE(ArrayPerfTest); + ADD_TEST_CASE(TemplateMapStringKeyPerfTest); + ADD_TEST_CASE(DictionaryStringKeyPerfTest); + ADD_TEST_CASE(TemplateMapIntKeyPerfTest); + ADD_TEST_CASE(DictionaryIntKeyPerfTest); +} enum { kTagInfoLayer = 1, @@ -56,60 +54,30 @@ enum { kNodesIncrease = 500, }; -static int g_curCase = 0; - -//////////////////////////////////////////////////////// -// -// ContainerBasicLayer -// -//////////////////////////////////////////////////////// - -ContainerBasicLayer::ContainerBasicLayer(bool bControlMenuVisible, int nMaxCases, int nCurCase) -: PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) -{ -} - -void ContainerBasicLayer::showCurrentTest() -{ - int nodes = ((PerformanceContainerScene*)getParent())->getQuantityOfNodes(); - - auto scene = createFunctions[_curCase](); - - g_curCase = _curCase; - - if (scene) - { - scene->initWithQuantityOfNodes(nodes); - - Director::getInstance()->replaceScene(scene); - } -} +int PerformanceContainerScene::quantityOfNodes = kNodesIncrease; //////////////////////////////////////////////////////// // // PerformanceContainerScene // //////////////////////////////////////////////////////// +bool PerformanceContainerScene::init() +{ + if (TestCase::init()) + { + initWithQuantityOfNodes(quantityOfNodes); + return true; + } + + return false; +} + void PerformanceContainerScene::initWithQuantityOfNodes(unsigned int nNodes) { _type = 0; //srand(time()); auto s = Director::getInstance()->getWinSize(); - // Title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1, TAG_TITLE); - label->setPosition(Vec2(s.width/2, s.height-50)); - - // Subtitle - std::string strSubTitle = subtitle(); - if(strSubTitle.length()) - { - auto l = Label::createWithTTF(strSubTitle.c_str(), "fonts/Thonburi.ttf", 16); - addChild(l, 1, TAG_SUBTITLE); - l->setPosition(Vec2(s.width/2, s.height-80)); - } - lastRenderedCount = 0; currentQuantityOfNodes = 0; quantityOfNodes = nNodes; @@ -153,10 +121,6 @@ void PerformanceContainerScene::initWithQuantityOfNodes(unsigned int nNodes) infoLabel->setPosition(Vec2(s.width/2, s.height/2-15)); addChild(infoLabel, 1, kTagInfoLayer); - auto menuLayer = new (std::nothrow) ContainerBasicLayer(true, MAX_LAYER, g_curCase); - addChild(menuLayer); - menuLayer->release(); - log("Size of Node: %d\n", (int)sizeof(Node)); int oldFontSize = MenuItemFont::getFontSize(); @@ -177,8 +141,7 @@ void PerformanceContainerScene::initWithQuantityOfNodes(unsigned int nNodes) auto toggle = MenuItemToggle::createWithCallback([this](Ref* sender){ auto toggle = static_cast(sender); this->_type = toggle->getSelectedIndex(); - auto label = static_cast(this->getChildByTag(TAG_SUBTITLE)); - label->setString(StringUtils::format("Test '%s', See console", this->_testFunctions[this->_type].name)); + _subtitleLabel->setString(StringUtils::format("Test '%s', See console", this->_testFunctions[this->_type].name)); this->updateProfilerName(); }, toggleItems); @@ -1357,13 +1320,3 @@ std::string DictionaryIntKeyPerfTest::subtitle() const { return "Test `setObject`, See console"; } - - -///---------------------------------------- -void runContainerPerformanceTest() -{ - auto scene = createFunctions[g_curCase](); - scene->initWithQuantityOfNodes(kNodesIncrease); - - Director::getInstance()->replaceScene(scene); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.h index 9a301f61ec..6fc135a7e0 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.h @@ -4,17 +4,11 @@ #ifndef __PERFORMANCE_CONTAINER_TEST_H__ #define __PERFORMANCE_CONTAINER_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class ContainerBasicLayer : public PerformBasicLayer -{ -public: - ContainerBasicLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0); - - virtual void showCurrentTest(); -}; +DEFINE_TEST_SUITE(PerformceContainerTests); -class PerformanceContainerScene : public cocos2d::Scene +class PerformanceContainerScene : public TestCase { public: static const int TAG_TITLE = 100; @@ -26,6 +20,7 @@ public: std::function func; }; + virtual bool init() override; virtual void initWithQuantityOfNodes(unsigned int nNodes); virtual void generateTestFunctions() = 0; @@ -46,9 +41,10 @@ public: virtual void update(float dt) override; protected: + static int quantityOfNodes; + char _profilerName[256]; int lastRenderedCount; - int quantityOfNodes; int currentQuantityOfNodes; unsigned int _type; std::vector _testFunctions; @@ -126,6 +122,4 @@ public: virtual std::string subtitle() const override; }; -void runContainerPerformanceTest(); - #endif // __PERFORMANCE_CONTAINER_TEST_H__ diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp index 6852448a51..71e7b12c5b 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp @@ -34,14 +34,12 @@ USING_NS_CC; #undef CC_PROFILER_RESET_INSTANCE #define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ ProfilingResetTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) -static std::function createFunctions[] = +PerformceEventDispatcherTests::PerformceEventDispatcherTests() { - CL(TouchEventDispatchingPerfTest), - CL(KeyboardEventDispatchingPerfTest), - CL(CustomEventDispatchingPerfTest), -}; - -#define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0])) + ADD_TEST_CASE(TouchEventDispatchingPerfTest); + ADD_TEST_CASE(KeyboardEventDispatchingPerfTest); + ADD_TEST_CASE(CustomEventDispatchingPerfTest); +} enum { kTagInfoLayer = 1, @@ -54,69 +52,39 @@ enum { kNodesIncrease = 500, }; -static int g_curCase = 0; - -//////////////////////////////////////////////////////// -// -// EventDispatcherBasicLayer -// -//////////////////////////////////////////////////////// - -EventDispatcherBasicLayer::EventDispatcherBasicLayer(bool bControlMenuVisible, int nMaxCases, int nCurCase) -: PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) -{ -} - -void EventDispatcherBasicLayer::showCurrentTest() -{ - int nodes = ((PerformanceEventDispatcherScene*)getParent())->getQuantityOfNodes(); - - auto scene = createFunctions[_curCase](); - - g_curCase = _curCase; - - if (scene) - { - scene->initWithQuantityOfNodes(nodes); - - Director::getInstance()->replaceScene(scene); - } -} +int PerformanceEventDispatcherScene::quantityOfNodes = kNodesIncrease; //////////////////////////////////////////////////////// // // PerformanceEventDispatcherScene // //////////////////////////////////////////////////////// +bool PerformanceEventDispatcherScene::init() +{ + if (TestCase::init()) + { + initWithQuantityOfNodes(quantityOfNodes); + return true; + } + + return false; +} + void PerformanceEventDispatcherScene::initWithQuantityOfNodes(unsigned int nNodes) { _type = 0; srand((unsigned)time(nullptr)); auto s = Director::getInstance()->getWinSize(); - // Title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1, TAG_TITLE); - label->setPosition(Vec2(s.width/2, s.height-50)); - - // Subtitle - std::string strSubTitle = subtitle(); - if(strSubTitle.length()) - { - auto l = Label::createWithTTF(strSubTitle.c_str(), "fonts/Thonburi.ttf", 16); - addChild(l, 1, TAG_SUBTITLE); - l->setPosition(Vec2(s.width/2, s.height-80)); - } - _lastRenderedCount = 0; _currentQuantityOfNodes = 0; - _quantityOfNodes = nNodes; + quantityOfNodes = nNodes; MenuItemFont::setFontSize(65); auto decrease = MenuItemFont::create(" - ", [&](Ref *sender) { - _quantityOfNodes -= kNodesIncrease; - if( _quantityOfNodes < 0 ) - _quantityOfNodes = 0; + quantityOfNodes -= kNodesIncrease; + if( quantityOfNodes < 0 ) + quantityOfNodes = 0; updateQuantityLabel(); updateQuantityOfNodes(); @@ -128,9 +96,9 @@ void PerformanceEventDispatcherScene::initWithQuantityOfNodes(unsigned int nNode _decrease = decrease; auto increase = MenuItemFont::create(" + ", [&](Ref *sender) { - _quantityOfNodes += kNodesIncrease; - if( _quantityOfNodes > kMaxNodes ) - _quantityOfNodes = kMaxNodes; + quantityOfNodes += kNodesIncrease; + if( quantityOfNodes > kMaxNodes ) + quantityOfNodes = kMaxNodes; updateQuantityLabel(); updateQuantityOfNodes(); @@ -151,10 +119,6 @@ void PerformanceEventDispatcherScene::initWithQuantityOfNodes(unsigned int nNode infoLabel->setPosition(Vec2(s.width/2, s.height/2-15)); addChild(infoLabel, 1, kTagInfoLayer); - auto menuLayer = new (std::nothrow) EventDispatcherBasicLayer(true, MAX_LAYER, g_curCase); - addChild(menuLayer); - menuLayer->release(); - int oldFontSize = MenuItemFont::getFontSize(); MenuItemFont::setFontSize(24); @@ -191,8 +155,7 @@ void PerformanceEventDispatcherScene::initWithQuantityOfNodes(unsigned int nNode auto toggle = MenuItemToggle::createWithCallback([=](Ref* sender){ auto toggle = static_cast(sender); this->_type = toggle->getSelectedIndex(); - auto label = static_cast(this->getChildByTag(TAG_SUBTITLE)); - label->setString(StringUtils::format("Test '%s', See console", this->_testFunctions[this->_type].name)); + _subtitleLabel->setString(StringUtils::format("Test '%s', See console", this->_testFunctions[this->_type].name)); this->updateProfilerName(); reset(); }, toggleItems); @@ -264,11 +227,11 @@ std::string PerformanceEventDispatcherScene::subtitle() const void PerformanceEventDispatcherScene::updateQuantityLabel() { - if( _quantityOfNodes != _lastRenderedCount ) + if( quantityOfNodes != _lastRenderedCount ) { auto infoLabel = static_cast( getChildByTag(kTagInfoLayer) ); char str[20] = {0}; - sprintf(str, "%u listeners", _quantityOfNodes); + sprintf(str, "%u listeners", quantityOfNodes); infoLabel->setString(str); } } @@ -280,7 +243,7 @@ const char * PerformanceEventDispatcherScene::profilerName() void PerformanceEventDispatcherScene::updateProfilerName() { - snprintf(_profilerName, sizeof(_profilerName)-1, "%s(%d)", testName(), _quantityOfNodes); + snprintf(_profilerName, sizeof(_profilerName)-1, "%s(%d)", testName(), quantityOfNodes); } void PerformanceEventDispatcherScene::dumpProfilerInfo(float dt) @@ -295,7 +258,7 @@ void PerformanceEventDispatcherScene::update(float dt) void PerformanceEventDispatcherScene::updateQuantityOfNodes() { - _currentQuantityOfNodes = _quantityOfNodes; + _currentQuantityOfNodes = quantityOfNodes; } const char* PerformanceEventDispatcherScene::testName() @@ -315,7 +278,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() TestFunction testFunctions[] = { { "OneByOne-scenegraph", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listener = EventListenerTouchOneByOne::create(); listener->onTouchBegan = [](Touch* touch, Event* event){ @@ -326,7 +289,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() listener->onTouchEnded = [](Touch* touch, Event* event){}; // Create new touchable nodes - for (int i = 0; i < this->_quantityOfNodes; ++i) + for (int i = 0; i < this->quantityOfNodes; ++i) { auto node = Node::create(); node->setTag(1000 + i); @@ -335,7 +298,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() dispatcher->addEventListenerWithSceneGraphPriority(listener->clone(), node); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } Size size = Director::getInstance()->getWinSize(); @@ -359,7 +322,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() { "OneByOne-fixed", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listener = EventListenerTouchOneByOne::create(); listener->onTouchBegan = [](Touch* touch, Event* event){ @@ -369,14 +332,14 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() listener->onTouchMoved = [](Touch* touch, Event* event){}; listener->onTouchEnded = [](Touch* touch, Event* event){}; - for (int i = 0; i < this->_quantityOfNodes; ++i) + for (int i = 0; i < this->quantityOfNodes; ++i) { auto l = listener->clone(); this->_fixedPriorityListeners.push_back(l); dispatcher->addEventListenerWithFixedPriority(l, i+1); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } Size size = Director::getInstance()->getWinSize(); @@ -400,7 +363,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() { "AllAtOnce-scenegraph", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listener = EventListenerTouchAllAtOnce::create(); listener->onTouchesBegan = [](const std::vector touches, Event* event){}; @@ -408,7 +371,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() listener->onTouchesEnded = [](const std::vector touches, Event* event){}; // Create new touchable nodes - for (int i = 0; i < this->_quantityOfNodes; ++i) + for (int i = 0; i < this->quantityOfNodes; ++i) { auto node = Node::create(); node->setTag(1000 + i); @@ -417,7 +380,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() dispatcher->addEventListenerWithSceneGraphPriority(listener->clone(), node); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } Size size = Director::getInstance()->getWinSize(); @@ -441,21 +404,21 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() { "AllAtOnce-fixed", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listener = EventListenerTouchAllAtOnce::create(); listener->onTouchesBegan = [](const std::vector touches, Event* event){}; listener->onTouchesMoved = [](const std::vector touches, Event* event){}; listener->onTouchesEnded = [](const std::vector touches, Event* event){}; - for (int i = 0; i < this->_quantityOfNodes; ++i) + for (int i = 0; i < this->quantityOfNodes; ++i) { auto l = listener->clone(); this->_fixedPriorityListeners.push_back(l); dispatcher->addEventListenerWithFixedPriority(l, i+1); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } Size size = Director::getInstance()->getWinSize(); @@ -479,7 +442,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() { "TouchModeMix-scenegraph", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listenerOneByOne = EventListenerTouchOneByOne::create(); listenerOneByOne->onTouchBegan = [](Touch* touch, Event* event){ @@ -496,7 +459,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() int i = 0; // Create new touchable nodes - for (; i < this->_quantityOfNodes/2; ++i) + for (; i < this->quantityOfNodes/2; ++i) { auto node = Node::create(); node->setTag(1000 + i); @@ -505,7 +468,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() dispatcher->addEventListenerWithSceneGraphPriority(listenerOneByOne->clone(), node); } - for (; i < this->_quantityOfNodes; ++i) + for (; i < this->quantityOfNodes; ++i) { auto node = Node::create(); node->setTag(1000 + i); @@ -514,7 +477,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() dispatcher->addEventListenerWithSceneGraphPriority(listenerAllAtOnce->clone(), node); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } Size size = Director::getInstance()->getWinSize(); @@ -538,7 +501,7 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() { "TouchModeMix-fixed", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listenerOneByOne = EventListenerTouchOneByOne::create(); listenerOneByOne->onTouchBegan = [](Touch* touch, Event* event){ @@ -555,21 +518,21 @@ void TouchEventDispatchingPerfTest::generateTestFunctions() int i = 0; - for (; i < this->_quantityOfNodes/2; ++i) + for (; i < this->quantityOfNodes/2; ++i) { auto l = listenerOneByOne->clone(); this->_fixedPriorityListeners.push_back(l); dispatcher->addEventListenerWithFixedPriority(l, i+1); } - for (; i < this->_quantityOfNodes; ++i) + for (; i < this->quantityOfNodes; ++i) { auto l = listenerAllAtOnce->clone(); this->_fixedPriorityListeners.push_back(l); dispatcher->addEventListenerWithFixedPriority(l, i+1); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } Size size = Director::getInstance()->getWinSize(); @@ -619,14 +582,14 @@ void KeyboardEventDispatchingPerfTest::generateTestFunctions() TestFunction testFunctions[] = { { "keyboard-scenegraph", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listener = EventListenerKeyboard::create(); listener->onKeyPressed = [](EventKeyboard::KeyCode keyCode, Event* event){}; listener->onKeyReleased = [](EventKeyboard::KeyCode keyCode, Event* event){}; // Create new nodes listen to keyboard event - for (int i = 0; i < this->_quantityOfNodes; ++i) + for (int i = 0; i < this->quantityOfNodes; ++i) { auto node = Node::create(); node->setTag(1000 + i); @@ -635,7 +598,7 @@ void KeyboardEventDispatchingPerfTest::generateTestFunctions() dispatcher->addEventListenerWithSceneGraphPriority(listener->clone(), node); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } EventKeyboard event(EventKeyboard::KeyCode::KEY_RETURN, true); @@ -647,20 +610,20 @@ void KeyboardEventDispatchingPerfTest::generateTestFunctions() { "keyboard-fixed", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listener = EventListenerKeyboard::create(); listener->onKeyPressed = [](EventKeyboard::KeyCode keyCode, Event* event){}; listener->onKeyReleased = [](EventKeyboard::KeyCode keyCode, Event* event){}; - for (int i = 0; i < this->_quantityOfNodes; ++i) + for (int i = 0; i < this->quantityOfNodes; ++i) { auto l = listener->clone(); this->_fixedPriorityListeners.push_back(l); dispatcher->addEventListenerWithFixedPriority(l, i+1); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } EventKeyboard event(EventKeyboard::KeyCode::KEY_RETURN, true); @@ -719,12 +682,12 @@ void CustomEventDispatchingPerfTest::generateTestFunctions() TestFunction testFunctions[] = { { "custom-scenegraph", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listener = EventListenerCustom::create("custom_event_test_scenegraph", [](EventCustom* event){}); // Create new nodes listen to custom event - for (int i = 0; i < this->_quantityOfNodes; ++i) + for (int i = 0; i < this->quantityOfNodes; ++i) { auto node = Node::create(); node->setTag(1000 + i); @@ -733,7 +696,7 @@ void CustomEventDispatchingPerfTest::generateTestFunctions() dispatcher->addEventListenerWithSceneGraphPriority(listener->clone(), node); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } EventCustom event("custom_event_test_scenegraph"); @@ -744,18 +707,18 @@ void CustomEventDispatchingPerfTest::generateTestFunctions() } } , { "custom-fixed", [=](){ auto dispatcher = Director::getInstance()->getEventDispatcher(); - if (_quantityOfNodes != _lastRenderedCount) + if (quantityOfNodes != _lastRenderedCount) { auto listener = EventListenerCustom::create("custom_event_test_fixed", [](EventCustom* event){}); - for (int i = 0; i < this->_quantityOfNodes; ++i) + for (int i = 0; i < this->quantityOfNodes; ++i) { auto l = listener->clone(); this->_fixedPriorityListeners.push_back(l); dispatcher->addEventListenerWithFixedPriority(l, i+1); } - _lastRenderedCount = _quantityOfNodes; + _lastRenderedCount = quantityOfNodes; } EventCustom event("custom_event_test_fixed"); @@ -781,13 +744,3 @@ std::string CustomEventDispatchingPerfTest::subtitle() const { return "Test 'custom-scenegraph', See console"; } - -///---------------------------------------- -void runEventDispatcherPerformanceTest() -{ - auto scene = createFunctions[g_curCase](); - scene->initWithQuantityOfNodes(kNodesIncrease); - - Director::getInstance()->replaceScene(scene); -} - diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.h index 54ac11e0ad..f840ca50cb 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.h @@ -4,17 +4,11 @@ #ifndef __PERFORMANCE_EVENTDISPATCHER_TEST_H__ #define __PERFORMANCE_EVENTDISPATCHER_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class EventDispatcherBasicLayer : public PerformBasicLayer -{ -public: - EventDispatcherBasicLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0); - - virtual void showCurrentTest(); -}; +DEFINE_TEST_SUITE(PerformceEventDispatcherTests); -class PerformanceEventDispatcherScene : public cocos2d::Scene +class PerformanceEventDispatcherScene : public TestCase { public: static const int TAG_TITLE = 100; @@ -26,6 +20,7 @@ public: std::function func; }; + virtual bool init() override; virtual void initWithQuantityOfNodes(unsigned int nNodes); virtual void generateTestFunctions() = 0; @@ -39,16 +34,16 @@ public: // for the profiler virtual const char* testName(); void updateQuantityLabel(); - int getQuantityOfNodes() { return _quantityOfNodes; } void dumpProfilerInfo(float dt); // overrides virtual void update(float dt) override; protected: + static int quantityOfNodes; + char _profilerName[256]; int _lastRenderedCount; - int _quantityOfNodes; int _currentQuantityOfNodes; unsigned int _type; std::vector _testFunctions; @@ -100,6 +95,4 @@ private: std::vector _customListeners; }; -void runEventDispatcherPerformanceTest(); - #endif /* defined(__PERFORMANCE_EVENTDISPATCHER_TEST_H__) */ diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.cpp index 15f9bc17f6..019df97a28 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.cpp @@ -28,50 +28,16 @@ enum { Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." - -//////////////////////////////////////////////////////// -// -// LabelMenuLayer -// -//////////////////////////////////////////////////////// -void LabelMenuLayer::restartCallback(Ref* sender) +PerformceLabelTests::PerformceLabelTests() { - if ( LabelMainScene::_s_autoTest ) - { - log("It's auto label performance testing,so this operation is invalid"); - return; - } - - PerformBasicLayer::restartCallback(sender); + LabelMainScene::_s_labelCurCase = 0; + addTestCase("LabelTTF Performance Test", [](){ return LabelMainScene::create(); }); + addTestCase("LabelBMFont Performance Test", [](){ return LabelMainScene::create(); }); + addTestCase("Label Performance Test", [](){ return LabelMainScene::create(); }); + addTestCase("LabelBMFont large text Performance", [](){ return LabelMainScene::create(); }); + addTestCase("Label large text Performance", [](){ return LabelMainScene::create(); }); } -void LabelMenuLayer::nextCallback(Ref* sender) -{ - if ( LabelMainScene::_s_autoTest ) - { - log("It's auto label performance testing,so this operation is invalid"); - return; - } - - PerformBasicLayer::nextCallback(sender); -} - -void LabelMenuLayer::backCallback(Ref* sender) -{ - if ( LabelMainScene::_s_autoTest ) - { - log("It's auto label performance testing,so this operation is invalid"); - return; - } - - PerformBasicLayer::backCallback(sender); -} - -void LabelMenuLayer::showCurrentTest() -{ - auto scene = (LabelMainScene*) getParent(); - scene->autoShowLabelTests(_curCase,LabelMainScene::AUTO_TEST_NODE_NUM); -} //////////////////////////////////////////////////////// // // LabelMainScene @@ -80,10 +46,16 @@ void LabelMenuLayer::showCurrentTest() bool LabelMainScene::_s_autoTest = false; int LabelMainScene::_s_labelCurCase = 0; +int LabelMainScene::NODE_TEST_COUNT = AUTO_TEST_NODE_NUM; -void LabelMainScene::initWithSubTest(int nodes) +bool LabelMainScene::init() { //srandom(0); + if (!TestCase::init()) + { + return false; + } + auto s = Director::getInstance()->getWinSize(); _lastRenderedCount = 0; @@ -108,11 +80,6 @@ void LabelMainScene::initWithSubTest(int nodes) infoLabel->setColor(Color3B(0,200,20)); infoLabel->setPosition(Vec2(s.width/2, s.height-90)); addChild(infoLabel, 1, kTagInfoLayer); - - // add menu - auto menuLayer = new (std::nothrow) LabelMenuLayer(true, TEST_COUNT, LabelMainScene::_s_labelCurCase); - addChild(menuLayer, 1, kTagMenuLayer); - menuLayer->release(); /** * auto test menu @@ -137,13 +104,11 @@ void LabelMainScene::initWithSubTest(int nodes) autoTestItem->setColor(Color3B::RED); menuAutoTest->addChild(autoTestItem); addChild( menuAutoTest, 3, kTagAutoTestMenu ); - - _title = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(_title, 1); - _title->setPosition(Vec2(s.width/2, s.height-50)); - while(_quantityNodes < nodes) + while (_quantityNodes < NODE_TEST_COUNT) onIncrease(this); + + return true; } std::string LabelMainScene::title() const @@ -190,7 +155,6 @@ void LabelMainScene::onIncrease(Ref* sender) return; auto size = Director::getInstance()->getWinSize(); - switch (_s_labelCurCase) { case kCaseLabelTTFUpdate: @@ -369,20 +333,6 @@ void LabelMainScene::onExit() Scene::onExit(); } -void LabelMainScene::autoShowLabelTests(int curCase,int nodes) -{ - LabelMainScene::_s_labelCurCase = curCase; - _title->setString(title()); - _vecFPS.clear(); - _executeTimes = 0; - _labelContainer->removeAllChildren(); - _lastRenderedCount = 0; - _quantityNodes = 0; - _accumulativeTime = 0.0f; - while(_quantityNodes < nodes) - onIncrease(this); -} - void LabelMainScene::endAutoTest() { LabelMainScene::_s_autoTest = false; @@ -395,8 +345,7 @@ void LabelMainScene::nextAutoTest() { if ( LabelMainScene::_s_labelCurCase + 1 < LabelMainScene::MAX_SUB_TEST_NUMS ) { - LabelMainScene::_s_labelCurCase += 1; - autoShowLabelTests(LabelMainScene::_s_labelCurCase, _quantityNodes); + nextTestCallback(nullptr); } else { @@ -407,7 +356,9 @@ void LabelMainScene::nextAutoTest() void LabelMainScene::finishAutoTest() { LabelMainScene::_s_autoTest = false; - + _vecFPS.clear(); + _executeTimes = 0; + auto autoTestMenu = dynamic_cast(getChildByTag(kTagAutoTestMenu)); if (nullptr != autoTestMenu) { @@ -424,13 +375,14 @@ void LabelMainScene::finishAutoTest() void LabelMainScene::onAutoTest(Ref* sender) { LabelMainScene::_s_autoTest = !LabelMainScene::_s_autoTest; + _vecFPS.clear(); + _executeTimes = 0; MenuItemFont* menuItem = dynamic_cast(sender); if (nullptr != menuItem) { if (LabelMainScene::_s_autoTest) { menuItem->setString("Auto Test On"); - autoShowLabelTests(0,_quantityNodes); } else { @@ -440,11 +392,23 @@ void LabelMainScene::onAutoTest(Ref* sender) } } -void runLabelTest() +void LabelMainScene::nextTestCallback(cocos2d::Ref* sender) { - LabelMainScene::_s_autoTest = false; - auto scene = new (std::nothrow) LabelMainScene; - scene->initWithSubTest(LabelMainScene::AUTO_TEST_NODE_NUM); - Director::getInstance()->replaceScene(scene); - scene->release(); + NODE_TEST_COUNT = _quantityNodes; + _s_labelCurCase = (_s_labelCurCase + 1) % MAX_SUB_TEST_NUMS; + TestCase::nextTestCallback(sender); +} + +void LabelMainScene::priorTestCallback(cocos2d::Ref* sender) +{ + NODE_TEST_COUNT = _quantityNodes; + if (_s_labelCurCase > 0) + { + _s_labelCurCase -= 1; + } + else + { + _s_labelCurCase = MAX_SUB_TEST_NUMS - 1; + } + TestCase::priorTestCallback(sender); } diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.h index 0020103733..51ced55498 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.h @@ -1,31 +1,21 @@ #ifndef __PERFORMANCE_LABEL_TEST_H__ #define __PERFORMANCE_LABEL_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class LabelMenuLayer : public PerformBasicLayer -{ -public: - LabelMenuLayer(bool controlMenuVisible, int maxCases = 0, int curCase = 0) - : PerformBasicLayer(controlMenuVisible, maxCases, curCase) - { - } +DEFINE_TEST_SUITE(PerformceLabelTests); - virtual void restartCallback(cocos2d::Ref* sender) override; - virtual void nextCallback(cocos2d::Ref* sender) override; - virtual void backCallback(cocos2d::Ref* sender) override; - virtual void showCurrentTest() override; -}; - -class LabelMainScene : public cocos2d::Scene +class LabelMainScene : public TestCase { public: static const int AUTO_TEST_NODE_NUM = 20; + CREATE_FUNC(LabelMainScene); + virtual ~LabelMainScene(); std::string title() const; - void initWithSubTest(int nodes); + virtual bool init() override; void updateNodes(); void onIncrease(cocos2d::Ref* sender); @@ -38,18 +28,19 @@ public: void updateText(float dt); void onAutoTest(cocos2d::Ref* sender); - void autoShowLabelTests(int curCase,int nodes); - virtual void onEnter() override; virtual void onExit() override; + virtual void nextTestCallback(cocos2d::Ref* sender) override; + virtual void priorTestCallback(cocos2d::Ref* sender) override; + static bool _s_autoTest; static int _s_labelCurCase; private: static const int MAX_AUTO_TEST_TIMES = 35; static const int MAX_SUB_TEST_NUMS = 5; - + static int NODE_TEST_COUNT; void dumpProfilerFPS(); @@ -57,8 +48,7 @@ private: void nextAutoTest(); void finishAutoTest(); - cocos2d::Layer* _labelContainer; - cocos2d::Label* _title; + cocos2d::Layer* _labelContainer; int _lastRenderedCount; int _quantityNodes; @@ -69,6 +59,4 @@ private: float _accumulativeTime; }; -void runLabelTest(); - #endif diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.cpp index db42a63201..4cb1ba50ce 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.cpp @@ -29,43 +29,18 @@ USING_NS_CC; #undef CC_PROFILER_RESET_INSTANCE #define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ ProfilingResetTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) -static const int TEST_COUNT = 2; -static int s_nTouchCurCase = 0; - static const int K_INFO_LOOP_TAG = 1581; -static PerformanceMathLayer* createLayer() +PerformceMathTests::PerformceMathTests() { - s_nTouchCurCase = s_nTouchCurCase % TEST_COUNT; - - PerformanceMathLayer* result = nullptr; - - switch (s_nTouchCurCase) { - case 0: - result = new PerformanceMathLayer1(true, TEST_COUNT, s_nTouchCurCase); - break; - case 1: - result = new PerformanceMathLayer2(true, TEST_COUNT, s_nTouchCurCase); - break; - default: - result = new PerformanceMathLayer1(true, TEST_COUNT, s_nTouchCurCase); - break; - } - - if(result) - { - result->autorelease(); - return result; - } - else - { - return nullptr; - } + ADD_TEST_CASE(PerformanceMathLayer1); + ADD_TEST_CASE(PerformanceMathLayer2); + ADD_TEST_CASE(PerformanceMathLayer1); } void PerformanceMathLayer::onEnter() { - PerformBasicLayer::onEnter(); + TestCase::onEnter(); _loopCount = 10000; _stepCount = 10000; @@ -73,19 +48,6 @@ void PerformanceMathLayer::onEnter() CC_PROFILER_PURGE_ALL(); auto s = Director::getInstance()->getWinSize(); - // Title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1); - label->setPosition(Vec2(s.width/2, s.height-50)); - - // Subtitle - std::string strSubTitle = subtitle(); - if(strSubTitle.length()) - { - auto l = Label::createWithTTF(strSubTitle.c_str(), "fonts/Thonburi.ttf", 16); - addChild(l, 1); - l->setPosition(Vec2(s.width/2, s.height-80)); - } MenuItemFont::setFontSize(65); auto decrease = MenuItemFont::create(" - ", CC_CALLBACK_1(PerformanceMathLayer::subLoopCount, this)); @@ -131,26 +93,6 @@ void PerformanceMathLayer::updateLoopLabel() } -void PerformanceMathLayer::restartCallback(Ref* sender) -{ - s_nTouchCurCase = 0; - runMathPerformanceTest(); -} - -void PerformanceMathLayer::nextCallback(Ref* sender) -{ - ++s_nTouchCurCase; - s_nTouchCurCase = s_nTouchCurCase % TEST_COUNT; - runMathPerformanceTest(); -} - -void PerformanceMathLayer::backCallback(Ref* sender) -{ - s_nTouchCurCase = s_nTouchCurCase + TEST_COUNT -1; - s_nTouchCurCase = s_nTouchCurCase % TEST_COUNT; - runMathPerformanceTest(); -} - void PerformanceMathLayer::dumpProfilerInfo(float dt) { CC_PROFILER_DISPLAY_TIMERS(); @@ -183,13 +125,3 @@ void PerformanceMathLayer2::doPerformanceTest(float dt) CC_PROFILER_STOP(_profileName.c_str()); } - -void runMathPerformanceTest() -{ - auto scene = Scene::create(); - auto layer = createLayer(); - - scene->addChild(layer); - - Director::getInstance()->replaceScene(scene); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.h index c0b331de66..beb22fa5bf 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.h @@ -1,14 +1,15 @@ #ifndef __PERFORMANCE_MATH_TEST_H__ #define __PERFORMANCE_MATH_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class PerformanceMathLayer : public PerformBasicLayer +DEFINE_TEST_SUITE(PerformceMathTests); + +class PerformanceMathLayer : public TestCase { public: - PerformanceMathLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0): - PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) - , _loopCount(1000) + PerformanceMathLayer() + : _loopCount(1000) , _stepCount(500) , _profileName("") { @@ -16,11 +17,6 @@ public: } virtual void onEnter() override; - virtual void restartCallback(cocos2d::Ref* sender) override; - virtual void nextCallback(cocos2d::Ref* sender) override; - virtual void backCallback(cocos2d::Ref* sender) override; - - virtual void showCurrentTest() {} virtual std::string title() const { return "Math Performance Test"; } virtual std::string subtitle() const { return "PerformanceMathLayer subTitle"; } @@ -41,8 +37,9 @@ protected: class PerformanceMathLayer1 : public PerformanceMathLayer { public: - PerformanceMathLayer1(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0): - PerformanceMathLayer(bControlMenuVisible, nMaxCases, nCurCase) + CREATE_FUNC(PerformanceMathLayer1); + + PerformanceMathLayer1() { _profileName = "profile_Mat4*Mat4"; } @@ -56,8 +53,9 @@ private: class PerformanceMathLayer2 : public PerformanceMathLayer { public: - PerformanceMathLayer2(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0): - PerformanceMathLayer(bControlMenuVisible, nMaxCases, nCurCase) + CREATE_FUNC(PerformanceMathLayer2); + + PerformanceMathLayer2() { _profileName = "profile_MatTransformVec4"; } @@ -68,6 +66,4 @@ public: }; -void runMathPerformanceTest(); - #endif //__PERFORMANCE_MATH_TEST_H__ diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp index 5593c14d20..0a615d8868 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp @@ -30,26 +30,21 @@ USING_NS_CC; #undef CC_PROFILER_RESET_INSTANCE #define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ ProfilingResetTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) -static std::function createFunctions[] = +PerformceNodeChildrenTests::PerformceNodeChildrenTests() { - CL(IterateSpriteSheetForLoop), - CL(IterateSpriteSheetIterator), - CL(IterateSpriteSheetForEach), - - CL(CallFuncsSpriteSheetForEach), - - CL(AddSprite), - CL(AddSpriteSheet), - CL(GetSpriteSheet), - CL(RemoveSprite), - CL(RemoveSpriteSheet), - CL(ReorderSpriteSheet), - CL(SortAllChildrenSpriteSheet), - - CL(VisitSceneGraph), -}; - -#define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0])) + ADD_TEST_CASE(IterateSpriteSheetForLoop); + ADD_TEST_CASE(IterateSpriteSheetIterator); + ADD_TEST_CASE(IterateSpriteSheetForEach); + ADD_TEST_CASE(CallFuncsSpriteSheetForEach); + ADD_TEST_CASE(AddSprite); + ADD_TEST_CASE(AddSpriteSheet); + ADD_TEST_CASE(GetSpriteSheet); + ADD_TEST_CASE(RemoveSprite); + ADD_TEST_CASE(RemoveSpriteSheet); + ADD_TEST_CASE(ReorderSpriteSheet); + ADD_TEST_CASE(SortAllChildrenSpriteSheet); + ADD_TEST_CASE(VisitSceneGraph); +} enum { kTagInfoLayer = 1, @@ -62,81 +57,51 @@ enum { kNodesIncrease = 500, }; -static int g_curCase = 0; - -//////////////////////////////////////////////////////// -// -// NodeChildrenMenuLayer -// -//////////////////////////////////////////////////////// -NodeChildrenMenuLayer::NodeChildrenMenuLayer(bool bControlMenuVisible, int nMaxCases, int nCurCase) -: PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) -{ -} - -void NodeChildrenMenuLayer::onExitTransitionDidStart() -{ - auto director = Director::getInstance(); - auto sched = director->getScheduler(); - - sched->unschedule(CC_SCHEDULE_SELECTOR(NodeChildrenMenuLayer::dumpProfilerInfo), this); -} - -void NodeChildrenMenuLayer::onEnterTransitionDidFinish() -{ - auto director = Director::getInstance(); - auto sched = director->getScheduler(); - - CC_PROFILER_PURGE_ALL(); - sched->schedule(CC_SCHEDULE_SELECTOR(NodeChildrenMenuLayer::dumpProfilerInfo), this, 2, false); -} - - -void NodeChildrenMenuLayer::dumpProfilerInfo(float dt) -{ - CC_PROFILER_DISPLAY_TIMERS(); -} - -void NodeChildrenMenuLayer::showCurrentTest() -{ - int nodes = ((NodeChildrenMainScene*)getParent())->getQuantityOfNodes(); - - auto scene = createFunctions[_curCase](); - - g_curCase = _curCase; - - if (scene) - { - scene->initWithQuantityOfNodes(nodes); - - Director::getInstance()->replaceScene(scene); - } -} +int NodeChildrenMainScene::quantityOfNodes = kNodesIncrease; //////////////////////////////////////////////////////// // // NodeChildrenMainScene // //////////////////////////////////////////////////////// +bool NodeChildrenMainScene::init() +{ + if (TestCase::init()) + { + initWithQuantityOfNodes(quantityOfNodes); + return true; + } + + return false; +} + +void NodeChildrenMainScene::onExitTransitionDidStart() +{ + auto director = Director::getInstance(); + auto sched = director->getScheduler(); + + sched->unschedule(CC_SCHEDULE_SELECTOR(NodeChildrenMainScene::dumpProfilerInfo), this); +} + +void NodeChildrenMainScene::onEnterTransitionDidFinish() +{ + auto director = Director::getInstance(); + auto sched = director->getScheduler(); + + CC_PROFILER_PURGE_ALL(); + sched->schedule(CC_SCHEDULE_SELECTOR(NodeChildrenMainScene::dumpProfilerInfo), this, 2, false); +} + +void NodeChildrenMainScene::dumpProfilerInfo(float dt) +{ + CC_PROFILER_DISPLAY_TIMERS(); +} + void NodeChildrenMainScene::initWithQuantityOfNodes(unsigned int nNodes) { //srand(time()); auto s = Director::getInstance()->getWinSize(); - // Title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1); - label->setPosition(Vec2(s.width/2, s.height-50)); - - // Subtitle - std::string strSubTitle = subtitle(); - if(strSubTitle.length()) - { - auto l = Label::createWithTTF(strSubTitle.c_str(), "fonts/Thonburi.ttf", 16); - addChild(l, 1); - l->setPosition(Vec2(s.width/2, s.height-80)); - } - lastRenderedCount = 0; currentQuantityOfNodes = 0; quantityOfNodes = nNodes; @@ -177,10 +142,6 @@ void NodeChildrenMainScene::initWithQuantityOfNodes(unsigned int nNodes) infoLabel->setPosition(Vec2(s.width/2, s.height/2-15)); addChild(infoLabel, 1, kTagInfoLayer); - auto menuLayer = new (std::nothrow) NodeChildrenMenuLayer(true, MAX_LAYER, g_curCase); - addChild(menuLayer); - menuLayer->release(); - updateQuantityLabel(); updateQuantityOfNodes(); updateProfilerName(); @@ -968,12 +929,3 @@ const char* VisitSceneGraph::testName() { return "visit()"; } - -///---------------------------------------- -void runNodeChildrenTest() -{ - auto scene = createFunctions[g_curCase](); - scene->initWithQuantityOfNodes(kNodesIncrease); - - Director::getInstance()->replaceScene(scene); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.h index eccb337b53..b23b312487 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.h @@ -1,29 +1,17 @@ #ifndef __PERFORMANCE_NODE_CHILDREN_TEST_H__ #define __PERFORMANCE_NODE_CHILDREN_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class NodeChildrenMenuLayer : public PerformBasicLayer -{ -public: - CREATE_FUNC(NodeChildrenMenuLayer); - - NodeChildrenMenuLayer(); - NodeChildrenMenuLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0); - virtual void showCurrentTest(); - void dumpProfilerInfo(float dt); - - // overrides - virtual void onExitTransitionDidStart() override; - virtual void onEnterTransitionDidFinish() override; -}; - -class NodeChildrenMainScene : public cocos2d::Scene +DEFINE_TEST_SUITE(PerformceNodeChildrenTests); + +class NodeChildrenMainScene : public TestCase { public: + virtual bool init() override; virtual void initWithQuantityOfNodes(unsigned int nNodes); - virtual std::string title() const; - virtual std::string subtitle() const; + virtual std::string title() const override; + virtual std::string subtitle() const override; virtual void updateQuantityOfNodes() = 0; const char* profilerName(); @@ -34,19 +22,21 @@ public: void updateQuantityLabel(); - int getQuantityOfNodes() { return quantityOfNodes; } + void dumpProfilerInfo(float dt); + virtual void onExitTransitionDidStart() override; + virtual void onEnterTransitionDidFinish() override; protected: + static int quantityOfNodes; char _profilerName[256]; int lastRenderedCount; - int quantityOfNodes; int currentQuantityOfNodes; }; class IterateSpriteSheet : public NodeChildrenMainScene { public: - ~IterateSpriteSheet(); + virtual ~IterateSpriteSheet(); virtual void updateQuantityOfNodes(); virtual void initWithQuantityOfNodes(unsigned int nNodes); virtual void update(float dt) = 0; @@ -98,7 +88,7 @@ public: class AddRemoveSpriteSheet : public NodeChildrenMainScene { public: - ~AddRemoveSpriteSheet(); + virtual ~AddRemoveSpriteSheet(); virtual void updateQuantityOfNodes(); virtual void initWithQuantityOfNodes(unsigned int nNodes); virtual void update(float dt) = 0; @@ -226,6 +216,4 @@ public: virtual const char* testName() override; }; -void runNodeChildrenTest(); - #endif // __PERFORMANCE_NODE_CHILDREN_TEST_H__ diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.cpp index 49e91a2c2d..ead94295aa 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.cpp @@ -5,49 +5,14 @@ USING_NS_CC; using namespace cocos2d::ui; static int kTagInfoLayer = 1; -static int kTagMenuLayer = 1000; static int kTagParticleSystem = 1001; -static int test_Count = 2; static int kMaxParticles = 14000; static int kNodesIncrease = 1; -static int s_parCurIdx = 0; - -//////////////////////////////////////////////////////// -// -// ParticleMenuLayer -// -//////////////////////////////////////////////////////// -Particle3DMenuLayer::Particle3DMenuLayer(bool isControlMenuVisible, int maxCases, int curCase) -: PerformBasicLayer(isControlMenuVisible, maxCases, curCase) +PerformceParticle3DTests::PerformceParticle3DTests() { - -} - -void Particle3DMenuLayer::showCurrentTest() -{ - auto scene = (Particle3DMainScene*)getParent(); - int subTest = scene->getSubTestNum(); - int parNum = scene->getParticlesNum(); - - Particle3DMainScene* pNewScene = nullptr; - - switch (_curCase) - { - case 0: - pNewScene = new (std::nothrow) Particle3DPerformTest; - break; - } - - s_parCurIdx = _curCase; - if (pNewScene) - { - pNewScene->initWithSubTest(subTest, parNum); - - Director::getInstance()->replaceScene(pNewScene); - pNewScene->release(); - } + ADD_TEST_CASE(Particle3DPerformTest); } //////////////////////////////////////////////////////// @@ -95,15 +60,6 @@ void Particle3DMainScene::initWithSubTest(int asubtest, int particles) infoLabel->setPosition(Vec2(s.width/2, s.height - 90)); addChild(infoLabel, 1, kTagInfoLayer); - // Next Prev Test - auto menuLayer = new (std::nothrow) Particle3DMenuLayer(true, test_Count, s_parCurIdx); - addChild(menuLayer, 1, kTagMenuLayer); - menuLayer->release(); - - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1); - label->setPosition(Vec2(s.width/2, s.height-50)); - auto camera = Camera::createPerspective(30.0f, s.width / s.height, 1.0f, 1000.0f); camera->setPosition3D(Vec3(0.0f, 0.0f, 150.0f)); camera->lookAt(Vec3(0.0f, 0.0f, 0.0f), Vec3(0.0f, 1.0f, 0.0f)); @@ -122,11 +78,6 @@ void Particle3DMainScene::initWithSubTest(int asubtest, int particles) schedule(CC_SCHEDULE_SELECTOR(Particle3DMainScene::step)); } -std::string Particle3DMainScene::title() const -{ - return "No title"; -} - void Particle3DMainScene::step(float dt) { unsigned int count = 0; @@ -158,14 +109,6 @@ void Particle3DMainScene::createParticleSystem(int idx) addChild(ps, 0, kTagParticleSystem + idx); } -void Particle3DMainScene::testNCallback(Ref* sender) -{ - _subtestNumber = static_cast(sender)->getTag(); - - auto menu = static_cast( getChildByTag(kTagMenuLayer) ); - menu->restartCallback(sender); -} - void Particle3DMainScene::updateQuantityLabel() { if( _quantityParticles != _lastRenderedCount ) @@ -186,22 +129,16 @@ void Particle3DMainScene::updateQuantityLabel() //////////////////////////////////////////////////////// std::string Particle3DPerformTest::title() const { - char str[20] = {0}; - sprintf(str, "Particle3D Test"/*, subtestNumber*/); - std::string strRet = str; - return strRet; + return "Particle3D Test"; } -void Particle3DPerformTest::doTest() +bool Particle3DPerformTest::init() { - auto s = Director::getInstance()->getWinSize(); -} + if (Particle3DMainScene::init()) + { + initWithSubTest(1, kNodesIncrease); + return true; + } -void runParticle3DTest() -{ - auto scene = new (std::nothrow) Particle3DPerformTest; - scene->initWithSubTest(1, kNodesIncrease); - - Director::getInstance()->replaceScene(scene); - scene->release(); + return false; } diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.h index 8152aa9c4b..5cb6a733c4 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.h @@ -1,20 +1,14 @@ #ifndef __PERFORMANCE_PARTICLE_3D_TEST_H__ #define __PERFORMANCE_PARTICLE_3D_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class Particle3DMenuLayer : public PerformBasicLayer -{ -public: - Particle3DMenuLayer(bool isControlMenuVisible, int maxCases = 0, int curCase = 0); - virtual void showCurrentTest(); -}; +DEFINE_TEST_SUITE(PerformceParticle3DTests); -class Particle3DMainScene : public cocos2d::Scene +class Particle3DMainScene : public TestCase { public: virtual void initWithSubTest(int subtest, int particles); - virtual std::string title() const; void step(float dt); void createParticleSystem(int idx); @@ -34,10 +28,11 @@ protected: class Particle3DPerformTest : public Particle3DMainScene { public: + CREATE_FUNC(Particle3DPerformTest); + + virtual bool init() override; virtual std::string title() const override; - virtual void doTest(); + virtual void doTest(){}; }; -void runParticle3DTest(); - #endif diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticleTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticleTest.cpp index 3791afbd61..d225d8ea3e 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticleTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticleTest.cpp @@ -17,51 +17,15 @@ enum { kNodesIncrease = 500, }; -static int s_nParCurIdx = 0; +int ParticleMainScene::quantityParticles = kNodesIncrease; +int ParticleMainScene::subtestNumber = 1; -//////////////////////////////////////////////////////// -// -// ParticleMenuLayer -// -//////////////////////////////////////////////////////// -ParticleMenuLayer::ParticleMenuLayer(bool bControlMenuVisible, int nMaxCases, int nCurCase) -: PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) +PerformceParticleTests::PerformceParticleTests() { - -} - -void ParticleMenuLayer::showCurrentTest() -{ - auto scene = (ParticleMainScene*)getParent(); - int subTest = scene->getSubTestNum(); - int parNum = scene->getParticlesNum(); - - ParticleMainScene* pNewScene = nullptr; - - switch (_curCase) - { - case 0: - pNewScene = new (std::nothrow) ParticlePerformTest1; - break; - case 1: - pNewScene = new (std::nothrow) ParticlePerformTest2; - break; - case 2: - pNewScene = new (std::nothrow) ParticlePerformTest3; - break; - case 3: - pNewScene = new (std::nothrow) ParticlePerformTest4; - break; - } - - s_nParCurIdx = _curCase; - if (pNewScene) - { - pNewScene->initWithSubTest(subTest, parNum); - - Director::getInstance()->replaceScene(pNewScene); - pNewScene->release(); - } + ADD_TEST_CASE(ParticlePerformTest1); + ADD_TEST_CASE(ParticlePerformTest2); + ADD_TEST_CASE(ParticlePerformTest3); + ADD_TEST_CASE(ParticlePerformTest4); } //////////////////////////////////////////////////////// @@ -69,6 +33,17 @@ void ParticleMenuLayer::showCurrentTest() // ParticleMainScene // //////////////////////////////////////////////////////// +bool ParticleMainScene::init() +{ + if (TestCase::init()) + { + initWithSubTest(subtestNumber, quantityParticles); + return true; + } + + return false; +} + void ParticleMainScene::initWithSubTest(int asubtest, int particles) { //srandom(0); @@ -114,11 +89,6 @@ void ParticleMainScene::initWithSubTest(int asubtest, int particles) addChild(labelAtlas, 0, kTagLabelAtlas); labelAtlas->setPosition(Vec2(s.width-66,50)); - // Next Prev Test - auto menuLayer = new (std::nothrow) ParticleMenuLayer(true, TEST_COUNT, s_nParCurIdx); - addChild(menuLayer, 1, kTagMenuLayer); - menuLayer->release(); - // Sub Tests MenuItemFont::setFontSize(40); auto pSubMenu = Menu::create(); @@ -153,11 +123,6 @@ void ParticleMainScene::initWithSubTest(int asubtest, int particles) schedule(CC_SCHEDULE_SELECTOR(ParticleMainScene::step)); } -std::string ParticleMainScene::title() const -{ - return "No title"; -} - void ParticleMainScene::step(float dt) { auto atlas = (LabelAtlas*) getChildByTag(kTagLabelAtlas); @@ -251,8 +216,7 @@ void ParticleMainScene::testNCallback(Ref* sender) { subtestNumber = static_cast(sender)->getTag(); - auto menu = static_cast( getChildByTag(kTagMenuLayer) ); - menu->restartCallback(sender); + this->restartTestCallback(sender); } void ParticleMainScene::updateQuantityLabel() @@ -548,12 +512,3 @@ void ParticlePerformTest4::doTest() particleSystem->setBlendAdditive(false); } - -void runParticleTest() -{ - auto scene = new (std::nothrow) ParticlePerformTest1; - scene->initWithSubTest(1, kNodesIncrease); - - Director::getInstance()->replaceScene(scene); - scene->release(); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticleTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticleTest.h index ba51b7b608..fae1cdcc0f 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticleTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticleTest.h @@ -1,38 +1,33 @@ #ifndef __PERFORMANCE_PARTICLE_TEST_H__ #define __PERFORMANCE_PARTICLE_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class ParticleMenuLayer : public PerformBasicLayer -{ -public: - ParticleMenuLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0); - virtual void showCurrentTest(); -}; - -class ParticleMainScene : public cocos2d::Scene +DEFINE_TEST_SUITE(PerformceParticleTests); + +class ParticleMainScene : public TestCase { public: + virtual bool init() override; virtual void initWithSubTest(int subtest, int particles); - virtual std::string title() const; void step(float dt); void createParticleSystem(); void testNCallback(cocos2d::Ref* sender); void updateQuantityLabel(); - int getSubTestNum() { return subtestNumber; } - int getParticlesNum() { return quantityParticles; } virtual void doTest() = 0; protected: int lastRenderedCount; - int quantityParticles; - int subtestNumber; + static int quantityParticles; + static int subtestNumber; }; class ParticlePerformTest1 : public ParticleMainScene { public: + CREATE_FUNC(ParticlePerformTest1); + virtual std::string title() const override; virtual void doTest(); }; @@ -40,6 +35,8 @@ public: class ParticlePerformTest2 : public ParticleMainScene { public: + CREATE_FUNC(ParticlePerformTest2); + virtual std::string title() const override; virtual void doTest(); }; @@ -47,6 +44,8 @@ public: class ParticlePerformTest3 : public ParticleMainScene { public: + CREATE_FUNC(ParticlePerformTest3); + virtual std::string title() const override; virtual void doTest(); }; @@ -54,10 +53,10 @@ public: class ParticlePerformTest4 : public ParticleMainScene { public: + CREATE_FUNC(ParticlePerformTest4); + virtual std::string title() const override; virtual void doTest(); }; -void runParticleTest(); - #endif diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceRendererTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceRendererTest.cpp index c2f64a14d3..df44d1e833 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceRendererTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceRendererTest.cpp @@ -12,46 +12,18 @@ USING_NS_CC; -RenderTestLayer::RenderTestLayer() -: PerformBasicLayer(true, 1, 1) +PerformceRenderTests::PerformceRenderTests() { + ADD_TEST_CASE(RenderPerformceTest); } -RenderTestLayer::~RenderTestLayer() +void RenderPerformceTest::onEnter() { -} - -Scene* RenderTestLayer::scene() -{ - auto scene = Scene::create(); - RenderTestLayer *layer = new (std::nothrow) RenderTestLayer(); - scene->addChild(layer); - layer->release(); - - return scene; -} - -void RenderTestLayer::onEnter() -{ - PerformBasicLayer::onEnter(); + TestCase::onEnter(); auto map = TMXTiledMap::create("TileMaps/map/sl.tmx"); Size CC_UNUSED s = map->getContentSize(); CCLOG("ContentSize: %f, %f", s.width,s.height); addChild(map,-1); - - //map->setAnchorPoint( Vec2(0, 0) ); - //map->setPosition( Vec2(-20,-200) ); -} - -void RenderTestLayer::showCurrentTest() -{ - -} - -void runRendererTest() -{ - auto scene = RenderTestLayer::scene(); - Director::getInstance()->replaceScene(scene); } diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceRendererTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceRendererTest.h index 011a5d0f00..fbcf7a04f6 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceRendererTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceRendererTest.h @@ -9,20 +9,16 @@ #ifndef __PERFORMANCE_RENDERER_TEST_H__ #define __PERFORMANCE_RENDERER_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class RenderTestLayer : public PerformBasicLayer +DEFINE_TEST_SUITE(PerformceRenderTests); + +class RenderPerformceTest : public TestCase { - public: - RenderTestLayer(); - virtual ~RenderTestLayer(); + CREATE_FUNC(RenderPerformceTest); virtual void onEnter() override; - virtual void showCurrentTest() override; -public: - static cocos2d::Scene* scene(); }; -void runRendererTest(); #endif diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceScenarioTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceScenarioTest.cpp index 09bc211d30..1f6a503333 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceScenarioTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceScenarioTest.cpp @@ -3,67 +3,9 @@ USING_NS_CC; -enum +PerformceScenarioTests::PerformceScenarioTests() { - TEST_COUNT = 1, -}; - -static int s_nScenarioCurCase = 0; - -//////////////////////////////////////////////////////// -// -// ScenarioMenuLayer -// -//////////////////////////////////////////////////////// -void ScenarioMenuLayer::showCurrentTest() -{ - Scene* scene = nullptr; - - switch (_curCase) - { - case 0: - scene = ScenarioTest::scene(); - break; - } - s_nScenarioCurCase = _curCase; - - if (scene) - { - Director::getInstance()->replaceScene(scene); - } -} - -void ScenarioMenuLayer::onEnter() -{ - PerformBasicLayer::onEnter(); - - auto s = Director::getInstance()->getWinSize(); - - // Title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1); - label->setPosition(Vec2(s.width/2, s.height-50)); - - // Subtitle - std::string strSubTitle = subtitle(); - if(strSubTitle.length()) - { - auto l = Label::createWithTTF(strSubTitle.c_str(), "fonts/Thonburi.ttf", 16); - addChild(l, 1); - l->setPosition(Vec2(s.width/2, s.height-80)); - } - - performTests(); -} - -std::string ScenarioMenuLayer::title() const -{ - return "no title"; -} - -std::string ScenarioMenuLayer::subtitle() const -{ - return ""; + ADD_TEST_CASE(ScenarioTest); } //////////////////////////////////////////////////////// @@ -78,6 +20,17 @@ int ScenarioTest::_spriteStepNum = 500; int ScenarioTest::_initParsysNum = 10; int ScenarioTest::_parsysStepNum = 5; +bool ScenarioTest::init() +{ + if (TestCase::init()) + { + performTests(); + return true; + } + + return false; +} + void ScenarioTest::performTests() { auto listener = EventListenerTouchAllAtOnce::create(); @@ -347,26 +300,3 @@ std::string ScenarioTest::title() const { return "Scenario Performance Test"; } - -// -//std::string ScenarioTest::subtitle() const -//{ -// return "See console for results"; -//} - -Scene* ScenarioTest::scene() -{ - auto scene = Scene::create(); - ScenarioTest *layer = new (std::nothrow) ScenarioTest(false, TEST_COUNT, s_nScenarioCurCase); - scene->addChild(layer); - layer->release(); - - return scene; -} - -void runScenarioTest() -{ - s_nScenarioCurCase = 0; - auto scene = ScenarioTest::scene(); - Director::getInstance()->replaceScene(scene); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceScenarioTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceScenarioTest.h index 2d64275362..ffecf6680b 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceScenarioTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceScenarioTest.h @@ -1,36 +1,20 @@ #ifndef __PERFORMANCE_SCENARIO_TEST_H__ #define __PERFORMANCE_SCENARIO_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class ScenarioMenuLayer : public PerformBasicLayer +DEFINE_TEST_SUITE(PerformceScenarioTests); + +class ScenarioTest : public TestCase { public: - ScenarioMenuLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0) - :PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) - { - } - - virtual void showCurrentTest() override; - - virtual void onEnter() override; - virtual std::string title() const; - virtual std::string subtitle() const; - virtual void performTests() = 0; -}; - -class ScenarioTest : public ScenarioMenuLayer -{ -public: - ScenarioTest(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0) - :ScenarioMenuLayer(bControlMenuVisible, nMaxCases, nCurCase) - { - } + CREATE_FUNC(ScenarioTest); + virtual bool init() override; virtual std::string title() const override; - virtual void performTests() override; + virtual void performTests(); - void onTouchesMoved(const std::vector& touches, cocos2d::Event* event) override; + void onTouchesMoved(const std::vector& touches, cocos2d::Event* event) ; static cocos2d::Scene* scene(); @@ -64,6 +48,4 @@ private: int _particleNumber; }; -void runScenarioTest(); - #endif diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp index a11c7d8f39..f462ad01ad 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp @@ -51,6 +51,20 @@ enum { kTagMenuLayer = (kMaxNodes + 1000), }; +PerformceSpriteTests::PerformceSpriteTests() +{ + ADD_TEST_CASE(SpritePerformTestA); + ADD_TEST_CASE(SpritePerformTestB); + ADD_TEST_CASE(SpritePerformTestC); + ADD_TEST_CASE(SpritePerformTestD); + ADD_TEST_CASE(SpritePerformTestE); + ADD_TEST_CASE(SpritePerformTestF); + ADD_TEST_CASE(SpritePerformTestG); +} + +int SpriteMainScene::_quantityNodes = 50; +int SpriteMainScene::_subtestNumber = 1; + //////////////////////////////////////////////////////// // // SubTest @@ -293,83 +307,6 @@ void SubTest::removeByTag(int tag) _parentNode->removeChildByTag(tag+100, true); } -//////////////////////////////////////////////////////// -// -// SpriteMenuLayer -// -//////////////////////////////////////////////////////// -void SpriteMenuLayer::restartCallback(Ref* sender) -{ - if ( SpriteMainScene::_s_autoTest ) - { - log("It's auto sprite performace testing,so this operation is invalid"); - return; - } - - PerformBasicLayer::restartCallback(sender); -} -void SpriteMenuLayer::nextCallback(Ref* sender) -{ - if ( SpriteMainScene::_s_autoTest ) - { - log("It's auto sprite performace testing,so this operation is invalid"); - return; - } - - PerformBasicLayer::nextCallback(sender); -} -void SpriteMenuLayer::backCallback(Ref* sender) -{ - if ( SpriteMainScene::_s_autoTest ) - { - log("It's auto sprite performace testing,so this operation is invalid"); - return; - } - - PerformBasicLayer::backCallback(sender); -} - -void SpriteMenuLayer::showCurrentTest() -{ - SpriteMainScene* scene = nullptr; - auto pPreScene = (SpriteMainScene*) getParent(); - int nSubTest = pPreScene->getSubTestNum(); - int nNodes = pPreScene->getNodesNum(); - - switch (_curCase) - { - case 0: - scene = new (std::nothrow) SpritePerformTestA; - break; - case 1: - scene = new (std::nothrow) SpritePerformTestB; - break; - case 2: - scene = new (std::nothrow) SpritePerformTestC; - break; - case 3: - scene = new (std::nothrow) SpritePerformTestD; - break; - case 4: - scene = new (std::nothrow) SpritePerformTestE; - break; - case 5: - scene = new (std::nothrow) SpritePerformTestF; - break; - case 6: - scene = new (std::nothrow) SpritePerformTestG; - break; - } - - SpriteMainScene::_s_nSpriteCurCase = _curCase; - - if (scene) - { - scene->initWithSubTest(nSubTest, nNodes); - Director::getInstance()->replaceScene(scene); - scene->release(); - } -} //////////////////////////////////////////////////////// // // SpriteMainScene @@ -389,6 +326,17 @@ int SpriteMainScene::_s_spritesQuanityArray[] = {1000, 3000, 0}; // FIXME: to make VS2012 happy. Once VS2012 is deprecated, we can just simply replace it with {} std::vector SpriteMainScene::_s_saved_fps = std::vector(); +bool SpriteMainScene::init() +{ + if (TestCase::init()) + { + initWithSubTest(_subtestNumber, _quantityNodes); + return true; + } + + return false; +} + void SpriteMainScene::initWithSubTest(int asubtest, int nNodes) { std::srand(0); @@ -417,11 +365,6 @@ void SpriteMainScene::initWithSubTest(int asubtest, int nNodes) infoLabel->setColor(Color3B(0,200,20)); infoLabel->setPosition(Vec2(s.width/2, s.height-90)); addChild(infoLabel, 1, kTagInfoLayer); - - // add menu - auto menuLayer = new (std::nothrow) SpriteMenuLayer(true, TEST_COUNT, SpriteMainScene::_s_nSpriteCurCase); - addChild(menuLayer, 1, kTagMenuLayer); - menuLayer->release(); /** * auto test menu @@ -514,13 +457,13 @@ void SpriteMainScene::testNCallback(Ref* sender) { if (SpriteMainScene::_s_autoTest) { - log("It's auto sprite performace testing,so this operation is invalid"); + log("It's auto sprite performance testing,so this operation is invalid"); return; } _subtestNumber = static_cast(sender)->getTag(); - auto menu = static_cast( getChildByTag(kTagMenuLayer) ); - menu->restartCallback(sender); + + this->restartTestCallback(sender); } void SpriteMainScene::updateNodes() @@ -975,12 +918,3 @@ void SpritePerformTestG::doTest(Sprite* sprite) { performanceActions20(sprite); } - -void runSpriteTest() -{ - SpriteMainScene::_s_autoTest = false; - auto scene = new (std::nothrow) SpritePerformTestA; - scene->initWithSubTest(1, 50); - Director::getInstance()->replaceScene(scene); - scene->release(); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.h index 8ec6eb62df..ea109613a4 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.h @@ -30,8 +30,9 @@ #include -#include "PerformanceTest.h" +#include "BaseTest.h" +DEFINE_TEST_SUITE(PerformceSpriteTests); class SubTest { @@ -46,24 +47,11 @@ protected: cocos2d::Node* _parentNode; }; -class SpriteMenuLayer : public PerformBasicLayer -{ -public: - SpriteMenuLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0) - : PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) - { - } - - virtual void restartCallback(cocos2d::Ref* sender) override; - virtual void nextCallback(cocos2d::Ref* sender) override; - virtual void backCallback(cocos2d::Ref* sender) override; - virtual void showCurrentTest(); -}; - -class SpriteMainScene : public cocos2d::Scene +class SpriteMainScene : public TestCase { public: virtual ~SpriteMainScene(); + virtual bool init() override; virtual std::string title() const; virtual std::string subtitle() const; @@ -75,9 +63,6 @@ public: void onDecrease(cocos2d::Ref* sender); virtual void doTest(cocos2d::Sprite* sprite) = 0; - - int getSubTestNum() { return _subtestNumber; } - int getNodesNum() { return _quantityNodes; } virtual void onEnter() override; virtual void onExit() override; @@ -92,6 +77,9 @@ public: static std::vector _s_saved_fps; protected: + static int _quantityNodes; + static int _subtestNumber; + void dumpProfilerFPS(); void saveFPS(); void beginAutoTest(); @@ -101,14 +89,14 @@ protected: void autoShowSpriteTests(int curCase, int subTest,int nodes); int _lastRenderedCount; - int _quantityNodes; SubTest* _subTest; - int _subtestNumber; }; class SpritePerformTestA : public SpriteMainScene { public: + CREATE_FUNC(SpritePerformTestA); + virtual void doTest(cocos2d::Sprite* sprite) override; virtual std::string title() const override; }; @@ -116,6 +104,8 @@ public: class SpritePerformTestB : public SpriteMainScene { public: + CREATE_FUNC(SpritePerformTestB); + virtual void doTest(cocos2d::Sprite* sprite) override; virtual std::string title() const override; }; @@ -123,6 +113,8 @@ public: class SpritePerformTestC : public SpriteMainScene { public: + CREATE_FUNC(SpritePerformTestC); + virtual void doTest(cocos2d::Sprite* sprite) override; virtual std::string title() const override; }; @@ -130,6 +122,8 @@ public: class SpritePerformTestD : public SpriteMainScene { public: + CREATE_FUNC(SpritePerformTestD); + virtual void doTest(cocos2d::Sprite* sprite) override; virtual std::string title() const override; }; @@ -137,6 +131,8 @@ public: class SpritePerformTestE : public SpriteMainScene { public: + CREATE_FUNC(SpritePerformTestE); + virtual void doTest(cocos2d::Sprite* sprite) override; virtual std::string title() const override; }; @@ -144,6 +140,8 @@ public: class SpritePerformTestF : public SpriteMainScene { public: + CREATE_FUNC(SpritePerformTestF); + virtual void doTest(cocos2d::Sprite* sprite) override; virtual std::string title() const override; }; @@ -151,10 +149,10 @@ public: class SpritePerformTestG : public SpriteMainScene { public: + CREATE_FUNC(SpritePerformTestG); + virtual void doTest(cocos2d::Sprite* sprite) override; virtual std::string title() const override; }; -void runSpriteTest(); - #endif diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTest.cpp index e59c9e5bc0..07fa5b2486 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTest.cpp @@ -8,7 +8,6 @@ #include "PerformanceTouchesTest.h" #include "PerformanceAllocTest.h" #include "PerformanceLabelTest.h" -#include "PerformanceRendererTest.h" #include "PerformanceContainerTest.h" #include "PerformanceEventDispatcherTest.h" #include "PerformanceScenarioTest.h" @@ -17,210 +16,19 @@ USING_NS_CC; -enum +PerformanceTests::PerformanceTests() { - LINE_SPACE = 40, - kItemTagBasic = 1000, -}; - -struct { - const char *name; - std::function callback; -} g_testsName[] = -{ - { "Alloc Test", [](Ref*sender){runAllocPerformanceTest(); } }, - { "NodeChildren Test", [](Ref*sender){runNodeChildrenTest();} }, - { "Particle Test",[](Ref*sender){runParticleTest();} }, - { "Particle3D Perf Test",[](Ref*sender){runParticle3DTest();} }, - { "Sprite Perf Test",[](Ref*sender){runSpriteTest();} }, - { "Texture Perf Test",[](Ref*sender){runTextureTest();} }, - { "Touches Perf Test",[](Ref*sender){runTouchesTest();} }, - { "Label Perf Test",[](Ref*sender){runLabelTest();} }, - //{ "Renderer Perf Test",[](Ref*sender){runRendererTest();} }, - { "Container Perf Test", [](Ref* sender ) { runContainerPerformanceTest(); } }, - { "EventDispatcher Perf Test", [](Ref* sender ) { runEventDispatcherPerformanceTest(); } }, - { "Scenario Perf Test", [](Ref* sender ) { runScenarioTest(); } }, - { "Callback Perf Test", [](Ref* sender ) { runCallbackPerformanceTest(); } }, - { "Math Perf Test", [](Ref* sender ) { runMathPerformanceTest(); } }, -}; - -static const int g_testMax = sizeof(g_testsName)/sizeof(g_testsName[0]); - -Vec2 PerformanceMainLayer::_CurrentPos = Vec2::ZERO; - -//////////////////////////////////////////////////////// -// -// PerformanceMainLayer -// -//////////////////////////////////////////////////////// -void PerformanceMainLayer::onEnter() -{ - Layer::onEnter(); - - auto s = Director::getInstance()->getWinSize(); - - _itemMenu = Menu::create(); - _itemMenu->setPosition(_CurrentPos); - MenuItemFont::setFontName("fonts/arial.ttf"); - MenuItemFont::setFontSize(24); - for (int i = 0; i < g_testMax; ++i) - { - auto pItem = MenuItemFont::create(g_testsName[i].name, g_testsName[i].callback); - pItem->setPosition(Vec2(s.width / 2, s.height - (i + 1) * LINE_SPACE)); - _itemMenu->addChild(pItem, kItemTagBasic + i); - } - - addChild(_itemMenu); - - // Register Touch Event - auto listener = EventListenerTouchOneByOne::create(); - listener->setSwallowTouches(true); - - listener->onTouchBegan = CC_CALLBACK_2(PerformanceMainLayer::onTouchBegan, this); - listener->onTouchMoved = CC_CALLBACK_2(PerformanceMainLayer::onTouchMoved, this); - - _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); - - auto mouseListener = EventListenerMouse::create(); - mouseListener->onMouseScroll = CC_CALLBACK_1(PerformanceMainLayer::onMouseScroll, this); - _eventDispatcher->addEventListenerWithSceneGraphPriority(mouseListener, this); -} - -bool PerformanceMainLayer::onTouchBegan(Touch* touches, Event *event) -{ - _beginPos = touches->getLocation(); - return true; -} -void PerformanceMainLayer::onTouchMoved(Touch* touches, Event *event) -{ - auto touchLocation = touches->getLocation(); - float nMoveY = touchLocation.y - _beginPos.y; - - auto curPos = _itemMenu->getPosition(); - auto nextPos = Vec2(curPos.x, curPos.y + nMoveY); - - if (nextPos.y < 0.0f) - { - _itemMenu->setPosition(Vec2::ZERO); - return; - } - - if (nextPos.y > ((g_testMax + 1)* LINE_SPACE - VisibleRect::getVisibleRect().size.height)) - { - _itemMenu->setPosition(Vec2(0, ((g_testMax + 1)* LINE_SPACE - VisibleRect::getVisibleRect().size.height))); - return; - } - - _itemMenu->setPosition(nextPos); - _beginPos = touchLocation; - _CurrentPos = nextPos; -} - -void PerformanceMainLayer::onMouseScroll(Event *event) -{ - auto mouseEvent = static_cast(event); - float nMoveY = mouseEvent->getScrollY() * 6; - - auto curPos = _itemMenu->getPosition(); - auto nextPos = Vec2(curPos.x, curPos.y + nMoveY); - - if (nextPos.y < 0.0f) - { - _itemMenu->setPosition(Vec2::ZERO); - return; - } - - if (nextPos.y > ((g_testMax + 1)* LINE_SPACE - VisibleRect::getVisibleRect().size.height)) - { - _itemMenu->setPosition(Vec2(0, ((g_testMax + 1)* LINE_SPACE - VisibleRect::getVisibleRect().size.height))); - return; - } - - _itemMenu->setPosition(nextPos); - _CurrentPos = nextPos; -} - -//////////////////////////////////////////////////////// -// -// PerformBasicLayer -// -//////////////////////////////////////////////////////// -PerformBasicLayer::PerformBasicLayer(bool bControlMenuVisible, int nMaxCases, int nCurCase) -: _controlMenuVisible(bControlMenuVisible) -, _maxCases(nMaxCases) -, _curCase(nCurCase) -{ - -} - -void PerformBasicLayer::onEnter() -{ - Layer::onEnter(); - - MenuItemFont::setFontName("fonts/arial.ttf"); - MenuItemFont::setFontSize(24); - auto pMainItem = MenuItemFont::create("Back", CC_CALLBACK_1(PerformBasicLayer::toMainLayer, this)); - pMainItem->setPosition(Vec2(VisibleRect::rightBottom().x - 50, VisibleRect::rightBottom().y + 25)); - auto menu = Menu::create(pMainItem, nullptr); - menu->setPosition( Vec2::ZERO ); - - if (_controlMenuVisible) - { - auto item1 = MenuItemImage::create(s_pathB1, s_pathB2, CC_CALLBACK_1(PerformBasicLayer::backCallback, this)); - auto item2 = MenuItemImage::create(s_pathR1, s_pathR2, CC_CALLBACK_1(PerformBasicLayer::restartCallback, this)); - auto item3 = MenuItemImage::create(s_pathF1, s_pathF2, CC_CALLBACK_1(PerformBasicLayer::nextCallback, this)); - item1->setPosition(Vec2(VisibleRect::center().x - item2->getContentSize().width*2, VisibleRect::bottom().y+item2->getContentSize().height/2)); - item2->setPosition(Vec2(VisibleRect::center().x, VisibleRect::bottom().y+item2->getContentSize().height/2)); - item3->setPosition(Vec2(VisibleRect::center().x + item2->getContentSize().width*2, VisibleRect::bottom().y+item2->getContentSize().height/2)); - - menu->addChild(item1, kItemTagBasic); - menu->addChild(item2, kItemTagBasic); - menu->addChild(item3, kItemTagBasic); - } - addChild(menu); -} - -void PerformBasicLayer::toMainLayer(Ref* sender) -{ - auto scene = new (std::nothrow) PerformanceTestScene(); - scene->runThisTest(); - - scene->release(); -} - -void PerformBasicLayer::restartCallback(Ref* sender) -{ - showCurrentTest(); -} - -void PerformBasicLayer::nextCallback(Ref* sender) -{ - _curCase++; - _curCase = _curCase % _maxCases; - - showCurrentTest(); -} - -void PerformBasicLayer::backCallback(Ref* sender) -{ - _curCase--; - if( _curCase < 0 ) - _curCase += _maxCases; - - showCurrentTest(); -} - -//////////////////////////////////////////////////////// -// -// PerformanceTestScene -// -//////////////////////////////////////////////////////// - -void PerformanceTestScene::runThisTest() -{ - auto layer = new (std::nothrow) PerformanceMainLayer(); - addChild(layer); - layer->release(); - - Director::getInstance()->replaceScene(this); + addTest("Alloc Test", [](){ return new (std::nothrow) PerformceAllocTests; }); + addTest("NodeChildren Test", [](){ return new (std::nothrow) PerformceNodeChildrenTests; }); + addTest("Particle Test", [](){ return new (std::nothrow) PerformceParticleTests; }); + addTest("Particle3D Perf Test", [](){ return new (std::nothrow) PerformceParticle3DTests; }); + addTest("Sprite Perf Test", [](){ return new (std::nothrow) PerformceSpriteTests; }); + addTest("Texture Perf Test", [](){ return new (std::nothrow) PerformceTextureTests; }); + addTest("Touches Perf Test", [](){ return new (std::nothrow) PerformceTouchesTests; }); + addTest("Label Perf Test", [](){ return new (std::nothrow) PerformceLabelTests; }); + addTest("Container Perf Test", []() { return new (std::nothrow) PerformceContainerTests; }); + addTest("EventDispatcher Perf Test", []() { return new (std::nothrow) PerformceEventDispatcherTests; }); + addTest("Scenario Perf Test", []() { return new (std::nothrow) PerformceScenarioTests; }); + addTest("Callback Perf Test", []() { return new (std::nothrow) PerformceCallbackTests; }); + addTest("Math Perf Test", []() { return new (std::nothrow) PerformceMathTests; }); } diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTest.h index dd8377a75e..3c357c0ac4 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTest.h @@ -1,48 +1,8 @@ #ifndef __PERFORMANCE_TEST_H__ #define __PERFORMANCE_TEST_H__ -#include "../testBasic.h" +#include "BaseTest.h" -class PerformanceMainLayer : public cocos2d::Layer -{ -public: - virtual void onEnter() override; - - bool onTouchBegan(cocos2d::Touch* touches, cocos2d::Event* event) override; - void onTouchMoved(cocos2d::Touch* touches, cocos2d::Event* event) override; - - void onMouseScroll(cocos2d::Event* event); -protected: - cocos2d::Vec2 _beginPos; - cocos2d::Menu* _itemMenu; - - static cocos2d::Vec2 _CurrentPos; -}; - -class PerformBasicLayer : public cocos2d::Layer -{ -public: - PerformBasicLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0); - - virtual void onEnter() override; - - virtual void restartCallback(cocos2d::Ref* sender); - virtual void nextCallback(cocos2d::Ref* sender); - virtual void backCallback(cocos2d::Ref* sender); - virtual void showCurrentTest() = 0; - - virtual void toMainLayer(cocos2d::Ref* sender); - -protected: - bool _controlMenuVisible; - int _maxCases; - int _curCase; -}; - -class PerformanceTestScene : public TestScene -{ -public: - virtual void runThisTest(); -}; +DEFINE_TEST_LIST(PerformanceTests); #endif diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.cpp index 5a4fa998f1..22a1f76f6f 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.cpp @@ -2,14 +2,12 @@ USING_NS_CC; -enum +PerformceTextureTests::PerformceTextureTests() { - TEST_COUNT = 1, -}; + ADD_TEST_CASE(TexturePerformceTest); +} -static int s_nTexCurCase = 0; - -float calculateDeltaTime( struct timeval *lastUpdate ) +static float calculateDeltaTime( struct timeval *lastUpdate ) { struct timeval now; @@ -22,66 +20,10 @@ float calculateDeltaTime( struct timeval *lastUpdate ) //////////////////////////////////////////////////////// // -// TextureMenuLayer +// TexturePerformceTest // //////////////////////////////////////////////////////// -void TextureMenuLayer::showCurrentTest() -{ - Scene* scene = nullptr; - - switch (_curCase) - { - case 0: - scene = TextureTest::scene(); - break; - } - s_nTexCurCase = _curCase; - - if (scene) - { - Director::getInstance()->replaceScene(scene); - } -} - -void TextureMenuLayer::onEnter() -{ - PerformBasicLayer::onEnter(); - - auto s = Director::getInstance()->getWinSize(); - - // Title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1); - label->setPosition(Vec2(s.width/2, s.height-50)); - - // Subtitle - std::string strSubTitle = subtitle(); - if(strSubTitle.length()) - { - auto l = Label::createWithTTF(strSubTitle.c_str(), "fonts/Thonburi.ttf", 16); - addChild(l, 1); - l->setPosition(Vec2(s.width/2, s.height-80)); - } - - performTests(); -} - -std::string TextureMenuLayer::title() const -{ - return "no title"; -} - -std::string TextureMenuLayer::subtitle() const -{ - return "no subtitle"; -} - -//////////////////////////////////////////////////////// -// -// TextureTest -// -//////////////////////////////////////////////////////// -void TextureTest::performTestsPNG(const char* filename) +void TexturePerformceTest::performTestsPNG(const char* filename) { struct timeval now; Texture2D *texture; @@ -132,7 +74,7 @@ void TextureTest::performTestsPNG(const char* filename) Texture2D::setDefaultAlphaPixelFormat(defaultFormat); } -void TextureTest::performTests() +void TexturePerformceTest::performTests() { // Texture2D *texture; // struct timeval now; @@ -337,29 +279,19 @@ void TextureTest::performTests() // cache->removeTexture(texture); } -std::string TextureTest::title() const +void TexturePerformceTest::onEnter() +{ + TestCase::onEnter(); + + performTests(); +} + +std::string TexturePerformceTest::title() const { return "Texture Performance Test"; } -std::string TextureTest::subtitle() const +std::string TexturePerformceTest::subtitle() const { return "See console for results"; } - -Scene* TextureTest::scene() -{ - auto scene = Scene::create(); - TextureTest *layer = new (std::nothrow) TextureTest(false, TEST_COUNT, s_nTexCurCase); - scene->addChild(layer); - layer->release(); - - return scene; -} - -void runTextureTest() -{ - s_nTexCurCase = 0; - auto scene = TextureTest::scene(); - Director::getInstance()->replaceScene(scene); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.h index 7ebcc5ba17..83f858e07c 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.h @@ -1,40 +1,21 @@ #ifndef __PERFORMANCE_TEXTURE_TEST_H__ #define __PERFORMANCE_TEXTURE_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class TextureMenuLayer : public PerformBasicLayer +DEFINE_TEST_SUITE(PerformceTextureTests); + +class TexturePerformceTest : public TestCase { public: - TextureMenuLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0) - :PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) - { - } - - virtual void showCurrentTest(); - - virtual void onEnter() override; - virtual std::string title() const; - virtual std::string subtitle() const; - virtual void performTests() = 0; -}; - -class TextureTest : public TextureMenuLayer -{ -public: - TextureTest(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0) - :TextureMenuLayer(bControlMenuVisible, nMaxCases, nCurCase) - { - } + CREATE_FUNC(TexturePerformceTest); virtual void performTests(); - virtual std::string title() const override; - virtual std::string subtitle() const override; void performTestsPNG(const char* filename); - static cocos2d::Scene* scene(); + virtual std::string title() const override; + virtual std::string subtitle() const override; + virtual void onEnter() override; }; -void runTextureTest(); - #endif diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.cpp index f4bde5637b..bedb5693bf 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.cpp @@ -29,56 +29,25 @@ USING_NS_CC; #undef CC_PROFILER_RESET_INSTANCE #define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ ProfilingResetTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) -enum +PerformceTouchesTests::PerformceTouchesTests() { - TEST_COUNT = 3, -}; - -static int s_nTouchCurCase = 0; + ADD_TEST_CASE(TouchesPerformTest1); + ADD_TEST_CASE(TouchesPerformTest2); + ADD_TEST_CASE(TouchesPerformTest3); +} //////////////////////////////////////////////////////// // // TouchesMainScene // //////////////////////////////////////////////////////// -void TouchesMainScene::showCurrentTest() -{ - Layer* layer = nullptr; - switch (_curCase) - { - case 0: - layer = new (std::nothrow) TouchesPerformTest1(true, TEST_COUNT, _curCase); - break; - case 1: - layer = new (std::nothrow) TouchesPerformTest2(true, TEST_COUNT, _curCase); - break; - case 2: - layer = new (std::nothrow) TouchesPerformTest3(true, TEST_COUNT, _curCase); - break; - } - s_nTouchCurCase = _curCase; - - if (layer) - { - auto scene = Scene::create(); - scene->addChild(layer); - layer->release(); - - Director::getInstance()->replaceScene(scene); - } -} void TouchesMainScene::onEnter() { - PerformBasicLayer::onEnter(); + TestCase::onEnter(); auto s = Director::getInstance()->getWinSize(); - // add title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1); - label->setPosition(Vec2(s.width/2, s.height-50)); - scheduleUpdate(); _plabel = Label::createWithBMFont("fonts/arial16.fnt","00.0"); @@ -108,11 +77,6 @@ void TouchesMainScene::update(float dt) } } -std::string TouchesMainScene::title() const -{ - return "No title"; -} - //////////////////////////////////////////////////////// // // TouchesPerformTest1 @@ -215,20 +179,12 @@ public: void onTouchCancelled(Touch *touch, Event *event) {} }; - - void TouchesPerformTest3::onEnter() { - PerformBasicLayer::onEnter(); - + TestCase::onEnter(); auto s = Director::getInstance()->getWinSize(); - // add title - auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); - addChild(label, 1); - label->setPosition(Vec2(s.width/2, s.height-50)); - #define TOUCH_PROFILER_NAME "TouchProfileName" #define TOUCHABLE_NODE_NUM 1000 @@ -293,42 +249,3 @@ std::string TouchesPerformTest3::title() const { return "Touch Event Perf Test"; } - -void TouchesPerformTest3::showCurrentTest() -{ - Layer* layer = nullptr; - switch (_curCase) - { - case 0: - layer = new (std::nothrow) TouchesPerformTest1(true, TEST_COUNT, _curCase); - break; - case 1: - layer = new (std::nothrow) TouchesPerformTest2(true, TEST_COUNT, _curCase); - break; - case 2: - layer = new (std::nothrow) TouchesPerformTest3(true, TEST_COUNT, _curCase); - break; - } - s_nTouchCurCase = _curCase; - - if (layer) - { - auto scene = Scene::create(); - scene->addChild(layer); - layer->release(); - - Director::getInstance()->replaceScene(scene); - } -} - -void runTouchesTest() -{ - s_nTouchCurCase = 0; - auto scene = Scene::create(); - auto layer = new (std::nothrow) TouchesPerformTest1(true, TEST_COUNT, s_nTouchCurCase); - - scene->addChild(layer); - layer->release(); - - Director::getInstance()->replaceScene(scene); -} diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.h index 57cb579799..af32666b38 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.h @@ -1,19 +1,13 @@ #ifndef __PERFORMANCE_TOUCHES_TEST_H__ #define __PERFORMANCE_TOUCHES_TEST_H__ -#include "PerformanceTest.h" +#include "BaseTest.h" -class TouchesMainScene : public PerformBasicLayer +DEFINE_TEST_SUITE(PerformceTouchesTests); + +class TouchesMainScene : public TestCase { public: - TouchesMainScene(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0) - : PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) - { - } - - virtual std::string title() const; - - virtual void showCurrentTest() override; virtual void onEnter() override; virtual void update(float dt) override; @@ -29,50 +23,39 @@ protected: class TouchesPerformTest1 : public TouchesMainScene { public: - TouchesPerformTest1(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0) - : TouchesMainScene(bControlMenuVisible, nMaxCases, nCurCase) - { - } + CREATE_FUNC(TouchesPerformTest1); virtual void onEnter() override; virtual std::string title() const override; - bool onTouchBegan(cocos2d::Touch* touch, cocos2d::Event* event) override; - void onTouchMoved(cocos2d::Touch* touch, cocos2d::Event* event) override; - void onTouchEnded(cocos2d::Touch* touch, cocos2d::Event* event) override; - void onTouchCancelled(cocos2d::Touch* touch, cocos2d::Event* event) override; + bool onTouchBegan(cocos2d::Touch* touch, cocos2d::Event* event); + void onTouchMoved(cocos2d::Touch* touch, cocos2d::Event* event); + void onTouchEnded(cocos2d::Touch* touch, cocos2d::Event* event); + void onTouchCancelled(cocos2d::Touch* touch, cocos2d::Event* event); }; class TouchesPerformTest2 : public TouchesMainScene { public: - TouchesPerformTest2(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0) - : TouchesMainScene(bControlMenuVisible, nMaxCases, nCurCase) - { - } + CREATE_FUNC(TouchesPerformTest2); virtual void onEnter() override; virtual std::string title() const override; - void onTouchesBegan(const std::vector& touches, cocos2d::Event* event) override; - void onTouchesMoved(const std::vector& touches, cocos2d::Event* event) override; - void onTouchesEnded(const std::vector& touches, cocos2d::Event* event) override; - void onTouchesCancelled(const std::vector& touches, cocos2d::Event* event) override; + void onTouchesBegan(const std::vector& touches, cocos2d::Event* event); + void onTouchesMoved(const std::vector& touches, cocos2d::Event* event); + void onTouchesEnded(const std::vector& touches, cocos2d::Event* event); + void onTouchesCancelled(const std::vector& touches, cocos2d::Event* event); }; -class TouchesPerformTest3 : public PerformBasicLayer +class TouchesPerformTest3 : public TestCase { public: - TouchesPerformTest3(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0) - : PerformBasicLayer(bControlMenuVisible, nMaxCases, nCurCase) - { - } - + CREATE_FUNC(TouchesPerformTest3); + virtual void onEnter() override; virtual std::string title() const; - virtual void showCurrentTest() override; }; -void runTouchesTest(); #endif diff --git a/tests/cpp-tests/Classes/Physics3DTest/Physics3DTest.cpp b/tests/cpp-tests/Classes/Physics3DTest/Physics3DTest.cpp new file mode 100644 index 0000000000..cb2d1e9934 --- /dev/null +++ b/tests/cpp-tests/Classes/Physics3DTest/Physics3DTest.cpp @@ -0,0 +1,744 @@ +/**************************************************************************** + Copyright (c) 2012 cocos2d-x.org + Copyright (c) 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 "Physics3DTest.h" + +#include "3d/CCTerrain.h" +#include "3d/CCBundle3D.h" +#include "physics3d/CCPhysics3D.h" +#include "extensions/Particle3D/PU/CCPUParticleSystem3D.h" +USING_NS_CC_EXT; +USING_NS_CC; + +enum +{ + IDC_NEXT = 100, + IDC_BACK, + IDC_RESTART +}; + +static cocos2d::Scene* physicsScene = nullptr; + +#define START_POS_X -0.5 +#define START_POS_Y -2.5 +#define START_POS_Z -0.5 + +#define ARRAY_SIZE_X 4 +#define ARRAY_SIZE_Y 3 +#define ARRAY_SIZE_Z 4 + +Physics3DTests::Physics3DTests() +{ +#if CC_USE_3D_PHYSICS == 0 + ADD_TEST_CASE(Physics3DDemoDisabled); +#else + ADD_TEST_CASE(BasicPhysics3DDemo); + ADD_TEST_CASE(Physics3DConstraintDemo); + ADD_TEST_CASE(Physics3DKinematicDemo); + ADD_TEST_CASE(Physics3DCollisionCallbackDemo); + ADD_TEST_CASE(Physics3DTerrainDemo); +#endif +}; + +#if CC_USE_3D_PHYSICS == 0 +void Physics3DDemoDisabled::onEnter() +{ + TTFConfig ttfConfig("fonts/arial.ttf", 16); + auto label = Label::createWithTTF(ttfConfig, "Should define CC_USE_3D_PHYSICS\n to run this test case"); + + auto size = Director::getInstance()->getWinSize(); + label->setPosition(Vec2(size.width / 2, size.height / 2)); + + addChild(label); + + TestCase::onEnter(); +} +#else +std::string Physics3DTestDemo::title() const +{ + return "Physics3D Test"; +} + +std::string Physics3DTestDemo::subtitle() const +{ + return ""; +} + +bool Physics3DTestDemo::init() +{ + if (!TestCase::init()) return false; + + if (initWithPhysics()) + { + getPhysics3DWorld()->setDebugDrawEnable(false); + + physicsScene = this; + Size size = Director::getInstance()->getWinSize(); + _camera = Camera::createPerspective(30.0f, size.width / size.height, 1.0f, 1000.0f); + _camera->setPosition3D(Vec3(0.0f, 50.0f, 100.0f)); + _camera->lookAt(Vec3(0.0f, 0.0f, 0.0f), Vec3(0.0f, 1.0f, 0.0f)); + _camera->setCameraFlag(CameraFlag::USER1); + this->addChild(_camera); + + auto listener = EventListenerTouchAllAtOnce::create(); + listener->onTouchesBegan = CC_CALLBACK_2(Physics3DTestDemo::onTouchesBegan, this); + listener->onTouchesMoved = CC_CALLBACK_2(Physics3DTestDemo::onTouchesMoved, this); + listener->onTouchesEnded = CC_CALLBACK_2(Physics3DTestDemo::onTouchesEnded, this); + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + TTFConfig ttfConfig("fonts/arial.ttf", 10); + auto label = Label::createWithTTF(ttfConfig,"DebugDraw OFF"); + auto menuItem = MenuItemLabel::create(label, [=](Ref *ref){ + if (getPhysics3DWorld()->isDebugDrawEnabled()){ + getPhysics3DWorld()->setDebugDrawEnable(false); + label->setString("DebugDraw OFF"); + }else{ + getPhysics3DWorld()->setDebugDrawEnable(true); + label->setString("DebugDraw ON"); + } + }); + + auto menu = Menu::create(menuItem, nullptr); + menu->setPosition(Vec2::ZERO); + menuItem->setAnchorPoint(Vec2::ANCHOR_TOP_LEFT); + menuItem->setPosition( Vec2(VisibleRect::left().x, VisibleRect::top().y-50) ); + this->addChild(menu); + + _angle = 0.0f; + return true; + } + physicsScene = nullptr; + return false; +} + +void Physics3DTestDemo::onTouchesBegan(const std::vector& touches, cocos2d::Event *event) +{ + _needShootBox = true; +} + +void Physics3DTestDemo::onTouchesMoved(const std::vector& touches, cocos2d::Event *event) +{ + if (touches.size() && _camera) + { + auto touch = touches[0]; + auto delta = touch->getDelta(); + + _angle -= CC_DEGREES_TO_RADIANS(delta.x); + _camera->setPosition3D(Vec3(100.0f * sinf(_angle), 50.0f, 100.0f * cosf(_angle))); + _camera->lookAt(Vec3(0.0f, 0.0f, 0.0f), Vec3(0.0f, 1.0f, 0.0f)); + + if (delta.lengthSquared() > 16) + { + _needShootBox = false; + } + } +} + +void Physics3DTestDemo::onTouchesEnded(const std::vector& touches, cocos2d::Event *event) +{ + if (!_needShootBox) return; + if (!touches.empty()) + { + auto location = touches[0]->getLocationInView(); + + Vec3 nearP(location.x, location.y, -1.0f), farP(location.x, location.y, 1.0f); + nearP = _camera->unproject(nearP); + farP = _camera->unproject(farP); + Vec3 dir(farP - nearP); + shootBox(_camera->getPosition3D() + dir * 10.0f); + } +} + +Physics3DTestDemo::Physics3DTestDemo( void ) +: _angle(0.0f) +, _camera(nullptr) +{ + +} + +void Physics3DTestDemo::update( float delta ) +{ + +} + +Physics3DTestDemo::~Physics3DTestDemo( void ) +{ + +} + +void Physics3DTestDemo::shootBox( const cocos2d::Vec3 &des ) +{ + Physics3DRigidBodyDes rbDes; + Vec3 linearVel = des - _camera->getPosition3D(); + linearVel.normalize(); + linearVel *= 100.0f; + rbDes.originalTransform.translate(_camera->getPosition3D()); + rbDes.mass = 1.f; + rbDes.shape = Physics3DShape::createBox(Vec3(0.5f, 0.5f, 0.5f)); + auto sprite = PhysicsSprite3D::create("Sprite3DTest/box.c3t", &rbDes); + sprite->setTexture("Images/Icon.png"); + + auto rigidBody = static_cast(sprite->getPhysicsObj()); + rigidBody->setLinearFactor(Vec3::ONE); + rigidBody->setLinearVelocity(linearVel); + rigidBody->setAngularVelocity(Vec3::ZERO); + rigidBody->setCcdMotionThreshold(0.5f); + rigidBody->setCcdSweptSphereRadius(0.4f); + + this->addChild(sprite); + sprite->setPosition3D(_camera->getPosition3D()); + sprite->setScale(0.5f); + sprite->syncToNode(); + + //optimize, only sync node to physics + sprite->setSyncFlag(Physics3DComponent::PhysicsSyncFlag::PHYSICS_TO_NODE); //sync node to physics + + sprite->setCameraMask((unsigned short)CameraFlag::USER1); +} + +std::string BasicPhysics3DDemo::subtitle() const +{ + return "Basic Physics3D"; +} + +bool BasicPhysics3DDemo::init() +{ + if (!Physics3DTestDemo::init()) + return false; + + //create floor + Physics3DRigidBodyDes rbDes; + rbDes.mass = 0.0f; + rbDes.shape = Physics3DShape::createBox(Vec3(60.0f, 1.0f, 60.0f)); + + auto floor = PhysicsSprite3D::create("Sprite3DTest/box.c3t", &rbDes); + floor->setTexture("Sprite3DTest/plane.png"); + floor->setScaleX(60); + floor->setScaleZ(60); + this->addChild(floor); + floor->setCameraMask((unsigned short)CameraFlag::USER1); + floor->syncToNode(); + //static object sync is not needed + floor->setSyncFlag(Physics3DComponent::PhysicsSyncFlag::NONE); + + //create several boxes using PhysicsSprite3D + rbDes.mass = 1.f; + rbDes.shape = Physics3DShape::createBox(Vec3(0.8f, 0.8f, 0.8f)); + float start_x = START_POS_X - ARRAY_SIZE_X/2; + float start_y = START_POS_Y; + float start_z = START_POS_Z - ARRAY_SIZE_Z/2; + + for (int k=0;ksetTexture("Images/CyanSquare.png"); + sprite->setPosition3D(Vec3(x, y, z)); + sprite->syncToNode(); + sprite->setSyncFlag(Physics3DComponent::PhysicsSyncFlag::PHYSICS_TO_NODE); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + sprite->setScale(0.8f); + this->addChild(sprite); + } + } + } + + physicsScene->setPhysics3DDebugCamera(_camera); + + return true; +} + +std::string Physics3DConstraintDemo::subtitle() const +{ + return "Physics3D Constraint"; +} + +std::string Physics3DKinematicDemo::subtitle() const +{ + return "Physics3D Kinematic"; +} + +bool Physics3DKinematicDemo::init() +{ + if (!Physics3DTestDemo::init()) + return false; + + //create floor + Physics3DRigidBodyDes rbDes; + rbDes.mass = 0.0f; + rbDes.shape = Physics3DShape::createBox(Vec3(60.0f, 1.0f, 60.0f)); + auto floor = PhysicsSprite3D::create("Sprite3DTest/box.c3t", &rbDes); + floor->setTexture("Sprite3DTest/plane.png"); + floor->setScaleX(60); + floor->setScaleZ(60); + floor->setPosition3D(Vec3(0.f, -1.f, 0.f)); + this->addChild(floor); + floor->setCameraMask((unsigned short)CameraFlag::USER1); + floor->syncToNode(); + //static object sync is not needed + floor->setSyncFlag(Physics3DComponent::PhysicsSyncFlag::NONE); + + //create Kinematics + for (unsigned int i = 0; i < 3; ++i) + { + rbDes.mass = 0.f; //kinematic objects. zero mass so that it can not be affected by other dynamic objects + rbDes.shape = Physics3DShape::createBox(Vec3(2.0f, 2.0f, 2.0f)); + + auto sprite = PhysicsSprite3D::create("Sprite3DTest/box.c3t", &rbDes); + sprite->setTexture("Images/CyanSquare.png"); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + auto rigidBody = static_cast(sprite->getPhysicsObj()); + rigidBody->setKinematic(true); + + this->addChild(sprite); + + sprite->setScale(2.0f); + sprite->setPosition3D(Vec3(-15.0f, 0.0f, 15.0f - 15.0f * i)); + auto moveby = MoveBy::create(2.0f + i, Vec3(30.0f, 0.0f, 0.0f)); + sprite->runAction(RepeatForever::create(Sequence::create(moveby, moveby->reverse(), nullptr))); + } + + //create Dynamic + { + //create several spheres + rbDes.mass = 1.f; + rbDes.shape = Physics3DShape::createSphere(0.5f); + float start_x = START_POS_X - ARRAY_SIZE_X/2; + float start_y = START_POS_Y + 5.0f; + float start_z = START_POS_Z - ARRAY_SIZE_Z/2; + + for (int k=0;ksetTexture("Sprite3DTest/plane.png"); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + sprite->setScale(1.0f / sprite->getContentSize().width); + this->addChild(sprite); + sprite->setPosition3D(Vec3(x, y, z)); + sprite->syncToNode(); + + sprite->setSyncFlag(Physics3DComponent::PhysicsSyncFlag::PHYSICS_TO_NODE); + } + } + } + } + + + physicsScene->setPhysics3DDebugCamera(_camera); + return true; +} + + +bool Physics3DConstraintDemo::init() +{ + if (!Physics3DTestDemo::init()) + return false; + + //PhysicsSprite3D = Sprite3D + Physics3DComponent + Physics3DRigidBodyDes rbDes; + rbDes.disableSleep = true; + //create box + auto sprite = Sprite3D::create("Sprite3DTest/orc.c3b"); + rbDes.mass = 10.f; + rbDes.shape = Physics3DShape::createBox(Vec3(5.0f, 5.0f, 5.0f)); + auto rigidBody = Physics3DRigidBody::create(&rbDes); + Quaternion quat; + Quaternion::createFromAxisAngle(Vec3(0.f, 1.f, 0.f), CC_DEGREES_TO_RADIANS(180), &quat); + auto component = Physics3DComponent::create(rigidBody, Vec3(0.f, -3.f, 0.f), quat); + + sprite->addComponent(component); + addChild(sprite); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + sprite->setScale(0.4f); + sprite->setPosition3D(Vec3(-20.f, 5.f, 0.f)); + //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(Physics3DComponent::PhysicsSyncFlag::PHYSICS_TO_NODE); + + physicsScene->setPhysics3DDebugCamera(_camera); + + //create point to point constraint + Physics3DConstraint* constraint = Physics3DPointToPointConstraint::create(rigidBody, Vec3(2.5f, 2.5f, 2.5f)); + physicsScene->getPhysics3DWorld()->addPhysics3DConstraint(constraint); + + //create hinge constraint + rbDes.mass = 1.0f; + rbDes.shape = Physics3DShape::createBox(Vec3(8.0f, 8.0f, 1.f)); + rigidBody = Physics3DRigidBody::create(&rbDes); + component = Physics3DComponent::create(rigidBody); + sprite = Sprite3D::create("Sprite3DTest/box.c3t"); + sprite->setTexture("Sprite3DTest/plane.png"); + sprite->setScaleX(8.f); + sprite->setScaleY(8.f); + sprite->setPosition3D(Vec3(5.f, 0.f, 0.f)); + sprite->addComponent(component); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(sprite); + component->syncToNode(); + rigidBody->setAngularVelocity(Vec3(0,3,0)); + constraint = Physics3DHingeConstraint::create(rigidBody, Vec3(4.f, 4.f, 0.5f), Vec3(0.f, 1.f, 0.f)); + physicsScene->getPhysics3DWorld()->addPhysics3DConstraint(constraint); + + + //create slider constraint + rbDes.mass = 1.0f; + rbDes.shape = Physics3DShape::createBox(Vec3(3.0f, 2.0f, 3.f)); + rigidBody = Physics3DRigidBody::create(&rbDes); + component = Physics3DComponent::create(rigidBody); + sprite = Sprite3D::create("Sprite3DTest/box.c3t"); + sprite->setTexture("Sprite3DTest/plane.png"); + sprite->setScaleX(3.f); + sprite->setScaleZ(3.f); + sprite->setPosition3D(Vec3(30.f, 15.f, 0.f)); + sprite->addComponent(component); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(sprite); + component->syncToNode(); + rigidBody->setLinearVelocity(Vec3(0,3,0)); + + rbDes.mass = 0.0f; + rbDes.shape = Physics3DShape::createBox(Vec3(3.0f, 3.0f, 3.f)); + auto rigidBodyB = Physics3DRigidBody::create(&rbDes); + component = Physics3DComponent::create(rigidBodyB); + sprite = Sprite3D::create("Sprite3DTest/box.c3t"); + sprite->setTexture("Sprite3DTest/plane.png"); + sprite->setScale(3.f); + sprite->setPosition3D(Vec3(30.f, 5.f, 0.f)); + sprite->addComponent(component); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(sprite); + component->syncToNode(); + + Mat4 frameInA, frameInB; + Mat4::createRotationZ(CC_DEGREES_TO_RADIANS(90), &frameInA); + frameInB = frameInA; + frameInA.m[13] = -5.f; + frameInB.m[13] = 5.f; + constraint = Physics3DSliderConstraint::create(rigidBody, rigidBodyB, frameInA, frameInB, false); + physicsScene->getPhysics3DWorld()->addPhysics3DConstraint(constraint); + ((Physics3DSliderConstraint*)constraint)->setLowerLinLimit(-5.f); + ((Physics3DSliderConstraint*)constraint)->setUpperLinLimit(5.f); + + //create ConeTwist constraint + rbDes.mass = 1.f; + rbDes.shape = Physics3DShape::createBox(Vec3(3.f, 3.f, 3.f)); + rigidBody = Physics3DRigidBody::create(&rbDes); + component = Physics3DComponent::create(rigidBody); + sprite = Sprite3D::create("Sprite3DTest/box.c3t"); + sprite->setTexture("Sprite3DTest/plane.png"); + sprite->setScale(3.f); + sprite->setPosition3D(Vec3(-10.f, 5.f, 0.f)); + sprite->addComponent(component); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(sprite); + component->syncToNode(); + + Mat4::createRotationZ(CC_DEGREES_TO_RADIANS(90), &frameInA); + frameInA.m[12] = 0.f; + frameInA.m[13] = -10.f; + frameInA.m[14] = 0.f; + constraint = Physics3DConeTwistConstraint::create(rigidBody, frameInA); + physicsScene->getPhysics3DWorld()->addPhysics3DConstraint(constraint, true); + ((Physics3DConeTwistConstraint*)constraint)->setLimit(CC_DEGREES_TO_RADIANS(10), CC_DEGREES_TO_RADIANS(10), CC_DEGREES_TO_RADIANS(40)); + + //create 6 dof constraint + rbDes.mass = 1.0f; + rbDes.shape = Physics3DShape::createBox(Vec3(3.0f, 3.0f, 3.f)); + rigidBody = Physics3DRigidBody::create(&rbDes); + component = Physics3DComponent::create(rigidBody); + sprite = Sprite3D::create("Sprite3DTest/box.c3t"); + sprite->setTexture("Sprite3DTest/plane.png"); + sprite->setScale(3.f); + sprite->setPosition3D(Vec3(30.f, -5.f, 0.f)); + sprite->addComponent(component); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(sprite); + component->syncToNode(); + frameInA.setIdentity(); + constraint = Physics3D6DofConstraint::create(rigidBody, frameInA, false); + physicsScene->getPhysics3DWorld()->addPhysics3DConstraint(constraint); + ((Physics3D6DofConstraint*)constraint)->setAngularLowerLimit(Vec3(0,0,0)); + ((Physics3D6DofConstraint*)constraint)->setAngularUpperLimit(Vec3(0,0,0)); + ((Physics3D6DofConstraint*)constraint)->setLinearLowerLimit(Vec3(-10,0,0)); + ((Physics3D6DofConstraint*)constraint)->setLinearUpperLimit(Vec3(10,0,0)); + + return true; +} + +void Physics3DConstraintDemo::onTouchesBegan(const std::vector& touches, cocos2d::Event *event) +{ + //ray trace + if(_camera) + { + auto touch = touches[0]; + auto location = touch->getLocationInView(); + Vec3 nearP(location.x, location.y, 0.0f), farP(location.x, location.y, 1.0f); + + auto size = Director::getInstance()->getWinSize(); + _camera->unproject(size, &nearP, &nearP); + _camera->unproject(size, &farP, &farP); + + Physics3DWorld::HitResult result; + bool ret = physicsScene->getPhysics3DWorld()->rayCast(nearP, farP, &result); + if (ret && result.hitObj->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY) + { + auto mat = result.hitObj->getWorldTransform().getInversed(); + Vec3 position; + mat.transformPoint(result.hitPosition, &position); + + _constraint = Physics3DPointToPointConstraint::create(static_cast(result.hitObj), position); + physicsScene->getPhysics3DWorld()->addPhysics3DConstraint(_constraint, true); + _pickingDistance = (result.hitPosition - nearP).length(); + return; + } + } + Physics3DTestDemo::onTouchesBegan(touches, event); + _needShootBox = false; +} +void Physics3DConstraintDemo::onTouchesMoved(const std::vector& touches, cocos2d::Event *event) +{ + if (_constraint) + { + auto p2pConstraint = ((Physics3DPointToPointConstraint*)_constraint); + + auto touch = touches[0]; + auto location = touch->getLocationInView(); + Vec3 nearP(location.x, location.y, 0.0f), farP(location.x, location.y, 1.0f); + + auto size = Director::getInstance()->getWinSize(); + _camera->unproject(size, &nearP, &nearP); + _camera->unproject(size, &farP, &farP); + auto dir = (farP - nearP).getNormalized(); + p2pConstraint->setPivotPointInB(nearP + dir * _pickingDistance); + return; + } + Physics3DTestDemo::onTouchesMoved(touches, event); +} +void Physics3DConstraintDemo::onTouchesEnded(const std::vector& touches, cocos2d::Event *event) +{ + if (_constraint) + { + physicsScene->getPhysics3DWorld()->removePhysics3DConstraint(_constraint); + _constraint = nullptr; + return; + } + Physics3DTestDemo::onTouchesEnded(touches, event); +} + +bool Physics3DTerrainDemo::init() +{ + if (!Physics3DTestDemo::init()) + return false; + + Terrain::DetailMap r("TerrainTest/dirt.jpg"),g("TerrainTest/Grass2.jpg",10),b("TerrainTest/road.jpg"),a("TerrainTest/GreenSkin.jpg",20); + + Terrain::TerrainData data("TerrainTest/heightmap129.jpg","TerrainTest/alphamap.png",r,g,b,a,Size(32,32), 20.0f, 1.0f); + auto terrain = Terrain::create(data,Terrain::CrackFixedType::SKIRT); + terrain->setMaxDetailMapAmount(4); + terrain->setCameraMask(2); + terrain->setDrawWire(false); + + terrain->setSkirtHeightRatio(3); + terrain->setLODDistance(64,128,192); + terrain->setCameraMask((unsigned short)CameraFlag::USER1); + + //create terrain + Physics3DRigidBodyDes rbDes; + rbDes.mass = 0.0f; + std::vector heidata = terrain->getHeightData(); + auto size = terrain->getTerrainSize(); + rbDes.shape = Physics3DShape::createHeightfield(size.width, size.height, &heidata[0], 1.0f, terrain->getMinHeight(), terrain->getMaxHeight(), true, false, true); + auto rigidBody = Physics3DRigidBody::create(&rbDes); + auto component = Physics3DComponent::create(rigidBody); + terrain->addComponent(component); + this->addChild(terrain); + component->syncToNode(); + component->setSyncFlag(Physics3DComponent::PhysicsSyncFlag::NONE); + + + //create several spheres + rbDes.mass = 1.f; + rbDes.shape = Physics3DShape::createSphere(0.5f); + float start_x = START_POS_X - ARRAY_SIZE_X/2 + 5.0f; + float start_y = START_POS_Y + 20.0f; + float start_z = START_POS_Z - ARRAY_SIZE_Z/2; + + for (int k=0;ksetTexture("Sprite3DTest/plane.png"); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + sprite->setScale(1.0f / sprite->getContentSize().width); + sprite->setPosition3D(Vec3(x, y, z)); + this->addChild(sprite); + sprite->syncToNode(); + sprite->setSyncFlag(Physics3DComponent::PhysicsSyncFlag::PHYSICS_TO_NODE); + } + } + } + + //create mesh + std::vector trianglesList = Bundle3D::getTrianglesList("Sprite3DTest/boss.c3b"); + + rbDes.mass = 0.0f; + rbDes.shape = Physics3DShape::createMesh(&trianglesList[0], (int)trianglesList.size() / 3); + rigidBody = Physics3DRigidBody::create(&rbDes); + component = Physics3DComponent::create(rigidBody); + auto sprite = Sprite3D::create("Sprite3DTest/boss.c3b"); + sprite->addComponent(component); + sprite->setRotation3D(Vec3(-90.0f, 0.0f, 0.0f)); + sprite->setPosition3D(Vec3(0.0f, 15.0f, 0.0f)); + sprite->setCameraMask(2); + this->addChild(sprite); + + std::vector > shapeList; + { + Mat4 localTrans; + auto bodyshape = Physics3DShape::createBox(Vec3(2.0f, 4.0f, 2.0f)); + Mat4::createTranslation(0.0f, 2.0f, 0.0f, &localTrans); + shapeList.push_back(std::make_pair(bodyshape, localTrans)); + auto headshape = Physics3DShape::createSphere(1.5f); + Mat4::createTranslation(0.6f, 5.0f, -1.5f, &localTrans); + shapeList.push_back(std::make_pair(headshape, localTrans)); + auto lhandshape = Physics3DShape::createBox(Vec3(1.0f, 3.0f, 1.0f)); + Mat4::createRotation(Vec3(1.0f, 0.0f, 0.0f), CC_DEGREES_TO_RADIANS(15.0f), &localTrans); + localTrans.m[12] = -1.5f; localTrans.m[13] = 2.5f; localTrans.m[14] = -2.5f; + shapeList.push_back(std::make_pair(lhandshape, localTrans)); + auto rhandshape = Physics3DShape::createBox(Vec3(1.0f, 3.0f, 1.0f)); + Mat4::createRotation(Vec3(1.0f, 0.0f, 0.0f), CC_DEGREES_TO_RADIANS(-15.0f), &localTrans); + localTrans.m[12] = 2.0f; localTrans.m[13] = 2.5f; localTrans.m[14] = 1.f; + shapeList.push_back(std::make_pair(rhandshape, localTrans)); + + rbDes.mass = 10.0f; + rbDes.shape = Physics3DShape::createCompoundShape(shapeList); + rigidBody = Physics3DRigidBody::create(&rbDes); + component = Physics3DComponent::create(rigidBody); + auto sprite = Sprite3D::create("Sprite3DTest/orc.c3b"); + sprite->addComponent(component); + sprite->setRotation3D(Vec3(0.0f, 180.0f, 0.0f)); + sprite->setPosition3D(Vec3(-5.0f, 20.0f, 0.0f)); + sprite->setScale(0.4f); + sprite->setCameraMask(2); + this->addChild(sprite); + } + + + physicsScene->setPhysics3DDebugCamera(_camera); + return true; +} + +std::string Physics3DTerrainDemo::subtitle() const +{ + return "Physics3D Terrain"; +} + +std::string Physics3DCollisionCallbackDemo::subtitle() const +{ + return "Physics3D CollisionCallback"; +} + +bool Physics3DCollisionCallbackDemo::init() +{ + if (!Physics3DTestDemo::init()) + return false; + + { + Physics3DRigidBodyDes rbDes; + + float scale = 2.0f; + std::vector trianglesList = Bundle3D::getTrianglesList("Sprite3DTest/boss.c3b"); + for (auto& it : trianglesList) { + it *= scale; + } + + rbDes.mass = 0.0f; + rbDes.shape = Physics3DShape::createMesh(&trianglesList[0], (int)trianglesList.size() / 3); + auto rigidBody = Physics3DRigidBody::create(&rbDes); + auto component = Physics3DComponent::create(rigidBody); + auto sprite = Sprite3D::create("Sprite3DTest/boss.c3b"); + sprite->addComponent(component); + sprite->setRotation3D(Vec3(-90.0f, 0.0f, 0.0f)); + sprite->setScale(scale); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(sprite); + //preload + // + rigidBody->setCollisionCallback([=](const Physics3DCollisionInfo &ci){ + if (!ci.collisionPointList.empty()){ + if (ci.objA->getMask() != 0){ + auto ps = PUParticleSystem3D::create("Particle3D/scripts/mp_hit_04.pu"); + ps->setPosition3D(ci.collisionPointList[0].worldPositionOnB); + ps->setScale(0.05f); + ps->startParticleSystem(); + ps->setCameraMask(2); + this->addChild(ps); + ps->runAction(Sequence::create(DelayTime::create(1.0f), CallFunc::create([=](){ + ps->removeFromParent(); + }), nullptr)); + ci.objA->setMask(0); + } + } + //CCLOG("------------BoxB Collision Info------------"); + //CCLOG("Collision Point Num: %d", ci.collisionPointList.size()); + //for (auto &iter : ci.collisionPointList){ + // CCLOG("Collision Position On A: (%.2f, %.2f, %.2f)", iter.worldPositionOnA.x, iter.worldPositionOnA.y, iter.worldPositionOnA.z); + // CCLOG("Collision Position On B: (%.2f, %.2f, %.2f)", iter.worldPositionOnB.x, iter.worldPositionOnB.y, iter.worldPositionOnB.z); + // CCLOG("Collision Normal On B: (%.2f, %.2f, %.2f)", iter.worldNormalOnB.x, iter.worldNormalOnB.y, iter.worldNormalOnB.z); + //} + //CCLOG("------------BoxB Collision Info------------"); + }); + } + + physicsScene->setPhysics3DDebugCamera(_camera); + return true; +} + +#endif diff --git a/tests/cpp-tests/Classes/Physics3DTest/Physics3DTest.h b/tests/cpp-tests/Classes/Physics3DTest/Physics3DTest.h new file mode 100644 index 0000000000..03c77a6ffd --- /dev/null +++ b/tests/cpp-tests/Classes/Physics3DTest/Physics3DTest.h @@ -0,0 +1,153 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef _PHYSICS3D_TEST_H_ +#define _PHYSICS3D_TEST_H_ + +#include "../testBasic.h" +#include "../BaseTest.h" +#include + +namespace cocos2d { + class Physics3DConstraint; +} + +DEFINE_TEST_SUITE(Physics3DTests); + +#if CC_USE_3D_PHYSICS == 0 +class Physics3DDemoDisabled : public TestCase +{ +public: + CREATE_FUNC(Physics3DDemoDisabled); + + virtual void onEnter() override; +}; +#else + +class Physics3DTestDemo : public TestCase +{ +public: + CREATE_FUNC(Physics3DTestDemo); + Physics3DTestDemo(void); + virtual ~Physics3DTestDemo(void); + + // overrides + virtual bool init() override; + virtual std::string title() const override; + virtual std::string subtitle() const override; + virtual void update(float delta) override; + + virtual void onTouchesBegan(const std::vector& touches, cocos2d::Event *event); + virtual void onTouchesMoved(const std::vector& touches, cocos2d::Event *event); + virtual void onTouchesEnded(const std::vector& touches, cocos2d::Event *event); + +protected: + + void shootBox(const cocos2d::Vec3 &des); + +protected: + std::string _title; + cocos2d::Camera *_camera; + float _angle; + bool _needShootBox; +}; + +class BasicPhysics3DDemo : public Physics3DTestDemo +{ +public: + + CREATE_FUNC(BasicPhysics3DDemo); + BasicPhysics3DDemo(){}; + virtual ~BasicPhysics3DDemo(){}; + + virtual std::string subtitle() const override; + + virtual bool init() override; +}; + +class Physics3DConstraintDemo : public Physics3DTestDemo +{ +public: + + CREATE_FUNC(Physics3DConstraintDemo); + Physics3DConstraintDemo():_constraint(nullptr), _pickingDistance(0.f){}; + virtual ~Physics3DConstraintDemo(){}; + + virtual std::string subtitle() const override; + + virtual bool init() override; + + virtual void onTouchesBegan(const std::vector& touches, cocos2d::Event *event) override; + virtual void onTouchesMoved(const std::vector& touches, cocos2d::Event *event) override; + virtual void onTouchesEnded(const std::vector& touches, cocos2d::Event *event) override; + +protected: + cocos2d::Physics3DConstraint* _constraint; //for picking + float _pickingDistance; //picking distance +}; + +class Physics3DKinematicDemo : public Physics3DTestDemo +{ +public: + + CREATE_FUNC(Physics3DKinematicDemo); + Physics3DKinematicDemo(){}; + virtual ~Physics3DKinematicDemo(){}; + + virtual std::string subtitle() const override; + + virtual bool init() override; +}; + +class Physics3DCollisionCallbackDemo : public Physics3DTestDemo +{ +public: + + CREATE_FUNC(Physics3DCollisionCallbackDemo); + Physics3DCollisionCallbackDemo(){}; + virtual ~Physics3DCollisionCallbackDemo(){}; + + virtual std::string subtitle() const override; + + virtual bool init() override; +}; + +class Physics3DTerrainDemo : public Physics3DTestDemo +{ +public: + + CREATE_FUNC(Physics3DTerrainDemo); + Physics3DTerrainDemo(){}; + virtual ~Physics3DTerrainDemo(){}; + + virtual std::string subtitle() const override; + + virtual bool init() override; + +private: +}; + +#endif + +#endif \ No newline at end of file diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp b/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp index be989a1048..46a6ee9c8d 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp @@ -182,7 +182,7 @@ bool ShaderMandelbrot::init() { if (ShaderTestDemo::init()) { -#if CC_TARGET_PLATFORM != CC_PLATFORM_WINRT && CC_TARGET_PLATFORM != CC_PLATFORM_WP8 +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) auto sn = ShaderNode::shaderNodeWithVertex("", "Shaders/example_Mandelbrot.fsh"); auto s = Director::getInstance()->getWinSize(); @@ -216,7 +216,7 @@ bool ShaderJulia::init() { if (ShaderTestDemo::init()) { -#if CC_TARGET_PLATFORM != CC_PLATFORM_WINRT && CC_TARGET_PLATFORM != CC_PLATFORM_WP8 +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) auto sn = ShaderNode::shaderNodeWithVertex("", "Shaders/example_Julia.fsh"); auto s = Director::getInstance()->getWinSize(); @@ -487,7 +487,7 @@ bool ShaderBlur::init() { if( ShaderTestDemo::init() ) { -#if CC_TARGET_PLATFORM != CC_PLATFORM_WINRT && CC_TARGET_PLATFORM != CC_PLATFORM_WP8 +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) _blurSprite = SpriteBlur::create("Images/grossini.png"); auto sprite = Sprite::create("Images/grossini.png"); auto s = Director::getInstance()->getWinSize(); diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp index e15ae9e8ed..769f706afe 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp @@ -140,7 +140,7 @@ bool Effect::initGLProgramState(const std::string &fragmentFilename) auto fragSource = fileUtiles->getStringFromFile(fragmentFullPath); auto glprogram = GLProgram::createWithByteArrays(ccPositionTextureColor_noMVP_vert, fragSource.c_str()); -#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) _fragSource = fragSource; #endif @@ -153,7 +153,7 @@ bool Effect::initGLProgramState(const std::string &fragmentFilename) Effect::Effect() : _glprogramstate(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) _backgroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom*) { @@ -171,7 +171,7 @@ Effect::Effect() Effect::~Effect() { CC_SAFE_RELEASE_NULL(_glprogramstate); -#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(_backgroundListener); #endif } diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.h b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.h index 4abdbdd80a..7144ba78f7 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.h +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.h @@ -29,7 +29,7 @@ protected: Effect(); virtual ~Effect(); cocos2d::GLProgramState* _glprogramstate; -#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) std::string _fragSource; cocos2d::EventListenerCustom* _backgroundListener; #endif diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp index 81b09ac7cf..ee81868699 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp @@ -24,15 +24,6 @@ ****************************************************************************/ #include "Sprite3DTest.h" -#include "base/CCAsyncTaskPool.h" -#include "3d/CCAnimation3D.h" -#include "3d/CCAnimate3D.h" -#include "3d/CCAttachNode.h" -#include "3d/CCRay.h" -#include "3d/CCSprite3D.h" -#include "3d/CCTextureCube.h" -#include "3d/CCSkybox.h" -#include "renderer/CCVertexIndexBuffer.h" #include "DrawNode3D.h" #include @@ -45,18 +36,14 @@ Sprite3DTests::Sprite3DTests() ADD_TEST_CASE(Sprite3DBasicTest); ADD_TEST_CASE(Sprite3DHitTest); ADD_TEST_CASE(AsyncLoadSprite3DTest); -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) // 3DEffect use custom shader which is not supported on WP8/WinRT yet. ADD_TEST_CASE(Sprite3DEffectTest); ADD_TEST_CASE(Sprite3DUVAnimationTest); ADD_TEST_CASE(Sprite3DFakeShadowTest); ADD_TEST_CASE(Sprite3DBasicToonShaderTest); ADD_TEST_CASE(Sprite3DLightMapTest); -#endif ADD_TEST_CASE(Sprite3DWithSkinTest); -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) ADD_TEST_CASE(Sprite3DWithSkinOutlineTest); -#endif ADD_TEST_CASE(Animate3DTest); ADD_TEST_CASE(AttachmentTest); ADD_TEST_CASE(Sprite3DReskinTest); @@ -68,6 +55,7 @@ Sprite3DTests::Sprite3DTests() ADD_TEST_CASE(Sprite3DForceDepthTest); ADD_TEST_CASE(Sprite3DCubeMapTest); ADD_TEST_CASE(NodeAnimationTest); + ADD_TEST_CASE(Issue9767); }; //------------------------------------------------------------------ @@ -283,7 +271,7 @@ Sprite3DUVAnimationTest::Sprite3DUVAnimationTest() //the callback function update cylinder's texcoord schedule(schedule_selector(Sprite3DUVAnimationTest::cylinderUpdate)); -#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*) { @@ -311,7 +299,7 @@ Sprite3DUVAnimationTest::Sprite3DUVAnimationTest() Sprite3DUVAnimationTest::~Sprite3DUVAnimationTest() { -#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 } @@ -419,7 +407,7 @@ Sprite3DFakeShadowTest::Sprite3DFakeShadowTest() schedule(CC_SCHEDULE_SELECTOR(Sprite3DFakeShadowTest::updateCamera), 0.0f); -#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*) { @@ -448,7 +436,7 @@ Sprite3DFakeShadowTest::Sprite3DFakeShadowTest() Sprite3DFakeShadowTest::~Sprite3DFakeShadowTest() { -#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 } @@ -648,7 +636,7 @@ Sprite3DBasicToonShaderTest::Sprite3DBasicToonShaderTest() addChild(_camera); setCameraMask(2); -#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*) { @@ -665,7 +653,7 @@ Sprite3DBasicToonShaderTest::Sprite3DBasicToonShaderTest() Sprite3DBasicToonShaderTest::~Sprite3DBasicToonShaderTest() { -#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 } @@ -951,7 +939,7 @@ Effect3DOutline::Effect3DOutline() , _outlineWidth(1.0f) , _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*) { @@ -968,7 +956,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 } @@ -1036,11 +1024,6 @@ void Effect3DOutline::setTarget(EffectSprite3D *sprite) } -static void MatrixPalleteCallBack( GLProgram* glProgram, Uniform* uniform, int paletteSize, const float* palette) -{ - glUniform4fv( uniform->location, (GLsizei)paletteSize, (const float*)palette ); -} - void Effect3DOutline::draw(const Mat4 &transform) { //draw @@ -1059,9 +1042,7 @@ void Effect3DOutline::draw(const Mat4 &transform) auto skin = _sprite->getMesh()->getSkin(); if(_sprite && skin) { - auto function = std::bind(MatrixPalleteCallBack, std::placeholders::_1, std::placeholders::_2, - skin->getMatrixPaletteSize(), (float*)skin->getMatrixPalette()); - _glProgramState->setUniformCallback("u_matrixPalette", function); + _glProgramState->setUniformVec4v("u_matrixPalette", skin->getMatrixPaletteSize(), skin->getMatrixPalette()); } if(_sprite) @@ -1145,7 +1126,6 @@ void Sprite3DEffectTest::addNewSpriteWithCoords(Vec2 p) sprite->addEffect(effect2, -2); effect2->setOutlineWidth(0.02f); effect2->setOutlineColor(Vec3(1,1,0)); - //sprite->setEffect3D(effect); sprite->setScale(6.f); //add to scene @@ -2395,7 +2375,7 @@ Sprite3DCubeMapTest::Sprite3DCubeMapTest() : Sprite3DCubeMapTest::~Sprite3DCubeMapTest() { -#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 @@ -2444,8 +2424,8 @@ void Sprite3DCubeMapTest::addNewSpriteWithCoords(Vec2 p) Texture2D::TexParams tRepeatParams; tRepeatParams.magFilter = GL_LINEAR; tRepeatParams.minFilter = GL_LINEAR; - tRepeatParams.wrapS = GL_MIRRORED_REPEAT; - tRepeatParams.wrapT = GL_MIRRORED_REPEAT; + tRepeatParams.wrapS = GL_CLAMP_TO_EDGE; + tRepeatParams.wrapT = GL_CLAMP_TO_EDGE; _textureCube->setTexParameters(tRepeatParams); // pass the texture sampler to our custom shader @@ -2489,7 +2469,7 @@ void Sprite3DCubeMapTest::addNewSpriteWithCoords(Vec2 p) addChild(_camera); setCameraMask(2); -#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*) { @@ -2505,8 +2485,8 @@ void Sprite3DCubeMapTest::addNewSpriteWithCoords(Vec2 p) Texture2D::TexParams tRepeatParams; tRepeatParams.magFilter = GL_NEAREST; tRepeatParams.minFilter = GL_NEAREST; - tRepeatParams.wrapS = GL_MIRRORED_REPEAT; - tRepeatParams.wrapT = GL_MIRRORED_REPEAT; + tRepeatParams.wrapS = GL_CLAMP_TO_EDGE; + tRepeatParams.wrapT = GL_CLAMP_TO_EDGE; _textureCube->setTexParameters(tRepeatParams); state->setUniformTexture("u_cubeTex", _textureCube); @@ -2530,3 +2510,58 @@ void Sprite3DCubeMapTest::onTouchesMoved(const std::vector& touches, coc _camera->lookAt(Vec3(0.0f, 0.0f, 0.0f), Vec3(0.0f, 1.0f, 0.0f)); } } + +Issue9767::Issue9767() +{ + _shaderType = Issue9767::ShaderType::SHADER_TEX; + + auto s = Director::getInstance()->getWinSize(); + auto sprite = Sprite3D::create("Sprite3DTest/boss1.obj"); + sprite->setScale(3.f); + sprite->setTexture("Sprite3DTest/boss.png"); + addChild( sprite ); + sprite->setPosition(Vec2(s.width/2, s.height/2)); + _sprite = sprite; + + TTFConfig ttfConfig("fonts/arial.ttf", 15); + auto label1 = Label::createWithTTF(ttfConfig,"switch shader"); + auto item1 = MenuItemLabel::create(label1,CC_CALLBACK_1(Issue9767::menuCallback_SwitchShader,this) ); + + item1->setPosition( Vec2(s.width * 0.9f - item1->getContentSize().width * 0.5f, s.height * 0.5f - item1->getContentSize().height ) ); + + auto pMenu1 = CCMenu::create(item1, nullptr); + pMenu1->setPosition(Vec2(0,0)); + addChild(pMenu1); +} + +Issue9767::~Issue9767() +{ + +} + +void Issue9767::menuCallback_SwitchShader(cocos2d::Ref* sender) +{ + GLProgram* glProgram = nullptr; + if (_shaderType == Issue9767::ShaderType::SHADER_TEX) + { + _shaderType = Issue9767::ShaderType::SHADER_COLOR; + glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_3D_POSITION); + } + else + { + _shaderType = Issue9767::ShaderType::SHADER_TEX; + glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_3D_POSITION_TEXTURE); + } + _sprite->setGLProgram(glProgram); +} + +std::string Issue9767::title() const +{ + return "Issue9767: test setGLProgram"; +} + +std::string Issue9767::subtitle() const +{ + return ""; +} + diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h index 5e1602383f..1c9fc123df 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h @@ -92,7 +92,7 @@ protected: float _shining_duraion; cocos2d::GLProgramState * _state; -#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) cocos2d::EventListenerCustom* _backToForegroundListener; #endif }; @@ -128,7 +128,7 @@ private: cocos2d::Sprite3D * _orc; cocos2d::GLProgramState * _state; -#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) cocos2d::EventListenerCustom* _backToForegroundListener; #endif }; @@ -158,7 +158,7 @@ public: protected: cocos2d::GLProgramState * _state; -#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) cocos2d::EventListenerCustom* _backToForegroundListener; #endif @@ -202,7 +202,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) cocos2d::EventListenerCustom* _backToForegroundListener; #endif @@ -527,9 +527,31 @@ protected: cocos2d::Sprite3D* _teapot; cocos2d::Camera *_camera; -#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) cocos2d::EventListenerCustom* _backToForegroundListener; #endif }; +/// issue 9767 setGLProgram +class Issue9767 : public Sprite3DTestDemo +{ + enum class ShaderType + { + SHADER_TEX, + SHADER_COLOR, + }; +public: + CREATE_FUNC(Issue9767); + Issue9767(); + ~Issue9767(); + virtual std::string title() const override; + virtual std::string subtitle() const override; + + void menuCallback_SwitchShader(cocos2d::Ref* sender); + +protected: + ShaderType _shaderType; + cocos2d::Sprite3D* _sprite; +}; + #endif diff --git a/tests/cpp-tests/Classes/SpritePolygonTest/SpritePolygonTest.cpp b/tests/cpp-tests/Classes/SpritePolygonTest/SpritePolygonTest.cpp index ee67a9cac2..d73fdab97d 100644 --- a/tests/cpp-tests/Classes/SpritePolygonTest/SpritePolygonTest.cpp +++ b/tests/cpp-tests/Classes/SpritePolygonTest/SpritePolygonTest.cpp @@ -227,13 +227,14 @@ void SpritePolygonTestDemo::initDefaultSprite(const std::string &filename, cocos positions[1] = Vec2(spSize); positions[2] = Vec2(spSize.width, 0); positions[3] = Vec2(0,0); - debugForNormalSprite->drawPoints(positions, 4, 8, Color4F{0.0,1.0,1.0,1.0}); + debugForNormalSprite->drawPoints(positions, 4, 8, Color4F(0.0,1.0,1.0,1.0)); debugForNormalSprite->drawLine(positions[0], positions[1], Color4F::GREEN); debugForNormalSprite->drawLine(positions[1], positions[2], Color4F::GREEN); debugForNormalSprite->drawLine(positions[2], positions[3], Color4F::GREEN); debugForNormalSprite->drawLine(positions[3], positions[0], Color4F::GREEN); debugForNormalSprite->drawLine(positions[0], positions[2], Color4F::GREEN); debugForNormalSprite->setVisible(false); + delete [] positions; TTFConfig ttfConfig("fonts/arial.ttf", 8); std::string temp = "Sprite:\nPixels drawn: "; diff --git a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp index b9ee1feba0..5ebe990dee 100644 --- a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp +++ b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp @@ -34,6 +34,12 @@ TerrainSimple::TerrainSimple() auto listener = EventListenerTouchAllAtOnce::create(); listener->onTouchesMoved = CC_CALLBACK_2(TerrainSimple::onTouchesMoved, this); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + // add Particle3D for test blend + auto rootps = PUParticleSystem3D::create("Particle3D/scripts/mp_torch.pu"); + rootps->setCameraMask((unsigned short)CameraFlag::USER1); + rootps->startParticleSystem(); + + this->addChild(rootps, 0, 0); } std::string TerrainSimple::title() const @@ -107,6 +113,19 @@ TerrainWalkThru::TerrainWalkThru() _player->setCameraMask(2); _player->setScale(0.08); _player->setPositionY(_terrain->getHeight(_player->getPositionX(),_player->getPositionZ())+PLAYER_HEIGHT); + + // add Particle3D for test blend + auto rootps = PUParticleSystem3D::create("Particle3D/scripts/mp_torch.pu"); + rootps->setCameraMask((unsigned short)CameraFlag::USER1); + rootps->setScale(30.0f); + rootps->startParticleSystem(); + _player->addChild(rootps); + + // add BillBoard for test blend + auto billboard = BillBoard::create("Images/btn-play-normal.png"); + billboard->setPosition3D(Vec3(0,180,0)); + billboard->setCameraMask((unsigned short)CameraFlag::USER1); + _player->addChild(billboard); auto animation = Animation3D::create("Sprite3DTest/girl.c3b","Take 001"); if (animation) diff --git a/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp b/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp index 1bb1908e66..3000f80348 100644 --- a/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp +++ b/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp @@ -81,7 +81,7 @@ Texture2DTests::Texture2DTests() ADD_TEST_CASE(TextureJPEG); ADD_TEST_CASE(TextureTIFF); ADD_TEST_CASE(TextureTGA); -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) ADD_TEST_CASE(TextureWEBP); #endif ADD_TEST_CASE(TexturePixelFormat); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp index 99765e720d..580dddba9a 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -23,7 +23,7 @@ #include "UIWebViewTest/UIWebViewTest.h" #endif #include "UIScale9SpriteTest.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "UIEditBoxTest.h" #endif @@ -35,7 +35,7 @@ GUIDynamicCreateTests::GUIDynamicCreateTests() #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) addTest("WebView Test", [](){ return new (std::nothrow) WebViewTests; }); #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) addTest("EditBox Test", [](){ return new (std::nothrow) UIEditBoxTests; }); #endif addTest("Focus Test", [](){ return new (std::nothrow) UIFocusTests; }); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp index dee4b016ff..4d3bc42d79 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp @@ -41,7 +41,7 @@ bool UIButtonTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIButton/crossplatform_UIButton_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIButton/res.csb"); Node* child = node->getChildByTag(4); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp index 16634e18a5..2b6d1a557c 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp @@ -36,7 +36,7 @@ bool UICheckBoxTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UICheckBox/crossplatform_UICheckBox_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UICheckBox/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp index 4c1d618317..a5a9bce809 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp @@ -13,7 +13,7 @@ bool UIImageViewTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIImageView/crossplatform_UIImageView_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIImageView/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); 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 0f88262e3a..cf48ee6160 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp @@ -34,7 +34,7 @@ bool UILayoutTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/Layout/crossplatform_UILayout_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/Layout/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); @@ -65,7 +65,7 @@ bool UILayoutTest_Color_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/Color/crossplatform_UILayout_Color_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/Color/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); @@ -96,7 +96,7 @@ bool UILayoutTest_Gradient_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/Gradient_Color/crossplatform_Gradient_Color.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/Gradient_Color/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); @@ -127,7 +127,7 @@ bool UILayoutTest_BackGroundImage_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/BackgroundImage/crossplatform_BackgroundImage.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/BackgroundImage/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); @@ -158,7 +158,7 @@ bool UILayoutTest_BackGroundImage_Scale9_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/crossplatform_Scale9_BackgroundImage.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); @@ -196,7 +196,7 @@ bool UILayoutTest_Layout_Linear_Vertical_Editor::init() { if (UIScene_Editor::init()) { - _layout = static_cast(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/windows_ui_linear_vertical_layout.json")); + _layout = static_cast(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/res.json")); _touchGroup->addChild(_layout); @@ -225,7 +225,7 @@ bool UILayoutTest_Layout_Linear_Horizontal_Editor::init() { if (UIScene_Editor::init()) { - _layout = static_cast(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/windows_ui_linear_horizontal_layout.json")); + _layout = static_cast(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/res.json")); _touchGroup->addChild(_layout); this->configureGUIScene(); @@ -253,7 +253,7 @@ bool UILayoutTest_Layout_Relative_Align_Parent_Editor::init() { if (UIScene_Editor::init()) { - _layout = static_cast(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("cocosui/UIEditorTest/UILayout/Relative_Align_Parent/windows_ui_relative_align_parent.json")); + _layout = static_cast(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("cocosui/UIEditorTest/UILayout/Relative_Align_Parent/res.json")); _touchGroup->addChild(_layout); this->configureGUIScene(); @@ -280,7 +280,7 @@ bool UILayoutTest_Layout_Relative_Location_Editor::init() { if (UIScene_Editor::init()) { - _layout = static_cast(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("cocosui/UIEditorTest/UILayout/Relative_Align_Location/windows_ui_relative_align_location.json")); + _layout = static_cast(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("cocosui/UIEditorTest/UILayout/Relative_Align_Location/res.json")); _touchGroup->addChild(_layout); this->configureGUIScene(); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp index b44fdf589b..db674baa1d 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp @@ -26,7 +26,7 @@ bool UIListViewTest_Vertical_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIListView/New/crossplatform_UIListView_Editor_Vertical.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIListView/New/resV.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = dynamic_cast(child); @@ -117,7 +117,7 @@ bool UIListViewTest_Horizontal_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIListView/New/crossplatform_UIListView_Editor_Horizontal.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIListView/New/resH.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = dynamic_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp index 956ce50c73..d7bdd1ac40 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp @@ -39,7 +39,7 @@ bool UILoadingBarTest_Editor::init() { scheduleUpdate(); - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILoadingBar/crossplatform_UILoadingBar_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILoadingBar/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp index dec0c59b5a..ed903376b4 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp @@ -26,7 +26,7 @@ bool UIPageViewTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIPageView/crossplatform_UIPageView_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIPageView/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp index d4dfcd6dba..37c7ba913e 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp @@ -29,7 +29,7 @@ bool UIScrollViewTest_Vertical_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIScrollView/Vertical/crossplatform_UIScrollView_Vertical_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIScrollView/Vertical/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); @@ -60,7 +60,7 @@ bool UIScrollViewTest_Horizontal_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIScrollView/Horizontal/crossplatform_UIScrollView_Horizontal_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIScrollView/Horizontal/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); @@ -91,7 +91,7 @@ bool UIScrollViewTest_Both_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIScrollView/Both/crossplatform_UIScrollView_Both_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIScrollView/Both/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp index 28793e1fa6..ac2ad352b9 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp @@ -35,7 +35,7 @@ bool UISliderTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UISlider/crossplatform_UISlider_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UISlider/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp index accd776781..cb2ccfc9c8 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp @@ -12,7 +12,7 @@ bool UITextAtlasTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILabelAtlas/crossplatform_UILabelAtlas_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILabelAtlas/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp index 3926564b6d..3378c6354e 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp @@ -14,7 +14,7 @@ bool UITextBMFontTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILabelBMFont/crossplatform_UILabelBMFont_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILabelBMFont/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp index 7e6939ceca..8a16460de7 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp @@ -37,7 +37,7 @@ bool UITextFieldTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UITextField/crossplatform_UITextField_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UITextField/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp index 0c6bf27e40..7aa91e7160 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp @@ -14,7 +14,7 @@ bool UITextTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILabel/crossplatform_UILabel_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILabel/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp index cc0110297b..b8b82678e9 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp @@ -41,7 +41,7 @@ bool UIWidgetAddNodeTest_Editor::init() { if (UIScene_Editor::init()) { - Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIWidgetAddNode/crossplatform_UIWidgetAddNode_Editor_1.csb"); + Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIWidgetAddNode/res.csb"); Node* child = node->getChildByTag(5); child->removeFromParent(); _layout = static_cast(child); diff --git a/tests/cpp-tests/Classes/controller.cpp b/tests/cpp-tests/Classes/controller.cpp index 410b7556f7..6381c5b7a1 100644 --- a/tests/cpp-tests/Classes/controller.cpp +++ b/tests/cpp-tests/Classes/controller.cpp @@ -60,6 +60,7 @@ public: addTest("Node: Particles", [](){return new ParticleTests(); }); addTest("Node: Particle3D (PU)", [](){return new Particle3DTests(); }); addTest("Node: Physics", []() { return new PhysicsTests(); }); + addTest( "Node: Physics3D", []() { return new Physics3DTests(); } ); addTest("Node: RenderTexture", [](){return new RenderTextureTests(); }); addTest("Node: Scene", [](){return new SceneTests(); }); addTest("Node: Spine", [](){return new SpineTests(); }); @@ -73,7 +74,7 @@ public: addTest("Node: UI", [](){ return new UITests(); }); addTest("Mouse", []() { return new MouseTests(); }); addTest("MultiTouch", []() { return new MutiTouchTests(); }); - //addTest("Performance tests", []() { return new PerformanceTests(); }); + addTest("Performance tests", []() { return new PerformanceTests(); }); addTest("Renderer", []() { return new NewRendererTests(); }); addTest("ReleasePool", [](){ return new ReleasePoolTests(); }); addTest("Rotate World", [](){return new RotateWorldTests(); }); @@ -395,7 +396,7 @@ void TestController::logEx(const char * format, ...) #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID __android_log_print(ANDROID_LOG_DEBUG, "cocos2d-x debug info", "%s", buff); -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT WCHAR wszBuf[1024] = { 0 }; MultiByteToWideChar(CP_UTF8, 0, buff, -1, wszBuf, sizeof(wszBuf)); OutputDebugStringW(wszBuf); diff --git a/tests/cpp-tests/Classes/tests.h b/tests/cpp-tests/Classes/tests.h index 5727fdf449..a4346b207e 100644 --- a/tests/cpp-tests/Classes/tests.h +++ b/tests/cpp-tests/Classes/tests.h @@ -80,6 +80,7 @@ #include "BillBoardTest/BillBoardTest.h" #include "LightTest/LightTest.h" #include "Particle3DTest/Particle3DTest.h" +#include "Physics3DTest/Physics3DTest.h" #include "OpenURLTest/OpenURLTest.h" #include "AllocatorTest/AllocatorTest.h" diff --git a/tests/cpp-tests/Resources/Images/heightfield64x64.raw b/tests/cpp-tests/Resources/Images/heightfield64x64.raw new file mode 100644 index 0000000000..48db5e35ea Binary files /dev/null and b/tests/cpp-tests/Resources/Images/heightfield64x64.raw differ diff --git a/tests/cpp-tests/Resources/Materials/2d_effects.material b/tests/cpp-tests/Resources/Materials/2d_effects.material new file mode 100644 index 0000000000..234be0af61 --- /dev/null +++ b/tests/cpp-tests/Resources/Materials/2d_effects.material @@ -0,0 +1,57 @@ +material sample +{ + technique blur + { + pass 0 + { + shader + { + defines = THIS_IS_AN_EXAMPLE 1;TOMORROW_IS_HOLIDAY 2 + vertexShader = Shaders/example_simple.vsh + fragmentShader = Shaders/example_Blur.fsh + // Uniforms + blurRadius = 3 + sampleNum = 5 + resolution = 100,100 + } + } + } + technique outline + { + pass 0 + { + shader + { + 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 + } + } + } + technique noise { + pass 0 + { + shader + { + vertexShader = Shaders/example_simple.vsh + fragmentShader = Shaders/example_Noisy.fsh + resolution = 100,100 + } + } + } + technique edge_detect + { + pass 0 + { + shader + { + defines = + vertexShader = Shaders/example_simple.vsh + fragmentShader = Shaders/example_edgeDetection.fsh + resolution = 100, 100 + } + } + } +} diff --git a/tests/cpp-tests/Resources/Materials/3d_effects.material b/tests/cpp-tests/Resources/Materials/3d_effects.material new file mode 100644 index 0000000000..aab208a426 --- /dev/null +++ b/tests/cpp-tests/Resources/Materials/3d_effects.material @@ -0,0 +1,128 @@ +// A "Material" file can contain one or more materials +material spaceship +{ + // A Material contains one or more Techniques + // The first technique is going to be the default one. + // In this case, the default one is "unlit" + // A "Technique" describes how the material is going to be renderer + // Techniques could be: + // - How a Model is going to be renderer in high quality + // - or in low quality + // - or when using lights + // - or when not using lights + // - or to "outline" a model + // etc... + technique normal + { + // A technique can contain one or more passes + // A "Pass" describes the "draws" that will be needed + // in order to achieve the desired technique + // The 3 properties of the Passes are: + // + // renderState: + // resposinble for depth buffer, cullface, stencil, blending, etc. + // shader: + // responsible for the vertex and frag shaders, and its uniforms + // sampler: + // responsible for setting the texture and its parameters + pass 0 + { + shader + { + vertexShader = Shaders3D/3d_position_tex.vert + fragmentShader = Shaders3D/3d_color_tex.frag + } + sampler 0 + { + path = Sprite3DTest/boss.png + } + } + } + + // This is another technique. It "outlines" the model + // It has 3 passes in order to get the desired effect + technique outline + { + // 1st pass: + // creates a yellow outline of only the hull + pass outline + { + renderState + { + cullFace = true + cullFaceSide = BACK + depthTest = false + } + shader + { + vertexShader = Shaders3D/OutLine.vert + fragmentShader = Shaders3D/OutLine.frag + // Uniforms + OutLineColor = 1,1,0 + OutlineWidth = 0.04 + } + sampler 0 + { + path = Sprite3DTest/boss.png + } + } + + // 2nd pass: + // creates a blue outline of the borders + pass outline thick + { + renderState + { + cullFace = true + cullFaceSide = FRONT + depthTest = true + } + shader + { + vertexShader = Shaders3D/OutLine.vert + fragmentShader = Shaders3D/OutLine.frag + // Uniforms + OutLineColor = 0,0,1 + OutlineWidth = 0.02 + } + sampler 0 + { + path = Sprite3DTest/boss.png + } + } + // 3rd pass + // Renders the model "normally" + // When a 'renderState' is not present it will use the default renderState + pass normal + { + shader + { + vertexShader = Shaders3D/3d_position_tex.vert + fragmentShader = Shaders3D/3d_color_tex.frag + } + sampler 0 + { + path = Sprite3DTest/boss.png + } + } + } + // Another technique: + // This one renders the model using the lights avaiable from the Scene + technique lit + { + pass 0 + { + shader + { + // You can pass "compile time" variables to your shader using a 'defines' + defines = MAX_POINT_LIGHT_NUM 1;MAX_SPOT_LIGHT_NUM 1;MAX_DIRECTIONAL_LIGHT_NUM 1 + vertexShader = Shaders3D/3d_position_normal_tex.vert + fragmentShader = Shaders3D/3d_color_normal_tex.frag + } + sampler 0 + { + path = Sprite3DTest/boss.png + } + } + } +} diff --git a/tests/cpp-tests/Resources/Materials/effects.material b/tests/cpp-tests/Resources/Materials/effects.material deleted file mode 100644 index bb5ff81a6f..0000000000 --- a/tests/cpp-tests/Resources/Materials/effects.material +++ /dev/null @@ -1,177 +0,0 @@ -{ - "metadata" : { - "version" : 1, - "type" : "material" - }, - "name" : "simple effects", - "techniques" : [ - { - "name": "blur", - "passes": [ - { - "renderState": { - "blend": "true", - "blendSrc": "ONE", - "blendDst": "ONE_MINUS_SRC_ALPHA" - }, - "shader" : { - "defines": "THIS_IS_AN_EXAMPLE 1;TOMORROW_IS_HOLIDAY 2", - "vertexShader": "Shaders/example_simple.vsh", - "fragmentShader": "Shaders/example_Blur.fsh", - "blurRadius": 10, - "sampleNum": 5, - "resolution": [100,100] - }, - "textures": [ - { - "path": "Images/grossinis_sister1.png", - "wrapS": "CLAMP_TO_EDGE", - "wrapT": "CLAMP_TO_EDGE", - "minFilter": "LINEAR", - "magFilter": "LINEAR", - "mipmap": "false" - } - ] - } - ] - }, - { - "name": "outline", - "passes": [ - { - "renderState": { - "blend": "true", - "blendSrc": "ONE", - "blendDst": "ONE_MINUS_SRC_ALPHA" - }, - "shader" : { - "defines": "", - "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 - }, - "textures": [ - { - "path": "Images/grossinis_sister1.png", - "wrapS": "CLAMP_TO_EDGE", - "wrapT": "CLAMP_TO_EDGE", - "minFilter": "LINEAR", - "magFilter": "LINEAR", - "mipmap": "false" - } - ] - } - ] - }, - { - "name": "noise", - "passes": [ - { - "renderState": { - "blend": "true", - "blendSrc": "ONE", - "blendDst": "ONE_MINUS_SRC_ALPHA" - }, - "shader" : { - "defines": "", - "vertexShader": "Shaders/example_simple.vsh", - "fragmentShader": "Shaders/example_Noisy.fsh", - "resolution": [100,100] - }, - "textures": [ - { - "path": "Images/grossinis_sister1.png", - "wrapS": "CLAMP_TO_EDGE", - "wrapT": "CLAMP_TO_EDGE", - "minFilter": "LINEAR", - "magFilter": "LINEAR", - "mipmap": "false" - } - ] - } - ] - }, - { - "name": "edge detect", - "passes": [ - { - "renderState": { - "blend": "true", - "blendSrc": "ONE", - "blendDst": "ONE_MINUS_SRC_ALPHA" - }, - "shader" : { - "defines": "", - "vertexShader": "Shaders/example_simple.vsh", - "fragmentShader": "Shaders/example_edgeDetection.fsh", - "resolution": [100,100] - }, - "textures": [ - { - "path": "Images/grossinis_sister1.png", - "wrapS": "CLAMP_TO_EDGE", - "wrapT": "CLAMP_TO_EDGE", - "minFilter": "LINEAR", - "magFilter": "LINEAR", - "mipmap": "false" - } - ] - } - ] - }, - { - "name": "gray+blur", - "passes": [ - { - "renderState": { - "blend": "true", - "blendSrc": "ONE", - "blendDst": "ONE_MINUS_SRC_ALPHA" - }, - "shader" : { - "defines": "TEXTURE_REPEAT", - "vertexShader": "Shaders/example_simple.vsh", - "fragmentShader": "Shaders/example_Blur.fsh", - "blurRadius": 10, - "sampleNum": 5, - "resolution": [100,100] - }, - "textures": [ - { - "path": "Images/grossinis_sister1.png", - "wrapS": "CLAMP_TO_EDGE", - "wrapT": "CLAMP_TO_EDGE", - "minFilter": "LINEAR", - "magFilter": "LINEAR", - "mipmap": "false" - } - ] - }, - { - "renderState": { - "blend": "true", - "blendSrc": "ONE_MINUS_SRC_ALPHA", - "blendDst": "ONE_MINUS_SRC_ALPHA" - }, - "shader" : { - "defines": "", - "vertexShader": "Shaders/example_simple.vsh", - "fragmentShader": "Shaders/example_greyScale.fsh" - }, - "textures": [ - { - "path": "Images/grossinis_sister1.png", - "wrapS": "CLAMP_TO_EDGE", - "wrapT": "CLAMP_TO_EDGE", - "minFilter": "LINEAR", - "magFilter": "LINEAR", - "mipmap": "false" - } - ] - } - ] - } - ] -} diff --git a/tests/cpp-tests/Resources/Materials/spaceship.material b/tests/cpp-tests/Resources/Materials/spaceship.material deleted file mode 100644 index 285a1ea5e3..0000000000 --- a/tests/cpp-tests/Resources/Materials/spaceship.material +++ /dev/null @@ -1,37 +0,0 @@ -{ - "metadata" : { - "version" : 1, - "type" : "material" - }, - "name" : "spaceship", - "techniques" : [ - { - "name": "simple", - "passes": [ - { - "renderState": { - "blend": "true", - "blendSrc": "ONE_MINUS_SRC_ALPHA", - "blendDst": "ONE_MINUS_SRC_ALPHA" - }, - "shader" : { - "defines": "", - "vertexShader": "Shaders/example_3D_PositionTex.vsh", - "fragmentShader": "Shaders/example_3D_PositionTex.fsh", - "u_color": [1,1,1,1] - }, - "textures": [ - { - "path": "Sprite3DTest/boss.png", - "wrapS": "CLAMP_TO_EDGE", - "wrapT": "CLAMP_TO_EDGE", - "minFilter": "LINEAR", - "magFilter": "LINEAR", - "mipmap": "false" - } - ] - } - ] - } - ] -} diff --git a/tests/cpp-tests/Resources/Particle3D/scripts/mp_hit_04.pu b/tests/cpp-tests/Resources/Particle3D/scripts/mp_hit_04.pu new file mode 100644 index 0000000000..dbe1f2cc42 --- /dev/null +++ b/tests/cpp-tests/Resources/Particle3D/scripts/mp_hit_04.pu @@ -0,0 +1,56 @@ +system mp_hit_04 +{ + keep_local true + technique + { + visual_particle_quota 10 + material PUMediaPack/Star_05 + renderer Billboard + { + billboard_type oriented_self + billboard_rotation_type vertex + } + emitter Point + { + emission_rate 6 + angle 360 + time_to_live 0.3 + velocity 1e-006 + duration 0.1 + particle_width dyn_random + { + min 60 + max 200 + } + particle_height dyn_random + { + min 100 + max 400 + } + start_colour_range 0.415686 0.678431 1 1 + end_colour_range 0.643137 0.317647 1 1 + force_emission true + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 1 0 0 0 1 + colour_operation multiply + } + affector Scale + { + xyz_scale dyn_random + { + min 800 + max 1000 + } + } + observer OnClear + { + observe_until_event true + handler DoStopSystem + { + } + } + } +} diff --git a/tests/cpp-tests/Resources/Shaders3D/3d_color_normal_tex.frag b/tests/cpp-tests/Resources/Shaders3D/3d_color_normal_tex.frag new file mode 100644 index 0000000000..3ffac456e1 --- /dev/null +++ b/tests/cpp-tests/Resources/Shaders3D/3d_color_normal_tex.frag @@ -0,0 +1,109 @@ +#if (MAX_DIRECTIONAL_LIGHT_NUM > 0) +uniform vec3 u_DirLightSourceColor[MAX_DIRECTIONAL_LIGHT_NUM]; +uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM]; +#endif +#if (MAX_POINT_LIGHT_NUM > 0) +uniform vec3 u_PointLightSourceColor[MAX_POINT_LIGHT_NUM]; +uniform float u_PointLightSourceRangeInverse[MAX_POINT_LIGHT_NUM]; +#endif +#if (MAX_SPOT_LIGHT_NUM > 0) +uniform vec3 u_SpotLightSourceColor[MAX_SPOT_LIGHT_NUM]; +uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM]; +uniform float u_SpotLightSourceInnerAngleCos[MAX_SPOT_LIGHT_NUM]; +uniform float u_SpotLightSourceOuterAngleCos[MAX_SPOT_LIGHT_NUM]; +uniform float u_SpotLightSourceRangeInverse[MAX_SPOT_LIGHT_NUM]; +#endif +uniform vec3 u_AmbientLightSourceColor; + +#ifdef GL_ES +varying mediump vec2 TextureCoordOut; +#if MAX_POINT_LIGHT_NUM +varying mediump vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM]; +#endif +#if MAX_SPOT_LIGHT_NUM +varying mediump vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM]; +#endif +#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0)) +varying mediump vec3 v_normal; +#endif + +#else + +varying vec2 TextureCoordOut; +#if MAX_POINT_LIGHT_NUM +varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM]; +#endif +#if MAX_SPOT_LIGHT_NUM +varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM]; +#endif +#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0)) +varying vec3 v_normal; +#endif + +#endif + +uniform vec4 u_color; + +vec3 computeLighting(vec3 normalVector, vec3 lightDirection, vec3 lightColor, float attenuation) +{ + float diffuse = max(dot(normalVector, lightDirection), 0.0); + vec3 diffuseColor = lightColor * diffuse * attenuation; + + return diffuseColor; +} + +void main(void) +{ +#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0)) + vec3 normal = normalize(v_normal); +#endif + + vec4 combinedColor = vec4(u_AmbientLightSourceColor, 1.0); + + // Directional light contribution +#if (MAX_DIRECTIONAL_LIGHT_NUM > 0) + for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i) + { + vec3 lightDirection = normalize(u_DirLightSourceDirection[i] * 2.0); + combinedColor.xyz += computeLighting(normal, -lightDirection, u_DirLightSourceColor[i], 1.0); + } +#endif + + // Point light contribution +#if (MAX_POINT_LIGHT_NUM > 0) + for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) + { + vec3 ldir = v_vertexToPointLightDirection[i] * u_PointLightSourceRangeInverse[i]; + float attenuation = clamp(1.0 - dot(ldir, ldir), 0.0, 1.0); + combinedColor.xyz += computeLighting(normal, normalize(v_vertexToPointLightDirection[i]), u_PointLightSourceColor[i], attenuation); + } +#endif + + // Spot light contribution +#if (MAX_SPOT_LIGHT_NUM > 0) + for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) + { + // Compute range attenuation + vec3 ldir = v_vertexToSpotLightDirection[i] * u_SpotLightSourceRangeInverse[i]; + float attenuation = clamp(1.0 - dot(ldir, ldir), 0.0, 1.0); + vec3 vertexToSpotLightDirection = normalize(v_vertexToSpotLightDirection[i]); + + vec3 spotLightDirection = normalize(u_SpotLightSourceDirection[i] * 2.0); + + // "-lightDirection" is used because light direction points in opposite direction to spot direction. + float spotCurrentAngleCos = dot(spotLightDirection, -vertexToSpotLightDirection); + + // Apply spot attenuation + attenuation *= smoothstep(u_SpotLightSourceOuterAngleCos[i], u_SpotLightSourceInnerAngleCos[i], spotCurrentAngleCos); + attenuation = clamp(attenuation, 0.0, 1.0); + combinedColor.xyz += computeLighting(normal, vertexToSpotLightDirection, u_SpotLightSourceColor[i], attenuation); + } +#endif + +#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0)) + gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * u_color * combinedColor; +#else + gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * u_color; +#endif + +} diff --git a/tests/cpp-tests/Resources/Shaders3D/3d_color_tex.frag b/tests/cpp-tests/Resources/Shaders3D/3d_color_tex.frag new file mode 100644 index 0000000000..0d87c7e229 --- /dev/null +++ b/tests/cpp-tests/Resources/Shaders3D/3d_color_tex.frag @@ -0,0 +1,12 @@ +#ifdef GL_ES +varying mediump vec2 TextureCoordOut; +#else +varying vec2 TextureCoordOut; +#endif +uniform vec4 u_color; + +void main(void) +{ + gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * u_color; +} + diff --git a/tests/cpp-tests/Resources/Shaders3D/3d_position_normal_tex.vert b/tests/cpp-tests/Resources/Shaders3D/3d_position_normal_tex.vert new file mode 100644 index 0000000000..ce6aa82a48 --- /dev/null +++ b/tests/cpp-tests/Resources/Shaders3D/3d_position_normal_tex.vert @@ -0,0 +1,48 @@ +#if (MAX_POINT_LIGHT_NUM > 0) +uniform vec3 u_PointLightSourcePosition[MAX_POINT_LIGHT_NUM]; +#endif +#if (MAX_SPOT_LIGHT_NUM > 0) +uniform vec3 u_SpotLightSourcePosition[MAX_SPOT_LIGHT_NUM]; +#endif + +attribute vec4 a_position; +attribute vec2 a_texCoord; +attribute vec3 a_normal; +varying vec2 TextureCoordOut; + +#if MAX_POINT_LIGHT_NUM +varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM]; +#endif +#if MAX_SPOT_LIGHT_NUM +varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM]; +#endif +#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0)) +varying vec3 v_normal; +#endif + +void main(void) +{ + vec4 ePosition = CC_MVMatrix * a_position; +#if (MAX_POINT_LIGHT_NUM > 0) + for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) + { + v_vertexToPointLightDirection[i] = u_PointLightSourcePosition[i].xyz - ePosition.xyz; + } +#endif + +#if (MAX_SPOT_LIGHT_NUM > 0) + for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) + { + v_vertexToSpotLightDirection[i] = u_SpotLightSourcePosition[i] - ePosition.xyz; + } +#endif + +#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0)) + v_normal = CC_NormalMatrix * a_normal; +#endif + + TextureCoordOut = a_texCoord; + TextureCoordOut.y = 1.0 - TextureCoordOut.y; + gl_Position = CC_PMatrix * ePosition; +} + diff --git a/tests/cpp-tests/Resources/Shaders3D/3d_position_skin_tex.vert b/tests/cpp-tests/Resources/Shaders3D/3d_position_skin_tex.vert new file mode 100644 index 0000000000..fa72d3377d --- /dev/null +++ b/tests/cpp-tests/Resources/Shaders3D/3d_position_skin_tex.vert @@ -0,0 +1,69 @@ +attribute vec3 a_position; + +attribute vec4 a_blendWeight; +attribute vec4 a_blendIndex; + +attribute vec2 a_texCoord; + +const int SKINNING_JOINT_COUNT = 60; +// Uniforms +uniform vec4 u_matrixPalette[SKINNING_JOINT_COUNT * 3]; + +// Varyings +varying vec2 TextureCoordOut; + +vec4 getPosition() +{ + float blendWeight = a_blendWeight[0]; + + int matrixIndex = int (a_blendIndex[0]) * 3; + vec4 matrixPalette1 = u_matrixPalette[matrixIndex] * blendWeight; + vec4 matrixPalette2 = u_matrixPalette[matrixIndex + 1] * blendWeight; + vec4 matrixPalette3 = u_matrixPalette[matrixIndex + 2] * blendWeight; + + + blendWeight = a_blendWeight[1]; + if (blendWeight > 0.0) + { + matrixIndex = int(a_blendIndex[1]) * 3; + matrixPalette1 += u_matrixPalette[matrixIndex] * blendWeight; + matrixPalette2 += u_matrixPalette[matrixIndex + 1] * blendWeight; + matrixPalette3 += u_matrixPalette[matrixIndex + 2] * blendWeight; + + blendWeight = a_blendWeight[2]; + if (blendWeight > 0.0) + { + matrixIndex = int(a_blendIndex[2]) * 3; + matrixPalette1 += u_matrixPalette[matrixIndex] * blendWeight; + matrixPalette2 += u_matrixPalette[matrixIndex + 1] * blendWeight; + matrixPalette3 += u_matrixPalette[matrixIndex + 2] * blendWeight; + + blendWeight = a_blendWeight[3]; + if (blendWeight > 0.0) + { + matrixIndex = int(a_blendIndex[3]) * 3; + matrixPalette1 += u_matrixPalette[matrixIndex] * blendWeight; + matrixPalette2 += u_matrixPalette[matrixIndex + 1] * blendWeight; + matrixPalette3 += u_matrixPalette[matrixIndex + 2] * blendWeight; + } + } + } + + vec4 _skinnedPosition; + vec4 postion = vec4(a_position, 1.0); + _skinnedPosition.x = dot(postion, matrixPalette1); + _skinnedPosition.y = dot(postion, matrixPalette2); + _skinnedPosition.z = dot(postion, matrixPalette3); + _skinnedPosition.w = postion.w; + + return _skinnedPosition; +} + +void main() +{ + vec4 position = getPosition(); + gl_Position = CC_MVPMatrix * position; + + TextureCoordOut = a_texCoord; + TextureCoordOut.y = 1.0 - TextureCoordOut.y; +} diff --git a/tests/cpp-tests/Resources/Shaders3D/3d_position_tex.vert b/tests/cpp-tests/Resources/Shaders3D/3d_position_tex.vert new file mode 100644 index 0000000000..7180be8fa8 --- /dev/null +++ b/tests/cpp-tests/Resources/Shaders3D/3d_position_tex.vert @@ -0,0 +1,11 @@ +attribute vec4 a_position; +attribute vec2 a_texCoord; + +varying vec2 TextureCoordOut; + +void main(void) +{ + gl_Position = CC_MVPMatrix * a_position; + TextureCoordOut = a_texCoord; + TextureCoordOut.y = 1.0 - TextureCoordOut.y; +} diff --git a/tests/cpp-tests/Resources/Sprite3DTest/box.c3t b/tests/cpp-tests/Resources/Sprite3DTest/box.c3t new file mode 100644 index 0000000000..876194acca --- /dev/null +++ b/tests/cpp-tests/Resources/Sprite3DTest/box.c3t @@ -0,0 +1,94 @@ +{ + "version": "0.6", + "id": "", + "meshes": [ + { + "attributes": [{ + "size": 3, + "type": "GL_FLOAT", + "attribute": "VERTEX_ATTRIB_POSITION" + }, { + "size": 3, + "type": "GL_FLOAT", + "attribute": "VERTEX_ATTRIB_NORMAL" + }, { + "size": 2, + "type": "GL_FLOAT", + "attribute": "VERTEX_ATTRIB_TEX_COORD" + }], + "vertices": [ + 0.500000, -0.500000, -0.500000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, + -0.500000, -0.500000, -0.500000, 0.000000, 0.000000, -1.000000, 1.000000, 0.000000, + 0.500000, 0.500000, -0.500000, 0.000000, 0.000000, -1.000000, 0.000000, 1.000000, + -0.500000, 0.500000, -0.500000, 0.000000, 0.000000, -1.000000, 1.000000, 1.000000, + 0.500000, 0.500000, 0.500000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000, + -0.500000, 0.500000, 0.500000, 0.000000, 0.000000, 1.000000, 0.000000, 1.000000, + -0.500000, -0.500000, 0.500000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, + 0.500000, -0.500000, 0.500000, 0.000000, 0.000000, 1.000000, 1.000000, 0.000000, + 0.500000, -0.500000, 0.500000, 0.000000, -1.000000, 0.000000, 1.000000, 1.000000, + -0.500000, -0.500000, 0.500000, 0.000000, -1.000000, 0.000000, 0.000000, 1.000000, + -0.500000, -0.500000, -0.500000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, + 0.500000, -0.500000, -0.500000, 0.000000, -1.000000, 0.000000, 1.000000, 0.000000, + 0.500000, 0.500000, 0.500000, 1.000000, 0.000000, 0.000000, 1.000000, 1.000000, + 0.500000, -0.500000, 0.500000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, + 0.500000, -0.500000, -0.500000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.500000, 0.500000, -0.500000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, + -0.500000, 0.500000, 0.500000, 0.000000, 1.000000, 0.000000, 1.000000, 1.000000, + 0.500000, 0.500000, 0.500000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, + 0.500000, 0.500000, -0.500000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, + -0.500000, 0.500000, -0.500000, 0.000000, 1.000000, 0.000000, 1.000000, 0.000000, + -0.500000, -0.500000, 0.500000, -1.000000, 0.000000, 0.000000, 1.000000, 1.000000, + -0.500000, 0.500000, 0.500000, -1.000000, 0.000000, 0.000000, 0.000000, 1.000000, + -0.500000, 0.500000, -0.500000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, + -0.500000, -0.500000, -0.500000, -1.000000, 0.000000, 0.000000, 1.000000, 0.000000 + ], + "parts": [ + { + "id": "shape1_part1", + "type": "TRIANGLES", + "indices": [ + 0, 1, 2, 1, 3, 2, 4, 5, 6, 4, 6, 7, + 8, 9, 10, 8, 10, 11, 12, 13, 14, 12, 14, 15, + 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23 + ], + "aabb": [-0.500000, -0.500000, -0.500000, 0.500000, 0.500000, 0.500000] + } + ] + } + ], + "materials": [ + { + "id": "01 - Default", + "ambient": [ 0.588235, 0.588235, 0.588235], + "diffuse": [ 0.588235, 0.588235, 0.588235], + "emissive": [ 0.000000, 0.000000, 0.000000], + "opacity": 1.000000, + "specular": [ 0.900000, 0.900000, 0.900000], + "shininess": 2.000000, + "textures": [ + { + "id": "Map #1", + "filename": "", + "type": "DIFFUSE", + "wrapModeU": "REPEAT", + "wrapModeV": "REPEAT" + } + ] + } + ], + "nodes": [ + { + "id": "Box001", + "skeleton": false, + "transform": [ 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000], + "parts": [ + { + "meshpartid": "shape1_part1", + "materialid": "01 - Default", + "uvMapping": [[ 0]] + } + ] + } + ], + "animations": [] +} \ No newline at end of file diff --git a/tests/cpp-tests/Resources/TerrainTest/heightMap129.jpg b/tests/cpp-tests/Resources/TerrainTest/heightmap129.jpg similarity index 100% rename from tests/cpp-tests/Resources/TerrainTest/heightMap129.jpg rename to tests/cpp-tests/Resources/TerrainTest/heightmap129.jpg diff --git a/tests/cpp-tests/Resources/ccs-res b/tests/cpp-tests/Resources/ccs-res index afa5ba56b3..0f5e0dff1a 160000 --- a/tests/cpp-tests/Resources/ccs-res +++ b/tests/cpp-tests/Resources/ccs-res @@ -1 +1 @@ -Subproject commit afa5ba56b3745b0fb94e730ea54a79e598c31ba8 +Subproject commit 0f5e0dff1a7545eef7bbe8f23d4b232d0d2d6ae3 diff --git a/tests/cpp-tests/proj.android/jni/Android.mk b/tests/cpp-tests/proj.android/jni/Android.mk index 3fd8420ebb..b0d1ab7f81 100644 --- a/tests/cpp-tests/proj.android/jni/Android.mk +++ b/tests/cpp-tests/proj.android/jni/Android.mk @@ -116,6 +116,7 @@ LOCAL_SRC_FILES := main.cpp \ ../../Classes/PerformanceTest/PerformanceTextureTest.cpp \ ../../Classes/PerformanceTest/PerformanceTouchesTest.cpp \ ../../Classes/PhysicsTest/PhysicsTest.cpp \ +../../Classes/Physics3DTest/Physics3DTest.cpp \ ../../Classes/ReleasePoolTest/ReleasePoolTest.cpp \ ../../Classes/RenderTextureTest/RenderTextureTest.cpp \ ../../Classes/RotateWorldTest/RotateWorldTest.cpp \ diff --git a/tests/cpp-tests/proj.android/jni/Application.mk b/tests/cpp-tests/proj.android/jni/Application.mk index f80e3bad04..85aaa1e860 100644 --- a/tests/cpp-tests/proj.android/jni/Application.mk +++ b/tests/cpp-tests/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 ifeq ($(NDK_DEBUG),1) diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index 916f27da6b..7ca5325f06 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -20,20 +20,18 @@ Application Unicode true - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp Application Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp @@ -50,7 +48,7 @@ - <_ProjectFileVersion>10.0.40219.1 + <_ProjectFileVersion>12.0.21005.1 $(SolutionDir)$(Configuration).win32\cpp-tests\ $(Configuration).win32\ true @@ -74,7 +72,7 @@ Disabled ..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\network;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\win32\include;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;COCOS2DXWIN32_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;COCOS2DXWIN32_EXPORTS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -113,7 +111,7 @@ xcopy "$(OutDir)..\*.dll" "$(OutDir)" /D /Y MaxSpeed true ..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\network;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\win32\include;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 @@ -199,6 +197,7 @@ xcopy "$(OutDir)..\*.dll" "$(OutDir)" /D /Y + @@ -402,6 +401,7 @@ xcopy "$(OutDir)..\*.dll" "$(OutDir)" /D /Y + diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters index 88b046a07b..a16708a0d2 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters @@ -352,6 +352,9 @@ {eed1887a-757e-4625-b21c-bbfcfaa5200f} + + {31d7c504-94c7-43ab-818d-996f957a3741} + {3f5069e6-78e5-4388-b614-04c0ea943b4c} @@ -936,6 +939,9 @@ Classes\PerformanceTest + + Classes\Physics3DTest + Classes\SpritePolygonTest @@ -1715,6 +1721,9 @@ Classes\PerformanceTest + + Classes\Physics3DTest + Classes\SpritePolygonTest diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.cpp b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.cpp index f4365b88c5..a4069f4b56 100644 --- a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.cpp +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.cpp @@ -1,21 +1,128 @@ #include "App.xaml.h" #include "OpenGLESPage.xaml.h" +using namespace Platform; +using namespace Windows::ApplicationModel; +using namespace Windows::ApplicationModel::Activation; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; +using namespace Windows::UI::Xaml::Media::Animation; +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::Interop; +using namespace Windows::UI::Xaml::Media; +using namespace Windows::UI::Xaml::Navigation; using namespace cocos2d; App::App() { InitializeComponent(); + Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending); } -void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +/// +/// Invoked when the application is launched normally by the end user. Other entry points +/// will be used when the application is launched to open a specific file, to display +/// search results, and so forth. +/// +/// Details about the launch request and process. +void App::OnLaunched(LaunchActivatedEventArgs^ e) { - if (mPage == nullptr) + auto rootFrame = dynamic_cast(Window::Current->Content); + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active. + if (rootFrame == nullptr) { - mPage = ref new OpenGLESPage(&mOpenGLES); + // Create a Frame to act as the navigation context and associate it with + // a SuspensionManager key + rootFrame = ref new Frame(); + + // TODO: Change this value to a cache size that is appropriate for your application. + rootFrame->CacheSize = 1; + + if (e->PreviousExecutionState == ApplicationExecutionState::Terminated) + { + // TODO: Restore the saved session state only when appropriate, scheduling the + // final launch steps after the restore is complete. + } + + // Place the frame in the current Window + Window::Current->Content = rootFrame; } - // 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(); + if (rootFrame->Content == nullptr) + { +#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP + // Removes the turnstile navigation for startup. + if (rootFrame->ContentTransitions != nullptr) + { + _transitions = ref new TransitionCollection(); + for (auto transition : rootFrame->ContentTransitions) + { + _transitions->Append(transition); + } + } + + rootFrame->ContentTransitions = nullptr; + _firstNavigatedToken = rootFrame->Navigated += ref new NavigatedEventHandler(this, &App::RootFrame_FirstNavigated); +#endif + + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter. + + rootFrame->Content = mPage = ref new OpenGLESPage(&mOpenGLES); + +#if 0 + if (!rootFrame->Navigate(OpenGLESPage::typeid, e->Arguments)) + { + throw ref new FailureException("Failed to create initial page"); + } +#endif + } + + // Ensure the current window is active + Window::Current->Activate(); +} + +#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP +/// +/// Restores the content transitions after the app has launched. +/// +void App::RootFrame_FirstNavigated(Object^ sender, NavigationEventArgs^ e) +{ + auto rootFrame = safe_cast(sender); + + TransitionCollection^ newTransitions; + if (_transitions == nullptr) + { + newTransitions = ref new TransitionCollection(); + newTransitions->Append(ref new NavigationThemeTransition()); + } + else + { + newTransitions = _transitions; + } + + rootFrame->ContentTransitions = newTransitions; + + rootFrame->Navigated -= _firstNavigatedToken; +} +#endif + +/// +/// Invoked when application execution is being suspended. Application state is saved +/// without knowing whether the application will be terminated or resumed with the contents +/// of memory still intact. +/// +void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e) +{ + (void) sender; // Unused parameter + (void) e; // Unused parameter + + // TODO: Save application state and stop any background activity } diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.h b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.h index 1309c610d7..e438eee247 100644 --- a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.h +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.h @@ -13,6 +13,16 @@ namespace cocos2d virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; private: + +#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP + Windows::UI::Xaml::Media::Animation::TransitionCollection^ _transitions; + Windows::Foundation::EventRegistrationToken _firstNavigatedToken; + + void RootFrame_FirstNavigated(Platform::Object^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs^ e); +#endif + + void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e); + OpenGLESPage^ mPage; OpenGLES mOpenGLES; }; 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 9276d659de..14006413a7 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 @@ -133,6 +133,7 @@ + @@ -397,6 +398,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 7fabd113f1..ffb4e449e8 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 @@ -784,6 +784,9 @@ Classes\MaterialSystemTest + + Classes\Physics3DTest +
@@ -1695,6 +1698,9 @@ {9113774a-5e49-433b-b851-11533bc178ec} + + {dbeed6f6-158b-4f99-8196-61616f724ae1} + @@ -1734,5 +1740,8 @@ Classes\MaterialSystemTest + + Classes\Physics3DTest + \ No newline at end of file diff --git a/tests/js-tests/.cocos-project.json b/tests/js-tests/.cocos-project.json index 160336f500..bd34889d3f 100644 --- a/tests/js-tests/.cocos-project.json +++ b/tests/js-tests/.cocos-project.json @@ -3,7 +3,7 @@ "has_native": true, "win32_cfg": { "project_path": "../../build", - "sln_file": "cocos2d-js-win32.vc2012.sln", + "sln_file": "cocos2d-js-win32.vc2013.sln", "project_name": "js-tests", "build_cfg_path": "project/proj.win32" }, diff --git a/tests/js-tests/project.json b/tests/js-tests/project.json index 3659dcb298..e081ed9bdc 100644 --- a/tests/js-tests/project.json +++ b/tests/js-tests/project.json @@ -181,6 +181,8 @@ "src/ChipmunkTest/ChipmunkTest.js", "src/Presentation/Presentation.js", - "src/ReflectionTest/ReflectionTest.js" + "src/ReflectionTest/ReflectionTest.js", + + "src/SpritePolygonTest/SpritePolygonTest.js" ] } diff --git a/tests/js-tests/project/Classes/AppDelegate.cpp b/tests/js-tests/project/Classes/AppDelegate.cpp index 053a51c7ee..edbcae902c 100644 --- a/tests/js-tests/project/Classes/AppDelegate.cpp +++ b/tests/js-tests/project/Classes/AppDelegate.cpp @@ -9,6 +9,8 @@ #include "jsb_cocos2dx_spine_auto.hpp" #include "jsb_cocos2dx_3d_auto.hpp" #include "jsb_cocos2dx_3d_extension_auto.hpp" +#include "jsb_cocos2dx_experimental.hpp" +#include "experimental/jsb_cocos2dx_experimental_manual.h" #include "3d/jsb_cocos2dx_3d_manual.h" #include "extension/jsb_cocos2dx_extension_manual.h" #include "cocostudio/jsb_cocos2dx_studio_manual.h" @@ -105,6 +107,9 @@ bool AppDelegate::applicationDidFinishLaunching() sc->addRegisterCallback(register_all_cocos2dx_3d_extension); + sc->addRegisterCallback(register_all_cocos2dx_experimental); + sc->addRegisterCallback(register_all_cocos2dx_experimental_manual); + #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) diff --git a/tests/js-tests/project/proj.win32/js-tests.vcxproj b/tests/js-tests/project/proj.win32/js-tests.vcxproj index be04f817de..6ef006f1fa 100644 --- a/tests/js-tests/project/proj.win32/js-tests.vcxproj +++ b/tests/js-tests/project/proj.win32/js-tests.vcxproj @@ -18,20 +18,18 @@ Application Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp Application Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp @@ -48,7 +46,7 @@ - <_ProjectFileVersion>10.0.40219.1 + <_ProjectFileVersion>12.0.21005.1 $(SolutionDir)$(Configuration).win32\js-tests\ $(Configuration).win32\ false @@ -102,7 +100,7 @@ if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\spidermonkey\prebuilt\win32\debug-build\*.*" "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\websockets\prebuilt\win32\*.*" "$(OutDir)" @@ -163,7 +161,7 @@ copy "$(ProjectDir)..\..\project.json" "$(OutDir)" if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\spidermonkey\prebuilt\win32\release-build\*.*" "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\websockets\prebuilt\win32\*.*" "$(OutDir)" diff --git a/tests/js-tests/src/SpritePolygonTest/SpritePolygonTest.js b/tests/js-tests/src/SpritePolygonTest/SpritePolygonTest.js new file mode 100644 index 0000000000..611019eacb --- /dev/null +++ b/tests/js-tests/src/SpritePolygonTest/SpritePolygonTest.js @@ -0,0 +1,316 @@ +/**************************************************************************** + Copyright (c) 2008-2010 Ricardo Quesada + Copyright (c) 2011-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. + ****************************************************************************/ +var SpritePolygonTestIdx = -1; + +var SpritePolygonTestDemo = BaseTestLayer.extend({ + _title:"", + _subtitle:"", + _debugDraw:null, + + ctor:function () { + this._super(); + }, + + initDefaultSprite:function(filename, inst){ + cc.director.setClearColor(cc.color(102/255, 184/255, 204/255, 255/255)); + this.addChild(inst); + + var s = cc.director.getWinSize(); + inst.setPosition(s.width/2 + 0.15*s.width, s.height/2); + + var sp = new cc.Sprite(filename); + this.addChild(sp); + sp.setPosition(s.width/2 - 0.15*s.width, s.height/2); + + this._debugDraw = new cc.DrawNode(); + sp.addChild(this._debugDraw); + + var self = this; + cc.eventManager.addListener({ + event:cc.EventListener.TOUCH_ONE_BY_ONE, + onTouchBegan:function(){ + inst.showDebug(true); + self._debugDraw.setVisible(true); + return true; + }, + onTouchEnded:function(){ + inst.showDebug(false); + self._debugDraw.setVisible(false); + } + }, this); + + var positions = new Array(4); + var spSize = sp.getContentSize(); + positions[0] = cc.p(0, spSize.height); + positions[1] = cc.p(spSize.width, spSize.height); + positions[2] = cc.p(spSize.width, 0); + positions[3] = cc.p(0, 0); + + this._debugDraw.drawSegment(positions[0], positions[1], 1, cc.color.GREEN); + this._debugDraw.drawSegment(positions[1], positions[2], 1, cc.color.GREEN); + this._debugDraw.drawSegment(positions[2], positions[3], 1, cc.color.GREEN); + this._debugDraw.drawSegment(positions[3], positions[0], 1, cc.color.GREEN); + this._debugDraw.drawSegment(positions[0], positions[2], 1, cc.color.GREEN); + + this._debugDraw.setVisible(false); + + var label1 = new cc.LabelTTF("Sprite:\nPixels drawn:"+spSize.width*spSize.height, "fonts/arial.ttf", 10); + sp.addChild(label1); + label1.setAnchorPoint(cc.p(0, 1)); + + var label2 = new cc.LabelTTF("SpritePolygon:\nPixels drawn:"+(inst.getArea()+inst.getVertCount()), "fonts/arial.ttf", 10); + inst.addChild(label2); + label2.setAnchorPoint(cc.p(0, 1)); + + }, + + onRestartCallback:function (sender) { + var s = new SpritePolygonTestScene(); + s.addChild(restartSpritePolygonTest()); + director.runScene(s); + }, + + onNextCallback:function (sender) { + var s = new SpritePolygonTestScene(); + s.addChild(nextSpritePolygonTest()); + director.runScene(s); + }, + + onBackCallback:function (sender) { + var s = new SpritePolygonTestScene(); + s.addChild(previousSpritePolygonTest()); + director.runScene(s); + } +}); + +var SpritePolygonTestScene = 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, 99); + }, + onMainMenuCallback:function () { + var scene = new cc.Scene(); + var layer = new TestController(); + scene.addChild(layer); + director.runScene(scene); + }, + runThisTest:function (num) { + SpritePolygonTestIdx = (num || num == 0) ? (num - 1) : -1; + var layer = nextSpritePolygonTest(); + this.addChild(layer); + + director.runScene(this); + } +}); + +var SpritePolygonTest1 = SpritePolygonTestDemo.extend({ + _title:"SpritePolygon Creation", + _subtitle:"SpritePolygon::create(\"Images/grossini.png\")", + + ctor:function(){ + this._super(); + + var s = ccexp.SpritePolygon.create(s_pathGrossini); + this.initDefaultSprite(s_pathGrossini, s); + } +}); + +var SpritePolygonTest2 = SpritePolygonTestDemo.extend({ + _title:"SpritePolygon Creation", + _subtitle:"SpritePolygon::create(\"Images/grossini.png\", verts)", + + ctor:function(){ + this._super(); + + var verts = []; + verts.push(cc.p(36.5, 242.0-128.5)); + verts.push(cc.p(27.5, 242.0-133.5)); + verts.push(cc.p(24.5, 242.0-145.5)); + verts.push(cc.p(26.5, 242.0-161.5)); + verts.push(cc.p(33.5, 242.0-168.5)); + verts.push(cc.p(27.5, 242.0-168.5)); + verts.push(cc.p(16.5, 242.0-179.5)); + verts.push(cc.p(30.5, 242.0-197.5)); + verts.push(cc.p(28.5, 242.0-237.5)); + verts.push(cc.p(56.5, 242.0-237.5)); + verts.push(cc.p(54.5, 242.0-197.5)); + verts.push(cc.p(68.5, 242.0-184.5)); + verts.push(cc.p(57.5, 242.0-168.5)); + verts.push(cc.p(51.5, 242.0-168.5)); + verts.push(cc.p(60.5, 242.0-154.5)); + verts.push(cc.p(57.5, 242.0-133.5)); + verts.push(cc.p(48.5, 242.0-127.5)); + verts.push(cc.p(36.5, 242.0-127.5)); + + cc.SpritePolygonCache.getInstance().removeAllSpritePolygonCache(); + var s = ccexp.SpritePolygon.create(s_pathGrossini, verts); + this.initDefaultSprite(s_pathGrossini, s); + } +}); + +var SpritePolygonTest3 = SpritePolygonTestDemo.extend({ + _title:"SpritePolygon Creation", + _subtitle:"SpritePolygon::create(\"Images/grossini.png\", verts, indices)", + + ctor:function(){ + this._super(); + + var verts = []; + verts.push(cc.p(33.500000, 73.500000)); + verts.push(cc.p(27.500000, 73.500000)); + verts.push(cc.p(16.500000, 62.500000)); + verts.push(cc.p(30.500000, 44.500000)); + verts.push(cc.p(54.500000, 44.500000)); + verts.push(cc.p(51.500000, 73.500000)); + verts.push(cc.p(60.500000, 87.500000)); + verts.push(cc.p(26.500000, 80.500000)); + verts.push(cc.p(24.500000, 96.500000)); + verts.push(cc.p(57.500000, 108.500000)); + verts.push(cc.p(36.500000, 113.500000)); + verts.push(cc.p(48.500000, 114.500000)); + verts.push(cc.p(36.500000, 114.500000)); + verts.push(cc.p(27.500000, 108.500000)); + verts.push(cc.p(68.500000, 57.500000)); + verts.push(cc.p(57.500000, 73.500000)); + verts.push(cc.p(56.500000, 4.500000)); + verts.push(cc.p(28.500000, 4.500000)); + + var indices = [0, 1, 2, 3, 0, 2, 4, 0, 3, 5, 0, 4, 5, 6, 0, 0, 6, 7, 8, 7, 6, 6, 9, 8, 9, 10, 8, 9, 11, 10, 11, 12, 10, 8, 10, 13, 14, 5, 4, 15, 5, 14, 4, 3, 16, 3, 17, 16]; + + cc.SpritePolygonCache.getInstance().removeAllSpritePolygonCache(); + var s = ccexp.SpritePolygon.create(s_pathGrossini, verts, indices); + this.initDefaultSprite(s_pathGrossini, s); + } +}); + +var SpritePolygonTest4 = SpritePolygonTestDemo.extend({ + _title:"SpritePolygon Creation", + _subtitle: "SpritePolygon::create(\"Images/grossini.png\", \n\tvector v, vector indices)", + + ctor:function(){ + this._super(); + + var vec3 = []; + vec3.push(cc.math.vec3(33.500000, 73.500000,0)); + vec3.push(cc.math.vec3(27.500000, 73.500000,0)); + vec3.push(cc.math.vec3(16.500000, 62.500000,0)); + vec3.push(cc.math.vec3(30.500000, 44.500000,0)); + vec3.push(cc.math.vec3(54.500000, 44.500000,0)); + vec3.push(cc.math.vec3(51.500000, 73.500000,0)); + vec3.push(cc.math.vec3(60.500000, 87.500000,0)); + vec3.push(cc.math.vec3(26.500000, 80.500000,0)); + vec3.push(cc.math.vec3(24.500000, 96.500000,0)); + vec3.push(cc.math.vec3(57.500000, 108.500000,0)); + vec3.push(cc.math.vec3(36.500000, 113.500000,0)); + vec3.push(cc.math.vec3(48.500000, 114.500000,0)); + vec3.push(cc.math.vec3(36.500000, 114.500000,0)); + vec3.push(cc.math.vec3(27.500000, 108.500000,0)); + vec3.push(cc.math.vec3(68.500000, 57.500000,0)); + vec3.push(cc.math.vec3(57.500000, 73.500000,0)); + vec3.push(cc.math.vec3(56.500000, 4.500000,0)); + vec3.push(cc.math.vec3(28.500000, 4.50000, 0)); + + var t2f = []; + t2f.push(cc.p(0.394118, 0.392562)); + t2f.push(cc.p(0.323529, 0.392562)); + t2f.push(cc.p(0.194118, 0.483471)); + t2f.push(cc.p(0.358824, 0.632231)); + t2f.push(cc.p(0.641176, 0.632231)); + t2f.push(cc.p(0.605882, 0.392562)); + t2f.push(cc.p(0.711765, 0.276859)); + t2f.push(cc.p(0.311765, 0.334711)); + t2f.push(cc.p(0.288235, 0.202479)); + t2f.push(cc.p(0.676471, 0.103306)); + t2f.push(cc.p(0.429412, 0.061983)); + t2f.push(cc.p(0.570588, 0.053719)); + t2f.push(cc.p(0.429412, 0.053719)); + t2f.push(cc.p(0.323529, 0.103306)); + t2f.push(cc.p(0.805882, 0.524793)); + t2f.push(cc.p(0.676471, 0.392562)); + t2f.push(cc.p(0.664706, 0.962810)); + t2f.push(cc.p(0.335294, 0.962810)); + + var verts = []; + for(var i = 0; i < 18; ++i) + { + var t = { + v3f:vec3[i], + c4b:cc.color.WHITE, + t2f:t2f[i] + }; + verts.push(t); + } + var indices = [0, 1, 2, 3, 0, 2, 4, 0, 3, 5, 0, 4, 5, 6, 0, 0, 6, 7, 8, 7, 6, 6, 9, 8, 9, 10, 8, 9, 11, 10, 11, 12, 10, 8, 10, 13, 14, 5, 4, 15, 5, 14, 4, 3, 16, 3, 17, 16]; + + cc.SpritePolygonCache.getInstance().removeAllSpritePolygonCache(); + var s = ccexp.SpritePolygon.create(s_pathGrossini, verts, indices); + this.initDefaultSprite(s_pathGrossini, s); + } + +}) +// +// Flow control +// +var arrayOfSpritePolygonTest = [ + SpritePolygonTest1, + SpritePolygonTest2, + SpritePolygonTest3, + SpritePolygonTest4 +]; + +var nextSpritePolygonTest = function () { + SpritePolygonTestIdx++; + SpritePolygonTestIdx = SpritePolygonTestIdx % arrayOfSpritePolygonTest.length; + + if(window.sideIndexBar){ + SpritePolygonTestIdx = window.sideIndexBar.changeTest(SpritePolygonTestIdx, 36); + } + + return new arrayOfSpritePolygonTest[SpritePolygonTestIdx ](); +}; +var previousSpritePolygonTest = function () { + SpritePolygonTestIdx--; + if (SpritePolygonTestIdx < 0) + SpritePolygonTestIdx += arrayOfSpritePolygonTest.length; + + if(window.sideIndexBar){ + SpritePolygonTestIdx = window.sideIndexBar.changeTest(SpritePolygonTestIdx, 36); + } + + return new arrayOfSpritePolygonTest[SpritePolygonTestIdx ](); +}; +var restartSpritePolygonTest = function () { + return new arrayOfSpritePolygonTest[SpritePolygonTestIdx ](); +}; diff --git a/tests/js-tests/src/SysTest/SysTest.js b/tests/js-tests/src/SysTest/SysTest.js index bfa114b764..2406db697d 100644 --- a/tests/js-tests/src/SysTest/SysTest.js +++ b/tests/js-tests/src/SysTest/SysTest.js @@ -77,19 +77,37 @@ var LocalStorageTest = SysTestBase.extend({ var key = 'key_' + Math.random(); var ls = cc.sys.localStorage; - cc.log(1); + cc.log("- Adding items"); ls.setItem(key, "Hello world"); + var key1 = "1" + key; + ls.setItem(key1, "Hello JavaScript"); + var key2 = "2" + key; + ls.setItem(key2, "Hello Cocos2d-JS"); + var key3 = "3" + key; + ls.setItem(key3, "Hello Cocos"); - cc.log(2); + cc.log("- Getting Hello world"); var r = ls.getItem(key); cc.log(r); - cc.log(3); + cc.log("- Removing Hello world"); ls.removeItem(key); - cc.log(4); + cc.log("- Getting Hello world"); r = ls.getItem(key); cc.log(r); + + cc.log("- Getting other items"); + cc.log( ls.getItem(key1) ); + cc.log( ls.getItem(key2) ); + cc.log( ls.getItem(key3) ); + + cc.log("- Clearing local storage"); + ls.clear(); + cc.log("- Getting other items"); + cc.log( ls.getItem(key1) ); + cc.log( ls.getItem(key2) ); + cc.log( ls.getItem(key3) ); } }); diff --git a/tests/js-tests/src/tests-main.js b/tests/js-tests/src/tests-main.js index 63a321e51c..5099c714bc 100644 --- a/tests/js-tests/src/tests-main.js +++ b/tests/js-tests/src/tests-main.js @@ -580,6 +580,14 @@ var testNames = [ return new Sprite3DTestScene(); } }, + { + title:"SpritePolygon Test", + platforms: PLATFORM_JSB, + linksrc:"src/SpritePolygonTest/SpritePolygonTest.js", + testScene:function () { + return new SpritePolygonTestScene(); + } + }, { title:"Sprite Test", resource:g_sprites, @@ -685,4 +693,4 @@ var testNames = [ //"UserDefaultTest", //"ZwoptexTest", -]; \ No newline at end of file +]; diff --git a/tests/lua-empty-test/.cocos-project.json b/tests/lua-empty-test/.cocos-project.json index 4b78642cd0..470ad30447 100644 --- a/tests/lua-empty-test/.cocos-project.json +++ b/tests/lua-empty-test/.cocos-project.json @@ -1,7 +1,7 @@ { "win32_cfg": { "project_path": "../../build", - "sln_file": "cocos2d-win32.vc2012.sln", + "sln_file": "cocos2d-win32.vc2013.sln", "project_name": "lua-empty-test", "build_cfg_path": "project/proj.win32" }, 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 5c39dc9739..7750d25d6f 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 @@ -18,20 +18,18 @@ Application Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp Application Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp @@ -48,7 +46,7 @@ - <_ProjectFileVersion>10.0.40219.1 + <_ProjectFileVersion>12.0.21005.1 $(SolutionDir)$(Configuration).win32\lua-empty-test\ $(Configuration).win32\ true diff --git a/tests/lua-tests/.cocos-project.json b/tests/lua-tests/.cocos-project.json index ee001808a8..aaef81cc15 100644 --- a/tests/lua-tests/.cocos-project.json +++ b/tests/lua-tests/.cocos-project.json @@ -1,7 +1,7 @@ { "win32_cfg": { "project_path": "../../build", - "sln_file": "cocos2d-win32.vc2012.sln", + "sln_file": "cocos2d-win32.vc2013.sln", "project_name": "lua-tests", "build_cfg_path": "project/proj.win32" }, diff --git a/tests/lua-tests/project/proj.android/jni/Application.mk b/tests/lua-tests/project/proj.android/jni/Application.mk index 07aa592b13..18444678c9 100644 --- a/tests/lua-tests/project/proj.android/jni/Application.mk +++ b/tests/lua-tests/project/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/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj index 0cc4844115..c0c8031646 100644 --- a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj +++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj @@ -19,21 +19,19 @@ Application true Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp Application false Unicode - v100 - v110 - v110_xp v120 v120_xp + v140 + v140_xp diff --git a/tools/cocos2d-console b/tools/cocos2d-console index fe7ccc496d..339f75bb11 160000 --- a/tools/cocos2d-console +++ b/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit fe7ccc496d507c66dbfef2907fec9ac39d737300 +Subproject commit 339f75bb11a34e5d7c7a81ef293fd2918cb44b3f diff --git a/tools/gen-prebuilt/build_config.json b/tools/gen-prebuilt/build_config.json index 0c250ef587..fd0730e1cd 100644 --- a/tools/gen-prebuilt/build_config.json +++ b/tools/gen-prebuilt/build_config.json @@ -10,7 +10,7 @@ } }, "win32_proj_info" : { - "build/cocos2d-win32.vc2012.sln" : { + "build/cocos2d-win32.vc2013.sln" : { "outputdir" : "prebuilt/win32", "targets" : [ "libcocosdenshion", "libbox2d", "libchipmunk", diff --git a/tools/jenkins-scripts/configs/cocos-2dx-develop-win32.py b/tools/jenkins-scripts/configs/cocos-2dx-develop-win32.py index 1e55080898..87f8674032 100644 --- a/tools/jenkins-scripts/configs/cocos-2dx-develop-win32.py +++ b/tools/jenkins-scripts/configs/cocos-2dx-develop-win32.py @@ -5,8 +5,8 @@ print 'Build Config:' print ' Host:win7 x86' print ' Branch:develop' print ' Target:win32' -print ' "%VS110COMNTOOLS%..\IDE\devenv.com" "build\cocos2d-win32.vc2012.sln" /Build "Debug|Win32"' -if(os.path.exists('build/cocos2d-win32.vc2012.sln') == False): +print ' "%VS110COMNTOOLS%..\IDE\devenv.com" "build\cocos2d-win32.vc2013.sln" /Build "Debug|Win32"' +if(os.path.exists('build/cocos2d-win32.vc2013.sln') == False): node_name = os.environ['NODE_NAME'] source_dir = '../cocos-2dx-develop-base-repo/node/' + node_name source_dir = source_dir.replace("/", os.sep) @@ -14,7 +14,7 @@ if(os.path.exists('build/cocos2d-win32.vc2012.sln') == False): os.system('git pull origin develop') os.system('git submodule update --init --force') -ret = subprocess.call('"%VS110COMNTOOLS%..\IDE\devenv.com" "build\cocos2d-win32.vc2012.sln" /Build "Debug|Win32"', shell=True) +ret = subprocess.call('"%VS110COMNTOOLS%..\IDE\devenv.com" "build\cocos2d-win32.vc2013.sln" /Build "Debug|Win32"', shell=True) os.system('git clean -xdf -f') print 'build exit' print ret diff --git a/tools/jenkins-scripts/daily-build.py b/tools/jenkins-scripts/daily-build.py index 6f6cd81bb4..1927826709 100644 --- a/tools/jenkins-scripts/daily-build.py +++ b/tools/jenkins-scripts/daily-build.py @@ -70,15 +70,9 @@ def do_build_slaves(): # 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'): - if branch == 'v3': - slave_build_scripts = jenkins_script_path + "win32-vs2012-build.bat" - else: - slave_build_scripts = jenkins_script_path + "win32-vs2013-build.bat" + slave_build_scripts = jenkins_script_path + "win32-vs2013-build.bat" elif(node_name == 'windows-universal' or node_name == 'windows-universal_bak'): - if branch == 'v3': - slave_build_scripts = jenkins_script_path + "windows-universal-v3.bat" - else: - slave_build_scripts = jenkins_script_path + "windows-universal.bat" + slave_build_scripts = jenkins_script_path + "windows-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" elif(node_name == 'mac' or node_name == 'mac_bak'): diff --git a/tools/jenkins-scripts/do-pull-request-builder.py b/tools/jenkins-scripts/do-pull-request-builder.py index c917144f60..1b923a3ab9 100755 --- a/tools/jenkins-scripts/do-pull-request-builder.py +++ b/tools/jenkins-scripts/do-pull-request-builder.py @@ -1,148 +1,28 @@ -#Github pull reqest builder for Jenkins - -import json import os -import urllib2 -import urllib -import base64 -import requests import sys import traceback -import subprocess - -#set Jenkins build description using submitDescription to mock browser behavior -http_proxy = '' -if('HTTP_PROXY' in os.environ): - http_proxy = os.environ['HTTP_PROXY'] -proxyDict = {'http': http_proxy, 'https': http_proxy} +import json branch = "v3" -pr_num = 0 -workspace = "." node_name = "ios" -# for local debugging purpose, you could change the value to 0 and run -# this scripts in your local machine -remote_build = 1 +payload_str = os.environ['payload'] +payload_str = payload_str.decode('utf-8', 'ignore') +#parse to json obj +payload = json.loads(payload_str) +pr_num = payload['number'] -def set_jenkins_job_description(desc, url): - req_data = urllib.urlencode({'description': desc}) - request = urllib2.Request(url + 'submitDescription', req_data) - #print(os.environ['BUILD_URL']) - request.add_header('Content-Type', 'application/x-www-form-urlencoded') - user_name = os.environ['JENKINS_ADMIN'] - password = os.environ['JENKINS_ADMIN_PW'] - base64string = base64.encodestring(user_name + ":" + password).replace('\n', '') - request.add_header("Authorization", "Basic " + base64string) - try: - urllib2.urlopen(request) - except: - traceback.print_exc() +#get pr target branch +branch = payload['branch'] +workspace = os.environ['WORKSPACE'] +node_name = os.environ['NODE_NAME'] - -def check_current_3rd_libs(branch): +def download_3rd_libs(branch): #run download-deps.py print("prepare to downloading ...") os.system('python download-deps.py -r no') -def send_notifies_to_github(): - global branch - global pr_num - global workspace - global node_name - # get payload from os env - payload_str = os.environ['payload'] - payload_str = payload_str.decode('utf-8', 'ignore') - #parse to json obj - payload = json.loads(payload_str) - - #get pull number - pr_num = payload['number'] - print 'pr_num:' + str(pr_num) - - #build for pull request action 'open' and 'synchronize', skip 'close' - action = payload['action'] - print 'action: ' + action - - #pr = payload['pull_request'] - - url = payload['html_url'] - print "url:" + url - pr_desc = '

pr#' + str(pr_num) + ' is ' + action + '

' - - #get statuses url - statuses_url = payload['statuses_url'] - - #get pr target branch - branch = payload['branch'] - workspace = os.environ['WORKSPACE'] - node_name = os.environ['NODE_NAME'] - - #set commit status to pending - # target_url = os.environ['BUILD_URL'] - jenkins_url = os.environ['JENKINS_URL'] - job_name = os.environ['JOB_NAME'].split('/')[0] - build_number = os.environ['BUILD_NUMBER'] - target_url = jenkins_url + 'job/' + job_name + '/' + build_number + '/' - - set_jenkins_job_description(pr_desc, target_url) - - data = {"state": "pending", "target_url": target_url, "context": "Jenkins CI", "description": "Build started..."} - access_token = os.environ['GITHUB_ACCESS_TOKEN'] - Headers = {"Authorization": "token " + access_token} - - try: - requests.post(statuses_url, data=json.dumps(data), headers=Headers, proxies=proxyDict) - except: - traceback.print_exc() - -def syntronize_remote_pr(): - global workspace - global branch - global pr_num - #reset path to workspace root - os.system("cd " + workspace) - #pull latest code - os.system("git fetch origin " + branch) - os.system("git --version") - os.system("git checkout " + branch) - os.system("git merge origin/" + branch) - os.system("git branch -D pull" + str(pr_num)) - #clean workspace - print "Before checkout: git clean -xdf -f" - os.system("git clean -xdf -f") - #fetch pull request to local repo - git_fetch_pr = "git fetch origin pull/" + str(pr_num) + "/head" - ret = os.system(git_fetch_pr) - if(ret != 0): - sys.exit(1) - - #checkout a new branch from v3 or v4-develop - git_checkout = "git checkout -b " + "pull" + str(pr_num) - os.system(git_checkout) - #merge pull reqeust head - subprocess.call("git merge --no-edit FETCH_HEAD", shell=True) - - # The follow method is not working for Azure server - # p = os.popen('git merge --no-edit FETCH_HEAD') - # r = p.read() - # #check if merge fail - # if output.find('CONFLICT') > 0: - # print output - # raise Exception('There are conflicts in your PR!') - - # After checkout a new branch, clean workspace again - print "After checkout: git clean -xdf -f" - os.system("git clean -xdf -f") - - #update submodule - git_update_submodule = "git submodule update --init --force" - ret = os.system(git_update_submodule) - if(ret != 0): - sys.exit(1) - - def gen_scripting_bindings(): global branch # Generate binding glue codes @@ -164,15 +44,9 @@ def do_build_slaves(): # 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'): - if branch != 'v4': - slave_build_scripts = jenkins_script_path + "win32-vs2012-build.bat" - else: - slave_build_scripts = jenkins_script_path + "win32-vs2013-build.bat" + slave_build_scripts = jenkins_script_path + "win32-vs2013-build.bat" elif(node_name == 'windows-universal' or node_name == 'windows-universal_bak'): - if branch != 'v4': - slave_build_scripts = jenkins_script_path + "windows-universal-v3.bat" - else: - slave_build_scripts = jenkins_script_path + "windows-universal.bat" + slave_build_scripts = jenkins_script_path + "windows-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" elif(node_name == 'mac' or node_name == 'mac_bak'): @@ -189,44 +63,35 @@ def do_build_slaves(): print "build finished and return " + str(ret) return ret - -def main(): - global pr_num +def cleanup_workspace(): global workspace global branch - global node_name - global remote_build - - if remote_build == 1: - send_notifies_to_github() - #syntronize local git repository with remote and merge the PR - syntronize_remote_pr() - #copy check_current_3rd_libs - check_current_3rd_libs(branch) + global pr_num + #clean workspace + os.system("cd " + workspace) + os.system("git reset --hard") + os.system("git clean -xdf -f") + os.system("git checkout " + branch) + os.system("git branch -D pull" + str(pr_num)) +def main(): + download_3rd_libs(branch) #generate jsb and luabindings gen_scripting_bindings() #start build jobs on each slave ret = do_build_slaves() + cleanup_workspace() + exit_code = 1 if ret == 0: exit_code = 0 else: exit_code = 1 - #clean workspace - if remote_build == 1: - os.system("cd " + workspace) - os.system("git reset --hard") - os.system("git clean -xdf -f") - os.system("git checkout " + branch) - os.system("git branch -D pull" + str(pr_num)) - else: - print "local build, no need to cleanup" - return(exit_code) + # -------------- main -------------- if __name__ == '__main__': sys_ret = 0 diff --git a/tools/jenkins-scripts/pull-request-builder.py b/tools/jenkins-scripts/pull-request-builder.py index 4539b46a98..018ac03b57 100755 --- a/tools/jenkins-scripts/pull-request-builder.py +++ b/tools/jenkins-scripts/pull-request-builder.py @@ -1,11 +1,142 @@ import os import sys import traceback +import urllib +import urllib2 +import base64 +import json +import requests +import subprocess + +#set Jenkins build description using submitDescription to mock browser behavior +http_proxy = '' +if('HTTP_PROXY' in os.environ): + http_proxy = os.environ['HTTP_PROXY'] +proxyDict = {'http': http_proxy, 'https': http_proxy} + +branch = "v3" +pr_num = 0 +workspace = "." +node_name = "ios" + +def set_jenkins_job_description(desc, url): + req_data = urllib.urlencode({'description': desc}) + request = urllib2.Request(url + 'submitDescription', req_data) + #print(os.environ['BUILD_URL']) + request.add_header('Content-Type', 'application/x-www-form-urlencoded') + user_name = os.environ['JENKINS_ADMIN'] + password = os.environ['JENKINS_ADMIN_PW'] + base64string = base64.encodestring(user_name + ":" + password).replace('\n', '') + request.add_header("Authorization", "Basic " + base64string) + try: + urllib2.urlopen(request) + except: + traceback.print_exc() + +def send_notifies_to_github(): + global branch + global pr_num + global workspace + global node_name + # get payload from os env + payload_str = os.environ['payload'] + payload_str = payload_str.decode('utf-8', 'ignore') + #parse to json obj + payload = json.loads(payload_str) + + #get pull number + pr_num = payload['number'] + print 'pr_num:' + str(pr_num) + + #build for pull request action 'open' and 'synchronize', skip 'close' + action = payload['action'] + print 'action: ' + action + + #pr = payload['pull_request'] + + url = payload['html_url'] + print "url:" + url + pr_desc = '

pr#' + str(pr_num) + ' is ' + action + '

' + + #get statuses url + statuses_url = payload['statuses_url'] + + #get pr target branch + branch = payload['branch'] + workspace = os.environ['WORKSPACE'] + node_name = os.environ['NODE_NAME'] + + #set commit status to pending + # target_url = os.environ['BUILD_URL'] + jenkins_url = os.environ['JENKINS_URL'] + job_name = os.environ['JOB_NAME'].split('/')[0] + build_number = os.environ['BUILD_NUMBER'] + target_url = jenkins_url + 'job/' + job_name + '/' + build_number + '/' + + set_jenkins_job_description(pr_desc, target_url) + + data = {"state": "pending", "target_url": target_url, "context": "Jenkins CI", "description": "Build started..."} + access_token = os.environ['GITHUB_ACCESS_TOKEN'] + Headers = {"Authorization": "token " + access_token} + + try: + requests.post(statuses_url, data=json.dumps(data), headers=Headers, proxies=proxyDict) + except: + traceback.print_exc() + +def syntronize_remote_pr(): + global workspace + global branch + global pr_num + #reset path to workspace root + os.system("cd " + workspace) + #pull latest code + os.system("git fetch origin " + branch) + os.system("git --version") + os.system("git checkout " + branch) + os.system("git merge origin/" + branch) + os.system("git branch -D pull" + str(pr_num)) + #clean workspace + print "Before checkout: git clean -xdf -f" + os.system("git clean -xdf -f") + #fetch pull request to local repo + git_fetch_pr = "git fetch origin pull/" + str(pr_num) + "/head" + ret = os.system(git_fetch_pr) + if(ret != 0): + sys.exit(1) + + #checkout a new branch from v3 or v4-develop + git_checkout = "git checkout -b " + "pull" + str(pr_num) + os.system(git_checkout) + #merge pull reqeust head + subprocess.call("git merge --no-edit FETCH_HEAD", shell=True) + + # The follow method is not working for Azure server + # p = os.popen('git merge --no-edit FETCH_HEAD') + # r = p.read() + # #check if merge fail + # if output.find('CONFLICT') > 0: + # print output + # raise Exception('There are conflicts in your PR!') + + # After checkout a new branch, clean workspace again + print "After checkout: git clean -xdf -f" + os.system("git clean -xdf -f") + + #update submodule + git_update_submodule = "git submodule update --init --force" + ret = os.system(git_update_submodule) + if(ret != 0): + sys.exit(1) + # -------------- main -------------- if __name__ == '__main__': sys_ret = 0 try: + send_notifies_to_github() + #syntronize local git repository with remote and merge the PR + syntronize_remote_pr() jenkins_script_path = "tools" + os.sep + "jenkins-scripts" + os.sep + "do-pull-request-builder.py" sys_ret = os.system("python " + jenkins_script_path) except: diff --git a/tools/jenkins-scripts/slave-scripts/win32-vs2012-build.bat b/tools/jenkins-scripts/slave-scripts/win32-vs2012-build.bat deleted file mode 100755 index 339d000880..0000000000 --- a/tools/jenkins-scripts/slave-scripts/win32-vs2012-build.bat +++ /dev/null @@ -1,2 +0,0 @@ -call "%VS120COMNTOOLS%vsvars32.bat" -msbuild build\cocos2d-win32.vc2012.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m diff --git a/tools/jenkins-scripts/slave-scripts/windows-universal-v3.bat b/tools/jenkins-scripts/slave-scripts/windows-universal-v3.bat deleted file mode 100755 index 7959cc3aed..0000000000 --- a/tools/jenkins-scripts/slave-scripts/windows-universal-v3.bat +++ /dev/null @@ -1,2 +0,0 @@ -call "%VS120COMNTOOLS%vsvars32.bat" -msbuild build\cocos2d-win8.1-universal.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m diff --git a/tools/simulator/.cocos-project.json b/tools/simulator/.cocos-project.json new file mode 100755 index 0000000000..6e3b558228 --- /dev/null +++ b/tools/simulator/.cocos-project.json @@ -0,0 +1,4 @@ +{ + "has_native": true, + "project_type": "lua" +} \ No newline at end of file diff --git a/tools/simulator/.project b/tools/simulator/.project new file mode 100644 index 0000000000..1ee849d993 --- /dev/null +++ b/tools/simulator/.project @@ -0,0 +1,13 @@ + + + Simulator + + + + + + + org.ccdt.cocosproject + org.eclipse.koneki.ldt.nature + + diff --git a/tools/simulator/config.json b/tools/simulator/config.json new file mode 100644 index 0000000000..bf8ea7edb7 --- /dev/null +++ b/tools/simulator/config.json @@ -0,0 +1,12 @@ +{ + "init_cfg":{ + "isLandscape": true, + "isWindowTop": false, + "name": "simulator", + "width": 960, + "height": 640, + "entry": "", + "consolePort": 6050, + "uploadPort": 6060 + } +} diff --git a/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.cpp b/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.cpp new file mode 100644 index 0000000000..0e61c50fd8 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -0,0 +1,82 @@ +#include "AppDelegate.h" +#include "CCLuaEngine.h" +#include "SimpleAudioEngine.h" +#include "cocos2d.h" +#include "ide-support/CodeIDESupport.h" + +#include "runtime/Runtime.h" + +// Lua +#include "ide-support/RuntimeLuaImpl.h" + +// Js +#include "ide-support/RuntimeJsImpl.h" + + +using namespace CocosDenshion; + +USING_NS_CC; +using namespace std; + +AppDelegate::AppDelegate() +{ +} + +AppDelegate::~AppDelegate() +{ + SimpleAudioEngine::end(); + + // NOTE:Please don't remove this call if you want to debug with Cocos Code IDE + RuntimeEngine::getInstance()->end(); +} + +//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() +{ + // set default FPS + Director::getInstance()->setAnimationInterval(1.0 / 60.0f); + + auto runtimeEngine = RuntimeEngine::getInstance(); + runtimeEngine->setEventTrackingEnable(true); + runtimeEngine->addRuntime(RuntimeLuaImpl::create(), kRuntimeEngineLua); + auto jsRuntime = RuntimeJsImpl::create(); + runtimeEngine->addRuntime(jsRuntime, kRuntimeEngineJs); + runtimeEngine->start(); + + // js need special debug port + if (runtimeEngine->getProjectConfig().getDebuggerType() != kCCRuntimeDebuggerNone) + { + jsRuntime->startWithDebugger(); + } + + + // Runtime end + cocos2d::log("iShow!"); + 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() +{ + Director::getInstance()->stopAnimation(); + + SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); +} + +// this function will be called when the app is active again +void AppDelegate::applicationWillEnterForeground() +{ + Director::getInstance()->startAnimation(); + + SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); +} diff --git a/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.h b/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.h new file mode 100755 index 0000000000..a2699dc754 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.h @@ -0,0 +1,40 @@ +#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(); + + virtual void initGLContextAttrs(); + + /** + @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/tools/simulator/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h b/tools/simulator/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h new file mode 100644 index 0000000000..3607d3c7b3 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h @@ -0,0 +1,7 @@ +#ifndef __CODE_IDE_SUPPORT_H__ +#define __CODE_IDE_SUPPORT_H__ + +// define 1 to open Cocos Code IDE support, 0 to disable +#define CC_CODE_IDE_DEBUG_SUPPORT 1 + +#endif /* __CODE_IDE_SUPPORT_H__ */ diff --git a/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeJsImpl.cpp b/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeJsImpl.cpp new file mode 100644 index 0000000000..5e79dbdf3a --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeJsImpl.cpp @@ -0,0 +1,299 @@ +// +// RuntimeJsImpl.cpp +// Simulator +// +// + +#include "RuntimeJsImpl.h" + +#include "cocos2d.h" // 2dx engine + +#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) + +#include "runtime/ConfigParser.h" // config +#include "runtime/Runtime.h" +#include "runtime/FileServer.h" + +// js +#include "js_module_register.h" + + +USING_NS_CC; + +static const char *RUNTIME_JS_BOOT_SCRIPT = "script/jsb_boot.js"; + +static bool reloadScript(const string& file) +{ + auto director = Director::getInstance(); + FontFNT::purgeCachedData(); + if (director->getOpenGLView()) + { + SpriteFrameCache::getInstance()->removeSpriteFrames(); + director->getTextureCache()->removeAllTextures(); + } + FileUtils::getInstance()->purgeCachedEntries(); + + //director->getScheduler()->unscheduleAll(); + //director->getScheduler()->scheduleUpdate(director->getActionManager(), Scheduler::PRIORITY_SYSTEM, false); + + string modulefile = file; + if (modulefile.empty()) + { + modulefile = ConfigParser::getInstance()->getEntryFile().c_str(); + } + + return ScriptingCore::getInstance()->runScript(modulefile.c_str()); +} + +bool runtime_FileUtils_addSearchPath(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::FileUtils* cobj = (cocos2d::FileUtils *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "cocos2dx_FileUtils_addSearchPath : Invalid Native Object"); + if (argc == 1 || argc == 2) { + std::string arg0; + bool arg1 = false; + + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "cocos2dx_FileUtils_addSearchPath : Error processing arguments"); + + if (argc == 2) + { + arg1 = JS::ToBoolean(JS::RootedValue(cx, args.get(1))); + } + + 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(RuntimeEngine::getInstance()->getRuntime()->getProjectPath() + arg0, arg1); +#endif + } + + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "cocos2dx_FileUtils_addSearchPath : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} + +bool runtime_FileUtils_setSearchPaths(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::FileUtils* cobj = (cocos2d::FileUtils *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_FileUtils_setSearchPaths : Invalid Native Object"); + if (argc == 1) { + std::vector vecPaths, writePaths; + ok &= jsval_to_std_vector_string(cx, args.get(0), &vecPaths); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_FileUtils_setSearchPaths : Error processing arguments"); + + std::vector originPath; // for IOS platform. + std::vector projPath; // for Desktop platform. + for (int i = 0; i < vecPaths.size(); i++) + { + if (!FileUtils::getInstance()->isAbsolutePath(vecPaths[i])) + { + originPath.push_back(vecPaths[i]); // for IOS platform. + projPath.push_back(RuntimeEngine::getInstance()->getRuntime()->getProjectPath()+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); + + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_FileUtils_setSearchPaths : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} + +void register_FileUtils(JSContext *cx, JS::HandleObject global) +{ + JS::RootedValue nsval(cx); + JS::RootedObject ns(cx); + JS_GetProperty(cx, global, "cc", &nsval); + if (nsval == JSVAL_VOID) { + return; + } else { + ns.set(nsval.toObjectOrNull()); + } + + JS::RootedObject proto(cx, jsb_cocos2d_FileUtils_prototype); + JS_DefineFunction(cx, proto, "addSearchPath", runtime_FileUtils_addSearchPath, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE); + JS_DefineFunction(cx, proto, "setSearchPaths", runtime_FileUtils_setSearchPaths, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE); +} + +RuntimeJsImpl* RuntimeJsImpl::create() +{ + RuntimeJsImpl *instance = new RuntimeJsImpl(); + return instance; +} + +bool RuntimeJsImpl::initJsEnv() +{ + if (_hasStarted) + { + return true; + } + + js_module_register(); + ScriptingCore::getInstance()->addRegisterCallback(register_FileUtils); + ScriptingCore::getInstance()->start(); + _hasStarted = true; + + ScriptEngineProtocol *engine = ScriptingCore::getInstance(); + ScriptEngineManager::getInstance()->setScriptEngine(engine); + + return true; +} + +bool RuntimeJsImpl::startWithDebugger() +{ + initJsEnv(); + + int debugPort = 5086; +#if(CC_PLATFORM_MAC == CC_TARGET_PLATFORM || CC_PLATFORM_WIN32 == CC_TARGET_PLATFORM) + debugPort = ConfigParser::getInstance()->getDebugPort(); +#endif + ScriptingCore::getInstance()->enableDebugger(debugPort); + + return true; +} + +void RuntimeJsImpl::startScript(const std::string& path) +{ + loadScriptFile(path); +} + +void RuntimeJsImpl::onStartDebuger(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse) +{ + if (loadScriptFile(ConfigParser::getInstance()->getEntryFile())) + { + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); + } + else + { + dReplyParse.AddMember("code",1,dReplyParse.GetAllocator()); + } +} + +void RuntimeJsImpl::onClearCompile(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse) +{ + if (dArgParse.HasMember("modulefiles") && dArgParse["modulefiles"].Size() != 0) + { + const rapidjson::Value& objectfiles = dArgParse["modulefiles"]; + for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) + { + ScriptingCore::getInstance()->cleanScript(objectfiles[i].GetString()); + } + } + else + { + std::unordered_map filenameScript = ScriptingCore::getInstance()->getFileScript(); + filenameScript.clear(); + } + + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); +} + +void RuntimeJsImpl::onPrecompile(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse) +{ + const rapidjson::Value& objectfiles = dArgParse["modulefiles"]; + for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) + { + ScriptingCore::getInstance()->compileScript(objectfiles[i].GetString()); + } + + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); +} + +void RuntimeJsImpl::onReload(const rapidjson::Document &dArgParse, rapidjson::Document &dReplyParse) +{ + 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()); + }else + { + reloadScript(""); + } + + dReplyParse.AddMember("code", 0, dReplyParse.GetAllocator()); +} + +void RuntimeJsImpl::onRemove(const std::string &filename) +{ + ScriptingCore::getInstance()->cleanScript(filename.c_str()); +} + +void RuntimeJsImpl::end() +{ + ScriptEngineManager::destroyInstance(); + RuntimeProtocol::end(); +} + +// private + +RuntimeJsImpl::RuntimeJsImpl() +: _hasStarted(false) +{ +} + +bool RuntimeJsImpl::loadScriptFile(const std::string& path) +{ + std::string filepath = path; + if (filepath.empty()) + { + filepath = ConfigParser::getInstance()->getEntryFile(); + } + CCLOG("------------------------------------------------"); + CCLOG("LOAD Js FILE: %s", filepath.c_str()); + CCLOG("------------------------------------------------"); + + initJsEnv(); + auto engine = ScriptingCore::getInstance(); + engine->runScript(RUNTIME_JS_BOOT_SCRIPT); + ScriptEngineManager::getInstance()->setScriptEngine(engine); + return ScriptingCore::getInstance()->runScript(filepath.c_str()); +} + + +#endif // (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) \ No newline at end of file diff --git a/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeJsImpl.h b/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeJsImpl.h new file mode 100644 index 0000000000..d324f3fea2 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeJsImpl.h @@ -0,0 +1,39 @@ +// +// RuntimeJsImpl.h +// Simulator +// +// + +#ifndef __Simulator__RuntimeJsImpl__ +#define __Simulator__RuntimeJsImpl__ + +#include "CodeIDESupport.h" +#include "cocos2d.h" + +#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) +#include "runtime/RuntimeProtocol.h" + +class RuntimeJsImpl : public RuntimeProtocol +{ +public: + static RuntimeJsImpl* create(); + + void startScript(const std::string& file); + void onStartDebuger(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse); + void onClearCompile(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse); + void onPrecompile(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse); + void onReload(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse); + void onRemove(const std::string &filename); + void end(); + + bool startWithDebugger(); +private: + RuntimeJsImpl(); + bool initJsEnv(); + bool loadScriptFile(const std::string& file); + bool _hasStarted; +}; + +#endif // (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) + +#endif /* defined(__Simulator__RuntimeLua__) */ diff --git a/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp b/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp new file mode 100644 index 0000000000..5a91d00b2f --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp @@ -0,0 +1,341 @@ +// +// 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 + 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/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h b/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h new file mode 100644 index 0000000000..d67c923669 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h @@ -0,0 +1,32 @@ +// +// 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/tools/simulator/frameworks/runtime-src/Classes/ide-support/lang b/tools/simulator/frameworks/runtime-src/Classes/ide-support/lang new file mode 100644 index 0000000000..1c13dacd89 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/ide-support/lang @@ -0,0 +1,29 @@ +{ + "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/tools/simulator/frameworks/runtime-src/Classes/ide-support/lua_debugger.c b/tools/simulator/frameworks/runtime-src/Classes/ide-support/lua_debugger.c new file mode 100644 index 0000000000..2b695a1349 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/ide-support/lua_debugger.c @@ -0,0 +1,8673 @@ + +/* 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/tools/simulator/frameworks/runtime-src/Classes/ide-support/lua_debugger.h b/tools/simulator/frameworks/runtime-src/Classes/ide-support/lua_debugger.h new file mode 100644 index 0000000000..43c2c8ae35 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/ide-support/lua_debugger.h @@ -0,0 +1,23 @@ + +/* 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/tools/simulator/frameworks/runtime-src/Classes/js_module_register.h b/tools/simulator/frameworks/runtime-src/Classes/js_module_register.h new file mode 100644 index 0000000000..37c482649e --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/js_module_register.h @@ -0,0 +1,79 @@ +#ifndef __JS_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_JS_MODULE_REGISTER_H__ +#define __JS_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_JS_MODULE_REGISTER_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(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_REGISTER_H__ + diff --git a/tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h b/tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h new file mode 100755 index 0000000000..76e9671243 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h @@ -0,0 +1,31 @@ +#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" +#include "lua/quick/lua_cocos2dx_quick_manual.hpp" + +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/tools/simulator/frameworks/runtime-src/proj.android/.classpath b/tools/simulator/frameworks/runtime-src/proj.android/.classpath new file mode 100755 index 0000000000..d57ec02513 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tools/simulator/frameworks/runtime-src/proj.android/.project b/tools/simulator/frameworks/runtime-src/proj.android/.project new file mode 100755 index 0000000000..b593ae59ff --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/.project @@ -0,0 +1,33 @@ + + + simulator + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/tools/simulator/frameworks/runtime-src/proj.android/.settings/org.eclipse.jdt.core.prefs b/tools/simulator/frameworks/runtime-src/proj.android/.settings/org.eclipse.jdt.core.prefs new file mode 100755 index 0000000000..b080d2ddc8 --- /dev/null +++ b/tools/simulator/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/tools/simulator/frameworks/runtime-src/proj.android/AndroidManifest.xml b/tools/simulator/frameworks/runtime-src/proj.android/AndroidManifest.xml new file mode 100755 index 0000000000..5068cd5af3 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/AndroidManifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/simulator/frameworks/runtime-src/proj.android/ant.properties b/tools/simulator/frameworks/runtime-src/proj.android/ant.properties new file mode 100755 index 0000000000..6bad1d5c60 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/ant.properties @@ -0,0 +1,21 @@ +# This file is used to override default values used by the Ant build system. +# +# This file must be checked into Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + +key.alias.password=android +key.store.password=android +key.store=/Users/jryin/.android/debug.keystore +key.alias=androiddebugkey diff --git a/tools/simulator/frameworks/runtime-src/proj.android/build-cfg.json b/tools/simulator/frameworks/runtime-src/proj.android/build-cfg.json new file mode 100755 index 0000000000..4d56ca71ea --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/build-cfg.json @@ -0,0 +1,16 @@ +{ + "ndk_module_path" :[ + "../../../../../", + "../../../../../cocos/", + "../../../../../external", + "../../../../../cocos/scripting" + ], + "copy_resources": [ + ], + "must_copy_resources": [ + { + "from": "../../../config.json", + "to": "" + } + ] +} diff --git a/tools/simulator/frameworks/runtime-src/proj.android/build.xml b/tools/simulator/frameworks/runtime-src/proj.android/build.xml new file mode 100755 index 0000000000..e6cd82c5ec --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/build.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/simulator/frameworks/runtime-src/proj.android/jni/Android.mk b/tools/simulator/frameworks/runtime-src/proj.android/jni/Android.mk new file mode 100644 index 0000000000..dd8fbcadba --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/jni/Android.mk @@ -0,0 +1,38 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos2dlua_shared + +LOCAL_MODULE_FILENAME := libcocos2dlua + +ifeq ($(COCOS_SIMULATOR_BUILD),1) +LOCAL_ARM_MODE := arm +endif + +FILE_LIST := hellolua/main.cpp +FILE_LIST += $(wildcard $(LOCAL_PATH)/../../Classes/*.cpp) +FILE_LIST += $(wildcard $(LOCAL_PATH)/../../Classes/ide-support/*.cpp) +FILE_LIST += $(wildcard $(LOCAL_PATH)/../../Classes/ide-support/*.c) + +LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) + +LOCAL_C_INCLUDES := \ +$(LOCAL_PATH)/../../Classes/protobuf-lite \ +$(LOCAL_PATH)/../../Classes/runtime \ +$(LOCAL_PATH)/../../Classes \ +$(LOCAL_PATH)/../../../../../../external \ +$(LOCAL_PATH)/../../../../../../tools/simulator/libsimulator/lib \ +$(LOCAL_PATH)/../../../../../../tools/simulator/libsimulator/lib/protobuf-lite + +LOCAL_STATIC_LIBRARIES := cocos2d_lua_static +LOCAL_STATIC_LIBRARIES += cocos2d_simulator_static +LOCAL_STATIC_LIBRARIES += cocos2d_js_static + +LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT + +include $(BUILD_SHARED_LIBRARY) + +$(call import-module,scripting/lua-bindings/proj.android) +$(call import-module,scripting/js-bindings/proj.android) +$(call import-module,tools/simulator/libsimulator/proj.android) diff --git a/tools/simulator/frameworks/runtime-src/proj.android/jni/Application.mk b/tools/simulator/frameworks/runtime-src/proj.android/jni/Application.mk new file mode 100644 index 0000000000..6e446c46fd --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/jni/Application.mk @@ -0,0 +1,16 @@ +APP_STL := gnustl_static + +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_CPPFLAGS += -DCOCOS2D_DEBUG=1 + APP_OPTIM := release +endif + +COCOS_SIMULATOR_BUILD := 1 \ No newline at end of file diff --git a/tools/simulator/frameworks/runtime-src/proj.android/jni/hellolua/main.cpp b/tools/simulator/frameworks/runtime-src/proj.android/jni/hellolua/main.cpp new file mode 100755 index 0000000000..ff9c646e95 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/jni/hellolua/main.cpp @@ -0,0 +1,35 @@ +#include "AppDelegate.h" +#include "cocos2d.h" +#include "platform/android/jni/JniHelper.h" +#include +#include +#include "runtime/ConfigParser.h" +#include "ide-support/CodeIDESupport.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_lua_AppActivity_nativeIsLandScape(JNIEnv *env, jobject thisz) + { + return ConfigParser::getInstance()->isLanscape(); + } + + bool Java_org_cocos2dx_lua_AppActivity_nativeIsDebug(JNIEnv *env, jobject thisz) + { +#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) + return true; +#else + return false; +#endif + } +} + diff --git a/tools/simulator/frameworks/runtime-src/proj.android/proguard-project.txt b/tools/simulator/frameworks/runtime-src/proj.android/proguard-project.txt new file mode 100755 index 0000000000..f2fe1559a2 --- /dev/null +++ b/tools/simulator/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/tools/simulator/frameworks/runtime-src/proj.android/project.properties b/tools/simulator/frameworks/runtime-src/proj.android/project.properties new file mode 100755 index 0000000000..3a475fb9e6 --- /dev/null +++ b/tools/simulator/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=../../../../../cocos/platform/android/java diff --git a/tools/simulator/frameworks/runtime-src/proj.android/res/drawable-hdpi/icon.png b/tools/simulator/frameworks/runtime-src/proj.android/res/drawable-hdpi/icon.png new file mode 100755 index 0000000000..8aa4767c2f Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.android/res/drawable-hdpi/icon.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.android/res/drawable-ldpi/icon.png b/tools/simulator/frameworks/runtime-src/proj.android/res/drawable-ldpi/icon.png new file mode 100755 index 0000000000..17ce11a085 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.android/res/drawable-ldpi/icon.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.android/res/drawable-mdpi/icon.png b/tools/simulator/frameworks/runtime-src/proj.android/res/drawable-mdpi/icon.png new file mode 100755 index 0000000000..3780aac46c Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.android/res/drawable-mdpi/icon.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.android/res/values/strings.xml b/tools/simulator/frameworks/runtime-src/proj.android/res/values/strings.xml new file mode 100755 index 0000000000..e41378172b --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/res/values/strings.xml @@ -0,0 +1,4 @@ + + + simulator + diff --git a/tools/simulator/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java b/tools/simulator/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java new file mode 100755 index 0000000000..e678b3ce41 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java @@ -0,0 +1,130 @@ +/**************************************************************************** +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.lua; + +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.util.Enumeration; +import java.util.ArrayList; + +import org.cocos2dx.lib.Cocos2dxActivity; + +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.pm.ApplicationInfo; +import android.content.pm.ActivityInfo; +import android.net.ConnectivityManager; +import android.net.NetworkInfo; +import android.net.wifi.WifiInfo; +import android.net.wifi.WifiManager; +import android.os.Bundle; +import android.provider.Settings; +import android.text.format.Formatter; +import android.util.Log; +import android.view.WindowManager; +import android.widget.Toast; + + +public class AppActivity extends Cocos2dxActivity{ + + static String hostIPAdress = "0.0.0.0"; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + if(nativeIsLandScape()) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); + } else { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); + } + + //2.Set the format of window + + // Check the wifi is opened when the native is debug. + if(nativeIsDebug()) + { + getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + if(!isNetworkConnected()) + { + AlertDialog.Builder builder=new AlertDialog.Builder(this); + builder.setTitle("Warning"); + builder.setMessage("Please open WIFI for debuging..."); + builder.setPositiveButton("OK",new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); + finish(); + System.exit(0); + } + }); + + builder.setNegativeButton("Cancel", null); + builder.setCancelable(true); + builder.show(); + } + } + hostIPAdress = getHostIpAddress(); + } + private boolean isNetworkConnected() { + ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); + if (cm != null) { + NetworkInfo networkInfo = cm.getActiveNetworkInfo(); + ArrayList networkTypes = new ArrayList(); + networkTypes.add(ConnectivityManager.TYPE_WIFI); + try { + networkTypes.add(ConnectivityManager.class.getDeclaredField("TYPE_ETHERNET").getInt(null)); + } catch (NoSuchFieldException nsfe) { + } + catch (IllegalAccessException iae) { + throw new RuntimeException(iae); + } + if (networkInfo != null && networkTypes.contains(networkInfo.getType())) { + return true; + } + } + return false; + } + + 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/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/AppController.h b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/AppController.h new file mode 100755 index 0000000000..2e8186124e --- /dev/null +++ b/tools/simulator/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/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm new file mode 100755 index 0000000000..396f92ca30 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm @@ -0,0 +1,148 @@ +/**************************************************************************** + 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 +{ + + cocos2d::Application *app = cocos2d::Application::getInstance(); + app->initGLContextAttrs(); + cocos2d::GLViewImpl::convertAttrs(); + + // 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: (NSString*)cocos2d::GLViewImpl::_pixelFormat + depthFormat: cocos2d::GLViewImpl::_depthFormat + 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); + + app->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/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-568h@2x.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-568h@2x.png new file mode 100755 index 0000000000..66c6d1cead Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-568h@2x.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png new file mode 100755 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png new file mode 100755 index 0000000000..dadccee686 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default.png new file mode 100755 index 0000000000..dcb80725de Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default@2x.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default@2x.png new file mode 100755 index 0000000000..84689888a1 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Default@2x.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-100.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-100.png new file mode 100755 index 0000000000..ef38d4500a Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-100.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-114.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-114.png new file mode 100755 index 0000000000..c3807861ad Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-114.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-120.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-120.png new file mode 100755 index 0000000000..a5b49ccbb1 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-120.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-144.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-144.png new file mode 100755 index 0000000000..1526615c02 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-144.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-152.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-152.png new file mode 100755 index 0000000000..8aa82506d0 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-152.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-29.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-29.png new file mode 100755 index 0000000000..0500184c86 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-29.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-40.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-40.png new file mode 100755 index 0000000000..775685daca Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-40.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-50.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-50.png new file mode 100755 index 0000000000..ac381bc20e Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-50.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-57.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-57.png new file mode 100755 index 0000000000..4fcc6fddff Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-57.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-58.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-58.png new file mode 100755 index 0000000000..f0f8b7fe98 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-58.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-72.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-72.png new file mode 100755 index 0000000000..2c573c8df4 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-72.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-76.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-76.png new file mode 100755 index 0000000000..8a1fa1850c Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-76.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-80.png b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-80.png new file mode 100755 index 0000000000..d9c7ab446b Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Icon-80.png differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Info.plist b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Info.plist new file mode 100644 index 0000000000..7037667ac7 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Info.plist @@ -0,0 +1,157 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIconFiles + + Icon-80 + Icon-58 + Icon-29 + Icon-120 + Icon-57.png + Icon-114.png + Icon-72.png + Icon-144.png + + CFBundleIconFiles~ipad + + Icon-58 + Icon-29 + Icon-80 + Icon-40 + Icon-100 + Icon-50 + Icon-152 + Icon-76 + Icon-120 + Icon-57.png + Icon-114.png + Icon-72.png + Icon-144.png + + CFBundleIdentifier + com.cocos.apps.simulator + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + simulator + CFBundlePackageType + APPL + CFBundleShortVersionString + 3.5rc0 + CFBundleSignature + ???? + CFBundleVersion + 20150314 + LSRequiresIPhoneOS + + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + + UIPrerenderedIcon + + UIRequiredDeviceCapabilities + + accelerometer + + opengles-1 + + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch new file mode 100755 index 0000000000..5ec7dfe43e --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'simulator' target in the 'simulator' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.h b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.h new file mode 100755 index 0000000000..11dfc4bf88 --- /dev/null +++ b/tools/simulator/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/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm new file mode 100755 index 0000000000..5bc929e35f --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm @@ -0,0 +1,127 @@ +/**************************************************************************** + 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 "runtime/ConfigParser.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 (ConfigParser::getInstance()->isLanscape()) { + return UIInterfaceOrientationIsLandscape( interfaceOrientation ); + }else{ + return UIInterfaceOrientationIsPortrait( interfaceOrientation ); + } +} + +// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead +- (NSUInteger) supportedInterfaceOrientations{ +#ifdef __IPHONE_6_0 + if (ConfigParser::getInstance()->isLanscape()) { + return UIInterfaceOrientationMaskLandscape; + }else{ + return UIInterfaceOrientationMaskPortraitUpsideDown; + } +#endif +} + +- (BOOL) shouldAutorotate { + if (ConfigParser::getInstance()->isLanscape()) { + return YES; + }else{ + return NO; + } +} + +- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + + cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); + + if (glview) + { + CCEAGLView *eaglview = (CCEAGLView*) 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/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/build-cfg.json b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/build-cfg.json new file mode 100755 index 0000000000..e93fceb246 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/build-cfg.json @@ -0,0 +1,6 @@ +{ + "remove_res" : [ + "src", + "res" + ] +} diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/main.m b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/main.m new file mode 100755 index 0000000000..39146b5c74 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/ios/main.m @@ -0,0 +1,16 @@ +// +// main.m +// simulator +// +// Copyright __MyCompanyName__ 2011. All rights reserved. +// + +#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/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/ConsoleWindow.xib b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/ConsoleWindow.xib new file mode 100644 index 0000000000..1cc9932310 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/ConsoleWindow.xib @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/MainMenu.xib b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/MainMenu.xib new file mode 100755 index 0000000000..95349511fa --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/MainMenu.xib @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/ConsoleWindowController.h b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/ConsoleWindowController.h new file mode 100755 index 0000000000..7b1c06d215 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/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/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/ConsoleWindowController.m b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/ConsoleWindowController.m new file mode 100755 index 0000000000..aa56938433 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/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/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns new file mode 100755 index 0000000000..2040fc6fe6 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns differ diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Info.plist b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Info.plist new file mode 100644 index 0000000000..b4d91ddeaa --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Info.plist @@ -0,0 +1,60 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDocumentTypes + + + CFBundleTypeName + Folder + CFBundleTypeOSTypes + + folder + + CFBundleTypeRole + Viewer + + + CFBundleTypeExtensions + + csd + csb + + CFBundleTypeName + Cocos Studio Project + CFBundleTypeRole + Viewer + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Icon + CFBundleIdentifier + com.cocos.apps.simulator + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Cocos Simulator + CFBundlePackageType + APPL + CFBundleShortVersionString + 3.7 + CFBundleSignature + ???? + CFBundleVersion + 20150314 + LSApplicationCategoryType + public.app-category.utilities + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2015. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Prefix.pch b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/Prefix.pch new file mode 100755 index 0000000000..46c36a7e99 --- /dev/null +++ b/tools/simulator/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/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.h b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.h new file mode 100755 index 0000000000..ce9cc7f82d --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.h @@ -0,0 +1,59 @@ +/**************************************************************************** + 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; + std::string _entryPath; + + //log file + ConsoleWindowController *_consoleController; + NSFileHandle *_fileHandle; + + //console pipe + NSPipe *_pipe; + NSFileHandle *_pipeReadHandle; +} + +@property (nonatomic, assign) IBOutlet NSMenu* menu; + +-(BOOL)application:(NSApplication*)app openFile:(NSString*)path; +-(IBAction)onFileClose:(id)sender; +-(IBAction)onWindowAlwaysOnTop:(id)sender; + +@end diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm new file mode 100755 index 0000000000..fac974fe4b --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm @@ -0,0 +1,684 @@ +/**************************************************************************** + 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 + +-(BOOL)application:(NSApplication*)app openFile:(NSString*)path +{ + NSFileManager *fm = [NSFileManager defaultManager]; + BOOL isDirectory = NO; + if (![fm fileExistsAtPath:path isDirectory:&isDirectory]) + { + return NO; + } + + if (isDirectory) + { + // check src folder + if ([fm fileExistsAtPath:[path stringByAppendingString:@"/src/main.lua"]]) + { + _project.setProjectDir([path cStringUsingEncoding:NSUTF8StringEncoding]); + _entryPath = "$(PROJDIR)/src/main.lua"; + } + else if ([fm fileExistsAtPath:[path stringByAppendingString:@"/src/main.js"]]) + { + _project.setProjectDir([path cStringUsingEncoding:NSUTF8StringEncoding]); + _entryPath = "$(PROJDIR)/src/main.js"; + } + } + else + { + _entryPath = [path cStringUsingEncoding:NSUTF8StringEncoding]; + } + + return YES; +} + +-(void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + SIMULATOR = self; + player::PlayerMac::create(); + + _debugLogFile = 0; + + [self parseCocosProjectConfig:&_project]; + [self updateProjectFromCommandLineArgs:&_project]; + + if (_entryPath.length()) + { + _project.setScriptFile(_entryPath); + } + + [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]]; +} + +- (float) titleBarHeight +{ + NSRect frame = NSMakeRect (0, 0, 100, 100); + + NSRect contentRect; + contentRect = [NSWindow contentRectForFrameRect: frame + styleMask: NSTitledWindowMask]; + + return (frame.size.height - contentRect.size.height); + +} + +- (void) createWindowAndGLView +{ + GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8}; + GLView::setGLContextAttrs(glContextAttrs); + + // create console window **MUST** before create opengl view +#if (CC_CODE_IDE_DEBUG_SUPPORT == 1) + if (_project.isShowConsole()) + { + [self openConsoleWindow]; + CCLOG("%s\n",Configuration::getInstance()->getInfo().c_str()); + } +#endif + float frameScale = _project.getFrameScale(); + + // get frame size + cocos2d::Size frameSize = _project.getFrameSize(); + ConfigParser::getInstance()->setInitViewSize(frameSize); + + // check screen workarea size + NSRect workarea = [NSScreen mainScreen].visibleFrame; + float workareaWidth = workarea.size.width; + float workareaHeight = workarea.size.height - [self titleBarHeight]; + CCLOG("WORKAREA WIDTH %0.2f, HEIGHT %0.2f", workareaWidth, workareaHeight); + while (true && frameScale > 0.25f) + { + if (frameSize.width * frameScale > workareaWidth || frameSize.height * frameScale > workareaHeight) + { + frameScale = frameScale - 0.25f; + } + else + { + break; + } + } + + if (frameScale < 0.25f) frameScale = 0.25f; + _project.setFrameScale(frameScale); + CCLOG("FRAME SCALE = %0.2f", frameScale); + + // check window offset + Vec2 pos = _project.getWindowOffset(); + if (pos.x < 0) pos.x = 0; + if (pos.y < 0) pos.y = 0; + + // create opengl view + const cocos2d::Rect frameRect = cocos2d::Rect(0, 0, frameSize.width, frameSize.height); + std::stringstream title; + title << "Cocos Simulator (" << _project.getFrameScale() * 100 << "%)"; + 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()]; + 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(); + auto window = _window; + dispatcher->addEventListenerWithFixedPriority(EventListenerCustom::create(kAppEventName, [&project, scaleMenuVector, window](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; + [SIMULATOR setZoom: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); + std::stringstream title; + title << "Cocos " << tr("Simulator") << " (" << _project.getFrameScale() * 100 << "%)"; + [_window setTitle:[NSString stringWithUTF8String:title.str().c_str()]]; +} + +- (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/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json new file mode 100755 index 0000000000..7a138cb477 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json @@ -0,0 +1,7 @@ +{ + "remove_res" : [ + "src", + "res", + "config.json" + ] +} diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/en.lproj/MainMenu.xib b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/en.lproj/MainMenu.xib new file mode 100755 index 0000000000..a803574695 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/en.lproj/MainMenu.xib @@ -0,0 +1,887 @@ + + + + 1060 + 13D65 + 5056 + 1265.20 + 698.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 5056 + + + NSCustomObject + NSMenu + NSMenuItem + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + AppController + + + FirstResponder + + + NSApplication + + + AMainMenu + + + + Cocos-player + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + + Cocos-player + + + + About Cocos-player + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide Cocos-player + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit Cocos-player + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + + Close + w + 1048576 + 2147483647 + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + + View + + + + YES + YES + + + 2147483647 + + + + + + Portait + + 2147483647 + 1 + + + + + + Landscape + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Actual (100%) + 0 + 1048576 + 2147483647 + 1 + + + 100 + + + + Zoom Out (75%) + 6 + 1048576 + 2147483647 + + + 75 + + + + Zoom Out (50%) + 5 + 1048576 + 2147483647 + + + 50 + + + + Zoom Out (25%) + 4 + 1048576 + 2147483647 + + + 25 + + + + + + + Control + + 2147483647 + + + submenuAction: + + + Control + + + + Relaunch + r + 1048576 + 2147483647 + + + + + + Keep Window Top + + 2147483647 + + + + + + + + + Help + + 2147483647 + + + submenuAction: + + + Help + + _NSHelpMenu + + + + _NSMainMenu + + + NSFontManager + + + AppController + + + + NO + + + + hide: + + + + SGN-0p-7lH + + + + hideOtherApplications: + + + + iJd-Ba-eXG + + + + unhideAllApplications: + + + + DR8-By-ymv + + + + terminate: + + + + DyL-yF-GYq + + + + delegate + + + + 537 + + + + menu + + + + 650 + + + + orderFrontStandardAboutPanel: + + + + tSA-7z-LPk + + + + onFileClose: + + + + 661 + + + + onScreenPortait: + + + + 667 + + + + onScreenLandscape: + + + + 647 + + + + onScreenZoomOut: + + + + yUj-fN-Rh7 + + + + onScreenZoomOut: + + + + yps-LZ-egB + + + + onScreenZoomOut: + + + + 654 + + + + onScreenZoomOut: + + + + DSu-if-D2T + + + + onRelaunch: + + + + XXg-eJ-YSn + + + + onSetTop: + + + + jvv-x1-KeN + + + + menu + + + + 550 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + + + + + + + + + + GS6-Lb-ftA + + + + + + + + YN2-V8-ty0 + + + + + + + + + + + + + + + + HhF-Es-coQ + + + + + OzD-Nm-tPt + + + + + TOj-vg-cDm + + + + + + + + e98-We-UX5 + + + + + muN-Hw-eeZ + + + + + sH6-na-PTL + + + + + XG8-CE-veT + + + + + IqD-3v-zQT + + + + + GU5-eI-OTq + + + + + 7Z7-ot-jqY + + + + + 83 + + + + + + + + 81 + + + + + + + + 611 + + + + + 295 + + + + + + Menu Item - View + + + 296 + + + + + + + + + + + + + Menu - View + + + 579 + + + + + 592 + + + + + 593 + + + + + 594 + + + + + 595 + + + + + pqR-xy-5ip + + + + + 596 + + + + + QB8-6D-hAr + + + + + Heh-SD-KHE + + + + + + + + ysx-9J-ekz + + + + + + + + + hfu-OP-8X3 + + + + + 490 + + + + + + + + 491 + + + + + 420 + + + + + 536 + + + + + CXy-V7-NaY + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + + + + + + AppController + NSObject + + id + id + id + id + id + id + id + + + + onFileClose: + id + + + onRelaunch: + id + + + onScreenLandscape: + id + + + onScreenPortait: + id + + + onScreenZoomOut: + id + + + onSetTop: + id + + + onViewChangeFrameSize: + id + + + + menu + NSMenu + + + menu + + menu + NSMenu + + + + IBProjectSource + ./Classes/AppController.h + + + + + 0 + IBCocoaFramework + YES + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + {11, 11} + {10, 3} + + + diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/main.m b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/main.m new file mode 100755 index 0000000000..658f0c14ee --- /dev/null +++ b/tools/simulator/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/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/ConsoleWindow.strings b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/ConsoleWindow.strings new file mode 100644 index 0000000000..f9518fdfd4 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/ConsoleWindow.strings @@ -0,0 +1,12 @@ + +/* Class = "NSWindow"; title = "Console"; ObjectID = "1"; */ +"1.title" = "控制台"; + +/* Class = "NSButtonCell"; title = "Clear"; ObjectID = "47"; */ +"47.title" = "清除"; + +/* Class = "NSButtonCell"; title = "scroll bottom"; ObjectID = "51"; */ +"51.title" = "自动滚动"; + +/* Class = "NSButtonCell"; title = "always top"; ObjectID = "61"; */ +"61.title" = "总在最前方"; diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/MainMenu.xib b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/MainMenu.xib new file mode 100755 index 0000000000..b610cf20e9 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/MainMenu.xib @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/simulator/frameworks/runtime-src/proj.ios_mac/simulator.xcodeproj/project.pbxproj b/tools/simulator/frameworks/runtime-src/proj.ios_mac/simulator.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..c5a2e406ed --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.ios_mac/simulator.xcodeproj/project.pbxproj @@ -0,0 +1,1039 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 15427CD3198F221400DC375D /* libcocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4251834BDA200142BE0 /* libcocos2d iOS.a */; }; + 15427CEE198F24AF00DC375D /* libcocos2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4171834BDA200142BE0 /* libcocos2d Mac.a */; }; + 15A8A4491834C64F00142BE0 /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810C17EBBCAC00990C9B /* Icon-114.png */; }; + 15A8A4881834C90F00142BE0 /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4871834C90E00142BE0 /* libcurl.dylib */; }; + 1AF4C403178663F200122817 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AF4C402178663F200122817 /* libz.dylib */; }; + 3EEEDB61197107C0006A9FF8 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EEEDB60197107C0006A9FF8 /* MediaPlayer.framework */; }; + 5023811817EBBCAC00990C9B /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5023810817EBBCAC00990C9B /* AppController.mm */; }; + 5023811917EBBCAC00990C9B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810917EBBCAC00990C9B /* Default-568h@2x.png */; }; + 5023811A17EBBCAC00990C9B /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810A17EBBCAC00990C9B /* Default.png */; }; + 5023811B17EBBCAC00990C9B /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810B17EBBCAC00990C9B /* Default@2x.png */; }; + 5023811D17EBBCAC00990C9B /* Icon-120.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810D17EBBCAC00990C9B /* Icon-120.png */; }; + 5023811E17EBBCAC00990C9B /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810E17EBBCAC00990C9B /* Icon-144.png */; }; + 5023811F17EBBCAC00990C9B /* Icon-152.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810F17EBBCAC00990C9B /* Icon-152.png */; }; + 5023812017EBBCAC00990C9B /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023811017EBBCAC00990C9B /* Icon-57.png */; }; + 5023812117EBBCAC00990C9B /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023811117EBBCAC00990C9B /* Icon-72.png */; }; + 5023812217EBBCAC00990C9B /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023811217EBBCAC00990C9B /* Icon-76.png */; }; + 5023812417EBBCAC00990C9B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5023811417EBBCAC00990C9B /* main.m */; }; + 5023812517EBBCAC00990C9B /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5023811717EBBCAC00990C9B /* RootViewController.mm */; }; + 5023813317EBBCE400990C9B /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F293BB7E15EB831F00256477 /* AppDelegate.cpp */; }; + 5023813717EBBCE400990C9B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AF4C402178663F200122817 /* libz.dylib */; }; + 5023813E17EBBCE400990C9B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3CC15EB7BE500256477 /* QuartzCore.framework */; }; + 5023814017EBBCE400990C9B /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D015EB7BE500256477 /* OpenAL.framework */; }; + 5023814117EBBCE400990C9B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D215EB7BE500256477 /* AudioToolbox.framework */; }; + 5023814417EBBCE400990C9B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D815EB7BE500256477 /* Foundation.framework */; }; + 5023814517EBBCE400990C9B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3DA15EB7BE500256477 /* CoreGraphics.framework */; }; + 5023817617EBBE3400990C9B /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5023817217EBBE3400990C9B /* Icon.icns */; }; + 5023817A17EBBE8300990C9B /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5023817917EBBE8300990C9B /* OpenGLES.framework */; }; + 50805AAF17EBBEAA004CFAD3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50805AAE17EBBEAA004CFAD3 /* UIKit.framework */; }; + 5091733617ECE17A00D62437 /* Icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733017ECE17A00D62437 /* Icon-29.png */; }; + 5091733717ECE17A00D62437 /* Icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733117ECE17A00D62437 /* Icon-40.png */; }; + 5091733817ECE17A00D62437 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733217ECE17A00D62437 /* Icon-50.png */; }; + 5091733917ECE17A00D62437 /* Icon-58.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733317ECE17A00D62437 /* Icon-58.png */; }; + 5091733A17ECE17A00D62437 /* Icon-80.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733417ECE17A00D62437 /* Icon-80.png */; }; + 5091733B17ECE17A00D62437 /* Icon-100.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733517ECE17A00D62437 /* Icon-100.png */; }; + 50D7C96C17EBBEDF005D0B91 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */; }; + 50D7C96E17EBBEE6005D0B91 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */; }; + 50D7C97017EBBEEC005D0B91 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */; }; + 5200BECA1A53D9A500AC45E4 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5200BEC91A53D9A500AC45E4 /* Security.framework */; }; + 521A8E7019F0C3D200D177D7 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6E19F0C3D200D177D7 /* Default-667h@2x.png */; }; + 521A8E7119F0C3D200D177D7 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6F19F0C3D200D177D7 /* Default-736h@3x.png */; }; + 87A2EC1E1AB34BEE00513747 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87A2EC1D1AB34BEE00513747 /* Security.framework */; }; + 9F7214271A5C1E4C00DAED06 /* libluacocos2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F7213E01A5C19ED00DAED06 /* libluacocos2d Mac.a */; }; + 9F7214281A5C1E5B00DAED06 /* libluacocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F7213E21A5C19ED00DAED06 /* libluacocos2d iOS.a */; }; + 9FB5D5F91A691342002361CA /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FB5D5F81A691342002361CA /* libsqlite3.dylib */; }; + 9FB5D6081A691774002361CA /* libjscocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FB5D5D61A68FA00002361CA /* libjscocos2d iOS.a */; }; + 9FB5D60A1A6917D8002361CA /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FB5D6091A6917D8002361CA /* libsqlite3.dylib */; }; + 9FB5D60E1A691A02002361CA /* libjscocos2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FB5D5D41A68FA00002361CA /* libjscocos2d Mac.a */; }; + 9FB6C05F1A69815100945236 /* lang in Resources */ = {isa = PBXBuildFile; fileRef = 9FB6C0571A69815100945236 /* lang */; }; + 9FB6C0601A69815100945236 /* lua_debugger.c in Sources */ = {isa = PBXBuildFile; fileRef = 9FB6C0581A69815100945236 /* lua_debugger.c */; }; + 9FB6C0611A69815100945236 /* lua_debugger.c in Sources */ = {isa = PBXBuildFile; fileRef = 9FB6C0581A69815100945236 /* lua_debugger.c */; }; + 9FB6C0621A69815100945236 /* RuntimeJsImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FB6C05A1A69815100945236 /* RuntimeJsImpl.cpp */; }; + 9FB6C0631A69815100945236 /* RuntimeJsImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FB6C05A1A69815100945236 /* RuntimeJsImpl.cpp */; }; + 9FB6C0641A69815100945236 /* RuntimeLuaImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FB6C05C1A69815100945236 /* RuntimeLuaImpl.cpp */; }; + 9FB6C0651A69815100945236 /* RuntimeLuaImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FB6C05C1A69815100945236 /* RuntimeLuaImpl.cpp */; }; + 9FD6FC0B1A5D27870028EDC6 /* libsimulator Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FD6FC081A5D26580028EDC6 /* libsimulator Mac.a */; settings = {ATTRIBUTES = (Required, ); }; }; + 9FD6FC0C1A5D278E0028EDC6 /* libsimulator iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FD6FC0A1A5D26580028EDC6 /* libsimulator iOS.a */; }; + 9FD6FC731A5D2A820028EDC6 /* ConsoleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FD6FC711A5D2A820028EDC6 /* ConsoleWindowController.m */; }; + 9FFC07361A4A764100AED399 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FFC07341A4A764100AED399 /* MainMenu.xib */; }; + C05D1C121923449100B808A4 /* config.json in Resources */ = {isa = PBXBuildFile; fileRef = C05D1C111923449100B808A4 /* config.json */; }; + C05D1C131923449100B808A4 /* config.json in Resources */ = {isa = PBXBuildFile; fileRef = C05D1C111923449100B808A4 /* config.json */; }; + C07828F818B4D72E00BD2287 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C07828F418B4D72E00BD2287 /* main.m */; }; + C07828FA18B4D72E00BD2287 /* SimulatorApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = C07828F718B4D72E00BD2287 /* SimulatorApp.mm */; }; + D6B061351803AC000077942B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B061341803AC000077942B /* CoreMotion.framework */; }; + DA96489E1A70F925001F41E8 /* ConsoleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA9648A01A70F925001F41E8 /* ConsoleWindow.xib */; }; + F293B3CD15EB7BE500256477 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3CC15EB7BE500256477 /* QuartzCore.framework */; }; + F293B3D115EB7BE500256477 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D015EB7BE500256477 /* OpenAL.framework */; }; + F293B3D315EB7BE500256477 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D215EB7BE500256477 /* AudioToolbox.framework */; }; + F293B3D515EB7BE500256477 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D415EB7BE500256477 /* AVFoundation.framework */; }; + F293B3D915EB7BE500256477 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D815EB7BE500256477 /* Foundation.framework */; }; + F293B3DB15EB7BE500256477 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3DA15EB7BE500256477 /* CoreGraphics.framework */; }; + F293BB9C15EB831F00256477 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F293BB7E15EB831F00256477 /* AppDelegate.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 15A8A4161834BDA200142BE0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1551A33F158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; + 15A8A4241834BDA200142BE0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4D641783777C0073F6A7; + remoteInfo = "cocos2dx iOS"; + }; + 15D1F3081994BBCA00302043 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4C241783777C0073F6A7; + remoteInfo = "libcocos2d iOS"; + }; + 9F7213DF1A5C19ED00DAED06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C03781AE18BF654500FE4F13 /* cocos2d_lua_bindings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 15C1C2CC198748D200A46ACC; + remoteInfo = "libluacocos2d Mac"; + }; + 9F7213E11A5C19ED00DAED06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C03781AE18BF654500FE4F13 /* cocos2d_lua_bindings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 15EFA616198B2DAA000C57D3; + remoteInfo = "libluacocos2d iOS"; + }; + 9F7214211A5C1D3A00DAED06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C03781AE18BF654500FE4F13 /* cocos2d_lua_bindings.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 15C1C255198748D200A46ACC; + remoteInfo = "libluacocos2d Mac"; + }; + 9F7214251A5C1D4200DAED06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C03781AE18BF654500FE4F13 /* cocos2d_lua_bindings.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 15EFA59E198B2DAA000C57D3; + remoteInfo = "libluacocos2d iOS"; + }; + 9F78A2531A89B7EA00EB22E3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FB5D5CE1A68F9FF002361CA /* cocos2d_js_bindings.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4FB5178387750073F6A7; + remoteInfo = "libjscocos2d iOS"; + }; + 9FB5D5D31A68FA00002361CA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FB5D5CE1A68F9FF002361CA /* cocos2d_js_bindings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1A5410A418B785A10016A3AF; + remoteInfo = "libjscocos2d Mac"; + }; + 9FB5D5D51A68FA00002361CA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FB5D5CE1A68F9FF002361CA /* cocos2d_js_bindings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1A5410A518B785A10016A3AF; + remoteInfo = "libjscocos2d iOS"; + }; + 9FB5D5E81A69054A002361CA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FB5D5CE1A68F9FF002361CA /* cocos2d_js_bindings.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F31E81781479B006731B9; + remoteInfo = "libjscocos2d Mac"; + }; + 9FD6FC071A5D26580028EDC6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FD6FC021A5D26580028EDC6 /* libsimulator.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9F7214351A5C271F00DAED06; + remoteInfo = libsimulator; + }; + 9FD6FC091A5D26580028EDC6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FD6FC021A5D26580028EDC6 /* libsimulator.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9F7214851A5C28BA00DAED06; + remoteInfo = libsimulator_iOS; + }; + 9FF504CB1A5EB19500AFDA55 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FD6FC021A5D26580028EDC6 /* libsimulator.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 9F7214841A5C28BA00DAED06; + remoteInfo = libsimulator_iOS; + }; + 9FF504CF1A5EB19900AFDA55 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FD6FC021A5D26580028EDC6 /* libsimulator.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 9F7214341A5C271F00DAED06; + remoteInfo = libsimulator; + }; + C0A2F04018975FF80072A7AB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 1551A33E158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 15427CE2198F237300DC375D /* lua_module_register.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lua_module_register.h; path = ../Classes/lua_module_register.h; sourceTree = ""; }; + 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../../../../../build/cocos2d_libs.xcodeproj; sourceTree = ""; }; + 15A8A4871834C90E00142BE0 /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; + 15C1568D1683131500D239F2 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../../../../cocos/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; + 1AF4C402178663F200122817 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + 3EB51526195187AF006966AA /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; + 3EEEDB60197107C0006A9FF8 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/MediaPlayer.framework; sourceTree = DEVELOPER_DIR; }; + 5023810717EBBCAC00990C9B /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = ""; }; + 5023810817EBBCAC00990C9B /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = ""; }; + 5023810917EBBCAC00990C9B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 5023810A17EBBCAC00990C9B /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 5023810B17EBBCAC00990C9B /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 5023810C17EBBCAC00990C9B /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = ""; }; + 5023810D17EBBCAC00990C9B /* Icon-120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-120.png"; sourceTree = ""; }; + 5023810E17EBBCAC00990C9B /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; + 5023810F17EBBCAC00990C9B /* Icon-152.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-152.png"; sourceTree = ""; }; + 5023811017EBBCAC00990C9B /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-57.png"; sourceTree = ""; }; + 5023811117EBBCAC00990C9B /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; + 5023811217EBBCAC00990C9B /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76.png"; sourceTree = ""; }; + 5023811317EBBCAC00990C9B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5023811417EBBCAC00990C9B /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 5023811517EBBCAC00990C9B /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; + 5023811617EBBCAC00990C9B /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; + 5023811717EBBCAC00990C9B /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RootViewController.mm; sourceTree = ""; }; + 5023816B17EBBCE400990C9B /* Simulator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Simulator.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5023817217EBBE3400990C9B /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; + 5023817317EBBE3400990C9B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5023817517EBBE3400990C9B /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; + 5023817917EBBE8300990C9B /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; }; + 50805AAE17EBBEAA004CFAD3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 5091733017ECE17A00D62437 /* Icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-29.png"; sourceTree = ""; }; + 5091733117ECE17A00D62437 /* Icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-40.png"; sourceTree = ""; }; + 5091733217ECE17A00D62437 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-50.png"; sourceTree = ""; }; + 5091733317ECE17A00D62437 /* Icon-58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-58.png"; sourceTree = ""; }; + 5091733417ECE17A00D62437 /* Icon-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-80.png"; sourceTree = ""; }; + 5091733517ECE17A00D62437 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-100.png"; sourceTree = ""; }; + 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 5200BEC91A53D9A500AC45E4 /* 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; }; + 521A8E6E19F0C3D200D177D7 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 521A8E6F19F0C3D200D177D7 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; + 87A2EC1D1AB34BEE00513747 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + 9FB5D5CE1A68F9FF002361CA /* cocos2d_js_bindings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_js_bindings.xcodeproj; path = "../../../../../cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj"; sourceTree = ""; }; + 9FB5D5F81A691342002361CA /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + 9FB5D5FA1A6915F6002361CA /* libjs_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjs_static.a; path = ../../../../../external/spidermonkey/prebuilt/mac/libjs_static.a; sourceTree = ""; }; + 9FB5D6091A6917D8002361CA /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/lib/libsqlite3.dylib; sourceTree = DEVELOPER_DIR; }; + 9FB5D60C1A69184C002361CA /* libjs_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjs_static.a; path = ../../../../../external/spidermonkey/prebuilt/ios/libjs_static.a; sourceTree = ""; }; + 9FB5D7321A692CF0002361CA /* js_module_register.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = js_module_register.h; path = ../Classes/js_module_register.h; sourceTree = ""; }; + 9FB6C0561A69815100945236 /* CodeIDESupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeIDESupport.h; sourceTree = ""; }; + 9FB6C0571A69815100945236 /* lang */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = lang; sourceTree = ""; }; + 9FB6C0581A69815100945236 /* lua_debugger.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lua_debugger.c; sourceTree = ""; }; + 9FB6C0591A69815100945236 /* lua_debugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_debugger.h; sourceTree = ""; }; + 9FB6C05A1A69815100945236 /* RuntimeJsImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeJsImpl.cpp; sourceTree = ""; }; + 9FB6C05B1A69815100945236 /* RuntimeJsImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeJsImpl.h; sourceTree = ""; }; + 9FB6C05C1A69815100945236 /* RuntimeLuaImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeLuaImpl.cpp; sourceTree = ""; }; + 9FB6C05D1A69815100945236 /* RuntimeLuaImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeLuaImpl.h; sourceTree = ""; }; + 9FD6FC021A5D26580028EDC6 /* libsimulator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libsimulator.xcodeproj; path = ../../../libsimulator/proj.ios_mac/libsimulator.xcodeproj; sourceTree = ""; }; + 9FD6FC701A5D2A820028EDC6 /* ConsoleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleWindowController.h; sourceTree = ""; }; + 9FD6FC711A5D2A820028EDC6 /* ConsoleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConsoleWindowController.m; sourceTree = ""; }; + 9FFC07351A4A764100AED399 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 9FFC07371A4A765100AED399 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "zh-Hans"; path = "zh-Hans.lproj/MainMenu.xib"; sourceTree = ""; }; + C03781AE18BF654500FE4F13 /* cocos2d_lua_bindings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_lua_bindings.xcodeproj; path = "../../../../../cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj"; sourceTree = ""; }; + C05D1C111923449100B808A4 /* config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = config.json; path = ../../../config.json; sourceTree = ""; }; + C07828F418B4D72E00BD2287 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + C07828F618B4D72E00BD2287 /* SimulatorApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimulatorApp.h; sourceTree = ""; }; + C07828F718B4D72E00BD2287 /* SimulatorApp.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimulatorApp.mm; sourceTree = ""; }; + D6B061341803AC000077942B /* 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; }; + DA96489F1A70F925001F41E8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ConsoleWindow.xib; sourceTree = ""; }; + DA9648A31A70F93D001F41E8 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/ConsoleWindow.strings"; sourceTree = ""; }; + F293B3C815EB7BE500256477 /* Simulator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Simulator.app; sourceTree = BUILT_PRODUCTS_DIR; }; + F293B3CC15EB7BE500256477 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + F293B3CE15EB7BE500256477 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + F293B3D015EB7BE500256477 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + F293B3D215EB7BE500256477 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + F293B3D415EB7BE500256477 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + F293B3D615EB7BE500256477 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + F293B3D815EB7BE500256477 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + F293B3DA15EB7BE500256477 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + F293BB7E15EB831F00256477 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AppDelegate.cpp; path = ../Classes/AppDelegate.cpp; sourceTree = ""; }; + F293BB7F15EB831F00256477 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ../Classes/AppDelegate.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5023813617EBBCE400990C9B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 87A2EC1E1AB34BEE00513747 /* Security.framework in Frameworks */, + 9FB5D60E1A691A02002361CA /* libjscocos2d Mac.a in Frameworks */, + 9FB5D5F91A691342002361CA /* libsqlite3.dylib in Frameworks */, + 9FD6FC0B1A5D27870028EDC6 /* libsimulator Mac.a in Frameworks */, + 9F7214271A5C1E4C00DAED06 /* libluacocos2d Mac.a in Frameworks */, + 15427CEE198F24AF00DC375D /* libcocos2d Mac.a in Frameworks */, + 15A8A4881834C90F00142BE0 /* libcurl.dylib in Frameworks */, + 50D7C97017EBBEEC005D0B91 /* IOKit.framework in Frameworks */, + 50D7C96E17EBBEE6005D0B91 /* AppKit.framework in Frameworks */, + 50D7C96C17EBBEDF005D0B91 /* OpenGL.framework in Frameworks */, + 5023813717EBBCE400990C9B /* libz.dylib in Frameworks */, + 5023813E17EBBCE400990C9B /* QuartzCore.framework in Frameworks */, + 5023814017EBBCE400990C9B /* OpenAL.framework in Frameworks */, + 5023814117EBBCE400990C9B /* AudioToolbox.framework in Frameworks */, + 5023814417EBBCE400990C9B /* Foundation.framework in Frameworks */, + 5023814517EBBCE400990C9B /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F293B3C515EB7BE500256477 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9FB5D60A1A6917D8002361CA /* libsqlite3.dylib in Frameworks */, + 9FB5D6081A691774002361CA /* libjscocos2d iOS.a in Frameworks */, + 9FD6FC0C1A5D278E0028EDC6 /* libsimulator iOS.a in Frameworks */, + 9F7214281A5C1E5B00DAED06 /* libluacocos2d iOS.a in Frameworks */, + 5200BECA1A53D9A500AC45E4 /* Security.framework in Frameworks */, + 15427CD3198F221400DC375D /* libcocos2d iOS.a in Frameworks */, + 3EEEDB61197107C0006A9FF8 /* MediaPlayer.framework in Frameworks */, + D6B061351803AC000077942B /* CoreMotion.framework in Frameworks */, + 1AF4C403178663F200122817 /* libz.dylib in Frameworks */, + 50805AAF17EBBEAA004CFAD3 /* UIKit.framework in Frameworks */, + 5023817A17EBBE8300990C9B /* OpenGLES.framework in Frameworks */, + F293B3CD15EB7BE500256477 /* QuartzCore.framework in Frameworks */, + F293B3D115EB7BE500256477 /* OpenAL.framework in Frameworks */, + F293B3D315EB7BE500256477 /* AudioToolbox.framework in Frameworks */, + F293B3D515EB7BE500256477 /* AVFoundation.framework in Frameworks */, + F293B3D915EB7BE500256477 /* Foundation.framework in Frameworks */, + F293B3DB15EB7BE500256477 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 15A8A4041834BDA200142BE0 /* Products */ = { + isa = PBXGroup; + children = ( + 15A8A4171834BDA200142BE0 /* libcocos2d Mac.a */, + 15A8A4251834BDA200142BE0 /* libcocos2d iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 5023810617EBBCAC00990C9B /* ios */ = { + isa = PBXGroup; + children = ( + 521A8E6E19F0C3D200D177D7 /* Default-667h@2x.png */, + 521A8E6F19F0C3D200D177D7 /* Default-736h@3x.png */, + 5023810717EBBCAC00990C9B /* AppController.h */, + 5023810817EBBCAC00990C9B /* AppController.mm */, + 5023810917EBBCAC00990C9B /* Default-568h@2x.png */, + 5023810A17EBBCAC00990C9B /* Default.png */, + 5023810B17EBBCAC00990C9B /* Default@2x.png */, + 5091734A17ECE18300D62437 /* Icons */, + 5023811317EBBCAC00990C9B /* Info.plist */, + 5023811417EBBCAC00990C9B /* main.m */, + 5023811517EBBCAC00990C9B /* Prefix.pch */, + 5023811617EBBCAC00990C9B /* RootViewController.h */, + 5023811717EBBCAC00990C9B /* RootViewController.mm */, + ); + path = ios; + sourceTree = ""; + }; + 5023817117EBBE3400990C9B /* mac */ = { + isa = PBXGroup; + children = ( + DA9648A01A70F925001F41E8 /* ConsoleWindow.xib */, + 9FD6FC701A5D2A820028EDC6 /* ConsoleWindowController.h */, + 9FD6FC711A5D2A820028EDC6 /* ConsoleWindowController.m */, + 5023817217EBBE3400990C9B /* Icon.icns */, + 9FFC07341A4A764100AED399 /* MainMenu.xib */, + C07828F418B4D72E00BD2287 /* main.m */, + C07828F618B4D72E00BD2287 /* SimulatorApp.h */, + C07828F718B4D72E00BD2287 /* SimulatorApp.mm */, + 5023817317EBBE3400990C9B /* Info.plist */, + 5023817517EBBE3400990C9B /* Prefix.pch */, + ); + path = mac; + sourceTree = ""; + }; + 5091734A17ECE18300D62437 /* Icons */ = { + isa = PBXGroup; + children = ( + 5091733017ECE17A00D62437 /* Icon-29.png */, + 5091733117ECE17A00D62437 /* Icon-40.png */, + 5091733217ECE17A00D62437 /* Icon-50.png */, + 5091733317ECE17A00D62437 /* Icon-58.png */, + 5091733417ECE17A00D62437 /* Icon-80.png */, + 5091733517ECE17A00D62437 /* Icon-100.png */, + 5023810C17EBBCAC00990C9B /* Icon-114.png */, + 5023810D17EBBCAC00990C9B /* Icon-120.png */, + 5023810E17EBBCAC00990C9B /* Icon-144.png */, + 5023810F17EBBCAC00990C9B /* Icon-152.png */, + 5023811017EBBCAC00990C9B /* Icon-57.png */, + 5023811117EBBCAC00990C9B /* Icon-72.png */, + 5023811217EBBCAC00990C9B /* Icon-76.png */, + ); + name = Icons; + sourceTree = ""; + }; + 9F7213DB1A5C19EC00DAED06 /* Products */ = { + isa = PBXGroup; + children = ( + 9F7213E01A5C19ED00DAED06 /* libluacocos2d Mac.a */, + 9F7213E21A5C19ED00DAED06 /* libluacocos2d iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 9FB5D5CF1A68F9FF002361CA /* Products */ = { + isa = PBXGroup; + children = ( + 9FB5D5D41A68FA00002361CA /* libjscocos2d Mac.a */, + 9FB5D5D61A68FA00002361CA /* libjscocos2d iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 9FB6C0551A69815100945236 /* ide-support */ = { + isa = PBXGroup; + children = ( + 9FB6C0561A69815100945236 /* CodeIDESupport.h */, + 9FB6C0571A69815100945236 /* lang */, + 9FB6C0581A69815100945236 /* lua_debugger.c */, + 9FB6C0591A69815100945236 /* lua_debugger.h */, + 9FB6C05A1A69815100945236 /* RuntimeJsImpl.cpp */, + 9FB6C05B1A69815100945236 /* RuntimeJsImpl.h */, + 9FB6C05C1A69815100945236 /* RuntimeLuaImpl.cpp */, + 9FB6C05D1A69815100945236 /* RuntimeLuaImpl.h */, + ); + name = "ide-support"; + path = "../Classes/ide-support"; + sourceTree = ""; + }; + 9FD6FC031A5D26580028EDC6 /* Products */ = { + isa = PBXGroup; + children = ( + 9FD6FC081A5D26580028EDC6 /* libsimulator Mac.a */, + 9FD6FC0A1A5D26580028EDC6 /* libsimulator iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + F293B3BD15EB7BE500256477 = { + isa = PBXGroup; + children = ( + 9FB5D5CE1A68F9FF002361CA /* cocos2d_js_bindings.xcodeproj */, + 9FD6FC021A5D26580028EDC6 /* libsimulator.xcodeproj */, + C03781AE18BF654500FE4F13 /* cocos2d_lua_bindings.xcodeproj */, + 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */, + 5023810617EBBCAC00990C9B /* ios */, + 5023817117EBBE3400990C9B /* mac */, + F293BB7C15EB830F00256477 /* Classes */, + F293B3CB15EB7BE500256477 /* Frameworks */, + F293B3C915EB7BE500256477 /* Products */, + F293BC4615EB859D00256477 /* Resources */, + ); + sourceTree = ""; + }; + F293B3C915EB7BE500256477 /* Products */ = { + isa = PBXGroup; + children = ( + F293B3C815EB7BE500256477 /* Simulator.app */, + 5023816B17EBBCE400990C9B /* Simulator.app */, + ); + name = Products; + sourceTree = ""; + }; + F293B3CB15EB7BE500256477 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 87A2EC1D1AB34BEE00513747 /* Security.framework */, + 9FB5D60C1A69184C002361CA /* libjs_static.a */, + 9FB5D6091A6917D8002361CA /* libsqlite3.dylib */, + 9FB5D5FA1A6915F6002361CA /* libjs_static.a */, + 9FB5D5F81A691342002361CA /* libsqlite3.dylib */, + 5200BEC91A53D9A500AC45E4 /* Security.framework */, + 3EEEDB60197107C0006A9FF8 /* MediaPlayer.framework */, + 3EB51526195187AF006966AA /* CFNetwork.framework */, + 15A8A4871834C90E00142BE0 /* libcurl.dylib */, + D6B061341803AC000077942B /* CoreMotion.framework */, + 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */, + 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */, + 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */, + 50805AAE17EBBEAA004CFAD3 /* UIKit.framework */, + 5023817917EBBE8300990C9B /* OpenGLES.framework */, + 1AF4C402178663F200122817 /* libz.dylib */, + 15C1568D1683131500D239F2 /* libcurl.a */, + F293B3CC15EB7BE500256477 /* QuartzCore.framework */, + F293B3CE15EB7BE500256477 /* OpenGLES.framework */, + F293B3D015EB7BE500256477 /* OpenAL.framework */, + F293B3D215EB7BE500256477 /* AudioToolbox.framework */, + F293B3D415EB7BE500256477 /* AVFoundation.framework */, + F293B3D615EB7BE500256477 /* UIKit.framework */, + F293B3D815EB7BE500256477 /* Foundation.framework */, + F293B3DA15EB7BE500256477 /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + F293BB7C15EB830F00256477 /* Classes */ = { + isa = PBXGroup; + children = ( + 9FB6C0551A69815100945236 /* ide-support */, + 15427CE2198F237300DC375D /* lua_module_register.h */, + 9FB5D7321A692CF0002361CA /* js_module_register.h */, + F293BB7E15EB831F00256477 /* AppDelegate.cpp */, + F293BB7F15EB831F00256477 /* AppDelegate.h */, + ); + name = Classes; + sourceTree = ""; + }; + F293BC4615EB859D00256477 /* Resources */ = { + isa = PBXGroup; + children = ( + C05D1C111923449100B808A4 /* config.json */, + ); + name = Resources; + path = ../Resources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 5023812617EBBCE400990C9B /* Simulator Mac */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5023816817EBBCE400990C9B /* Build configuration list for PBXNativeTarget "Simulator Mac" */; + buildPhases = ( + 5023813117EBBCE400990C9B /* Sources */, + 5023813617EBBCE400990C9B /* Frameworks */, + 5023814617EBBCE400990C9B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 9FB5D5E91A69054A002361CA /* PBXTargetDependency */, + 9FF504D01A5EB19900AFDA55 /* PBXTargetDependency */, + 9F7214221A5C1D3A00DAED06 /* PBXTargetDependency */, + C0A2F04118975FF80072A7AB /* PBXTargetDependency */, + ); + name = "Simulator Mac"; + productName = simulator; + productReference = 5023816B17EBBCE400990C9B /* Simulator.app */; + productType = "com.apple.product-type.application"; + }; + F293B3C715EB7BE500256477 /* Simulator iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = F293B6C415EB7BEA00256477 /* Build configuration list for PBXNativeTarget "Simulator iOS" */; + buildPhases = ( + F293B3C415EB7BE500256477 /* Sources */, + F293B3C515EB7BE500256477 /* Frameworks */, + F293B3C615EB7BE500256477 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 9F78A2541A89B7EA00EB22E3 /* PBXTargetDependency */, + 9FF504CC1A5EB19500AFDA55 /* PBXTargetDependency */, + 9F7214261A5C1D4200DAED06 /* PBXTargetDependency */, + 15D1F3091994BBCA00302043 /* PBXTargetDependency */, + ); + name = "Simulator iOS"; + productName = simulator; + productReference = F293B3C815EB7BE500256477 /* Simulator.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + F293B3BF15EB7BE500256477 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + TargetAttributes = { + F293B3C715EB7BE500256477 = { + DevelopmentTeam = MDDB52YB8L; + }; + }; + }; + buildConfigurationList = F293B3C215EB7BE500256477 /* Build configuration list for PBXProject "simulator" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + "zh-Hans", + ); + mainGroup = F293B3BD15EB7BE500256477; + productRefGroup = F293B3C915EB7BE500256477 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 9FB5D5CF1A68F9FF002361CA /* Products */; + ProjectRef = 9FB5D5CE1A68F9FF002361CA /* cocos2d_js_bindings.xcodeproj */; + }, + { + ProductGroup = 15A8A4041834BDA200142BE0 /* Products */; + ProjectRef = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; + }, + { + ProductGroup = 9F7213DB1A5C19EC00DAED06 /* Products */; + ProjectRef = C03781AE18BF654500FE4F13 /* cocos2d_lua_bindings.xcodeproj */; + }, + { + ProductGroup = 9FD6FC031A5D26580028EDC6 /* Products */; + ProjectRef = 9FD6FC021A5D26580028EDC6 /* libsimulator.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + F293B3C715EB7BE500256477 /* Simulator iOS */, + 5023812617EBBCE400990C9B /* Simulator Mac */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 15A8A4171834BDA200142BE0 /* libcocos2d Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2d Mac.a"; + remoteRef = 15A8A4161834BDA200142BE0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 15A8A4251834BDA200142BE0 /* libcocos2d iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2d iOS.a"; + remoteRef = 15A8A4241834BDA200142BE0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 9F7213E01A5C19ED00DAED06 /* libluacocos2d Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libluacocos2d Mac.a"; + remoteRef = 9F7213DF1A5C19ED00DAED06 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 9F7213E21A5C19ED00DAED06 /* libluacocos2d iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libluacocos2d iOS.a"; + remoteRef = 9F7213E11A5C19ED00DAED06 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 9FB5D5D41A68FA00002361CA /* libjscocos2d Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libjscocos2d Mac.a"; + remoteRef = 9FB5D5D31A68FA00002361CA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 9FB5D5D61A68FA00002361CA /* libjscocos2d iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libjscocos2d iOS.a"; + remoteRef = 9FB5D5D51A68FA00002361CA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 9FD6FC081A5D26580028EDC6 /* libsimulator Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libsimulator Mac.a"; + remoteRef = 9FD6FC071A5D26580028EDC6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 9FD6FC0A1A5D26580028EDC6 /* libsimulator iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libsimulator iOS.a"; + remoteRef = 9FD6FC091A5D26580028EDC6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 5023814617EBBCE400990C9B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9FB6C05F1A69815100945236 /* lang in Resources */, + DA96489E1A70F925001F41E8 /* ConsoleWindow.xib in Resources */, + 5023817617EBBE3400990C9B /* Icon.icns in Resources */, + 9FFC07361A4A764100AED399 /* MainMenu.xib in Resources */, + C05D1C131923449100B808A4 /* config.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F293B3C615EB7BE500256477 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15A8A4491834C64F00142BE0 /* Icon-114.png in Resources */, + 5023811D17EBBCAC00990C9B /* Icon-120.png in Resources */, + 5091733B17ECE17A00D62437 /* Icon-100.png in Resources */, + 5023811B17EBBCAC00990C9B /* Default@2x.png in Resources */, + 5091733617ECE17A00D62437 /* Icon-29.png in Resources */, + 5023811917EBBCAC00990C9B /* Default-568h@2x.png in Resources */, + 5091733917ECE17A00D62437 /* Icon-58.png in Resources */, + 5023811F17EBBCAC00990C9B /* Icon-152.png in Resources */, + 5023812017EBBCAC00990C9B /* Icon-57.png in Resources */, + 521A8E7019F0C3D200D177D7 /* Default-667h@2x.png in Resources */, + 5023812217EBBCAC00990C9B /* Icon-76.png in Resources */, + 5091733A17ECE17A00D62437 /* Icon-80.png in Resources */, + 5091733717ECE17A00D62437 /* Icon-40.png in Resources */, + 5023811E17EBBCAC00990C9B /* Icon-144.png in Resources */, + 5023811A17EBBCAC00990C9B /* Default.png in Resources */, + 5091733817ECE17A00D62437 /* Icon-50.png in Resources */, + 5023812117EBBCAC00990C9B /* Icon-72.png in Resources */, + C05D1C121923449100B808A4 /* config.json in Resources */, + 521A8E7119F0C3D200D177D7 /* Default-736h@3x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5023813117EBBCE400990C9B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C07828FA18B4D72E00BD2287 /* SimulatorApp.mm in Sources */, + 9FB6C0631A69815100945236 /* RuntimeJsImpl.cpp in Sources */, + 9FB6C0611A69815100945236 /* lua_debugger.c in Sources */, + 5023813317EBBCE400990C9B /* AppDelegate.cpp in Sources */, + 9FD6FC731A5D2A820028EDC6 /* ConsoleWindowController.m in Sources */, + 9FB6C0651A69815100945236 /* RuntimeLuaImpl.cpp in Sources */, + C07828F818B4D72E00BD2287 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F293B3C415EB7BE500256477 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5023812517EBBCAC00990C9B /* RootViewController.mm in Sources */, + 9FB6C0621A69815100945236 /* RuntimeJsImpl.cpp in Sources */, + 9FB6C0601A69815100945236 /* lua_debugger.c in Sources */, + F293BB9C15EB831F00256477 /* AppDelegate.cpp in Sources */, + 5023812417EBBCAC00990C9B /* main.m in Sources */, + 9FB6C0641A69815100945236 /* RuntimeLuaImpl.cpp in Sources */, + 5023811817EBBCAC00990C9B /* AppController.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 15D1F3091994BBCA00302043 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libcocos2d iOS"; + targetProxy = 15D1F3081994BBCA00302043 /* PBXContainerItemProxy */; + }; + 9F7214221A5C1D3A00DAED06 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libluacocos2d Mac"; + targetProxy = 9F7214211A5C1D3A00DAED06 /* PBXContainerItemProxy */; + }; + 9F7214261A5C1D4200DAED06 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libluacocos2d iOS"; + targetProxy = 9F7214251A5C1D4200DAED06 /* PBXContainerItemProxy */; + }; + 9F78A2541A89B7EA00EB22E3 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libjscocos2d iOS"; + targetProxy = 9F78A2531A89B7EA00EB22E3 /* PBXContainerItemProxy */; + }; + 9FB5D5E91A69054A002361CA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libjscocos2d Mac"; + targetProxy = 9FB5D5E81A69054A002361CA /* PBXContainerItemProxy */; + }; + 9FF504CC1A5EB19500AFDA55 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = libsimulator_iOS; + targetProxy = 9FF504CB1A5EB19500AFDA55 /* PBXContainerItemProxy */; + }; + 9FF504D01A5EB19900AFDA55 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = libsimulator; + targetProxy = 9FF504CF1A5EB19900AFDA55 /* PBXContainerItemProxy */; + }; + C0A2F04118975FF80072A7AB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx Mac"; + targetProxy = C0A2F04018975FF80072A7AB /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 9FFC07341A4A764100AED399 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 9FFC07351A4A764100AED399 /* Base */, + 9FFC07371A4A765100AED399 /* zh-Hans */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; + DA9648A01A70F925001F41E8 /* ConsoleWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + DA96489F1A70F925001F41E8 /* Base */, + DA9648A31A70F93D001F41E8 /* zh-Hans */, + ); + name = ConsoleWindow.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 5023816917EBBCE400990C9B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + GLFW_EXPOSE_NATIVE_COCOA, + GLFW_EXPOSE_NATIVE_NSGL, + CC_TARGET_OS_MAC, + ); + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../Classes", + "$(SRCROOT)/../../../libsimulator/lib", + "$(SRCROOT)/../../../libsimulator/lib/protobuf-lite", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 10.8; + OTHER_LDFLAGS = ( + "-image_base", + 100000000, + "-pagezero_size", + 10000, + ); + PRODUCT_NAME = Simulator; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../../../../cocos/platform/mac $(SRCROOT)/../../../../../external/glfw3/include/mac"; + VALID_ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + }; + name = Debug; + }; + 5023816A17EBBCE400990C9B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + GLFW_EXPOSE_NATIVE_COCOA, + GLFW_EXPOSE_NATIVE_NSGL, + CC_TARGET_OS_MAC, + ); + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../Classes", + "$(SRCROOT)/../../../libsimulator/lib", + "$(SRCROOT)/../../../libsimulator/lib/protobuf-lite", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 10.8; + OTHER_LDFLAGS = ( + "-image_base", + 100000000, + "-pagezero_size", + 10000, + ); + PRODUCT_NAME = Simulator; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../../../../cocos/platform/mac $(SRCROOT)/../../../../../external/glfw3/include/mac"; + VALID_ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + }; + name = Release; + }; + F293B6C215EB7BEA00256477 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + 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, + "CC_LUA_ENGINE_ENABLED=1", + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + COCOS2D_JAVASCRIPT, + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + MACOSX_DEPLOYMENT_TARGET = 10.8; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../../../ $(SRCROOT)/../../../../../cocos $(SRCROOT)/../../../../../cocos/base $(SRCROOT)/../../../../../cocos/physics $(SRCROOT)/../../../../../cocos/math/kazmath $(SRCROOT)/../../../../../cocos/2d $(SRCROOT)/../../../../../cocos/ui $(SRCROOT)/../../../../../cocos/network $(SRCROOT)/../../../../../cocos/audio/include $(SRCROOT)/../../../../../cocos/editor-support $(SRCROOT)/../../../../../extensions $(SRCROOT)/../../../../../external $(SRCROOT)/../../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../../external/lua/luajit/include $(SRCROOT)/../../../../../external/lua/tolua $(SRCROOT)/../../../../../cocos/scripting/lua-bindings/manual $(SRCROOT)/../../../../../cocos/scripting/lua-bindings/auto $(SRCROOT)/../../../../../cocos/scripting/js-bindings/auto $(SRCROOT)/../../../../../cocos/scripting/js-bindings/manual $(SRCROOT)/../../../../../external/spidermonkey/include/mac"; + VALID_ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + }; + name = Debug; + }; + F293B6C315EB7BEA00256477 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "COCOS2D_DEBUG=1", + USE_FILE32API, + "CC_LUA_ENGINE_ENABLED=1", + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + COCOS2D_JAVASCRIPT, + NDEBUG, + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + MACOSX_DEPLOYMENT_TARGET = 10.8; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../../../ $(SRCROOT)/../../../../../cocos $(SRCROOT)/../../../../../cocos/base $(SRCROOT)/../../../../../cocos/physics $(SRCROOT)/../../../../../cocos/math/kazmath $(SRCROOT)/../../../../../cocos/2d $(SRCROOT)/../../../../../cocos/ui $(SRCROOT)/../../../../../cocos/network $(SRCROOT)/../../../../../cocos/audio/include $(SRCROOT)/../../../../../cocos/editor-support $(SRCROOT)/../../../../../extensions $(SRCROOT)/../../../../../external $(SRCROOT)/../../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../../external/lua/luajit/include $(SRCROOT)/../../../../../external/lua/tolua $(SRCROOT)/../../../../../cocos/scripting/lua-bindings/manual $(SRCROOT)/../../../../../cocos/scripting/lua-bindings/auto $(SRCROOT)/../../../../../cocos/scripting/js-bindings/auto $(SRCROOT)/../../../../../cocos/scripting/js-bindings/manual $(SRCROOT)/../../../../../external/spidermonkey/include/mac"; + VALIDATE_PRODUCT = YES; + VALID_ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + }; + name = Release; + }; + F293B6C515EB7BEA00256477 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = ( + armv7, + arm64, + ); + CODE_SIGN_IDENTITY = "iPhone Developer: wang zhe (UTF8Q753X4)"; + 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)", + ); + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../Classes", + "$(SRCROOT)/../../../libsimulator/lib", + "$(SRCROOT)/../../../libsimulator/lib/protobuf-lite", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; + LIBRARY_SEARCH_PATHS = ""; + PRODUCT_NAME = Simulator; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../../../../cocos/platform/ios $(SRCROOT)/../../../../../external/curl/include/ios"; + VALID_ARCHS = "armv7 arm64"; + }; + name = Debug; + }; + F293B6C615EB7BEA00256477 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = ( + armv7, + arm64, + ); + CODE_SIGN_IDENTITY = "iPhone Developer: wang zhe (UTF8Q753X4)"; + COMPRESS_PNG_FILES = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + CC_TARGET_OS_IPHONE, + "$(inherited)", + ); + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../Classes", + "$(SRCROOT)/../../../libsimulator/lib", + "$(SRCROOT)/../../../libsimulator/lib/protobuf-lite", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; + LIBRARY_SEARCH_PATHS = ""; + PRODUCT_NAME = Simulator; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../../../../cocos/platform/ios $(SRCROOT)/../../../../../external/curl/include/ios"; + VALID_ARCHS = "armv7 arm64"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5023816817EBBCE400990C9B /* Build configuration list for PBXNativeTarget "Simulator Mac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5023816917EBBCE400990C9B /* Debug */, + 5023816A17EBBCE400990C9B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F293B3C215EB7BE500256477 /* Build configuration list for PBXProject "simulator" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F293B6C215EB7BEA00256477 /* Debug */, + F293B6C315EB7BEA00256477 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F293B6C415EB7BEA00256477 /* Build configuration list for PBXNativeTarget "Simulator iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F293B6C515EB7BEA00256477 /* Debug */, + F293B6C615EB7BEA00256477 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = F293B3BF15EB7BE500256477 /* Project object */; +} diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.cpp b/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.cpp new file mode 100644 index 0000000000..16bf32bb20 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.cpp @@ -0,0 +1,1056 @@ + +#pragma comment(lib, "comctl32.lib") +#pragma comment(linker, "\"/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'\"") + +#include "stdafx.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SimulatorWin.h" + +#include "glfw3.h" +#include "glfw3native.h" + +#include "AppEvent.h" +#include "AppLang.h" +#include "runtime/ConfigParser.h" +#include "runtime/Runtime.h" + +#include "platform/win32/PlayerWin.h" +#include "platform/win32/PlayerMenuServiceWin.h" + +#include "resource.h" + +USING_NS_CC; + +static WNDPROC g_oldWindowProc = NULL; +INT_PTR CALLBACK AboutDialogCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + LOGFONT lf; + HFONT hFont; + + UNREFERENCED_PARAMETER(lParam); + switch (message) + { + case WM_INITDIALOG: + ZeroMemory(&lf, sizeof(LOGFONT)); + lf.lfHeight = 24; + lf.lfWeight = 200; + _tcscpy(lf.lfFaceName, _T("Arial")); + + hFont = CreateFontIndirect(&lf); + if ((HFONT)0 != hFont) + { + SendMessage(GetDlgItem(hDlg, IDC_ABOUT_TITLE), WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE); + } + return (INT_PTR)TRUE; + + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) + { + EndDialog(hDlg, LOWORD(wParam)); + return (INT_PTR)TRUE; + } + break; + } + return (INT_PTR)FALSE; +} +void onHelpAbout() +{ + DialogBox(GetModuleHandle(NULL), + MAKEINTRESOURCE(IDD_DIALOG_ABOUT), + Director::getInstance()->getOpenGLView()->getWin32Window(), + AboutDialogCallback); +} + +void shutDownApp() +{ + auto glview = dynamic_cast (Director::getInstance()->getOpenGLView()); + HWND hWnd = glview->getWin32Window(); + ::SendMessage(hWnd, WM_CLOSE, NULL, NULL); +} + +std::string getCurAppPath(void) +{ + TCHAR szAppDir[MAX_PATH] = {0}; + if (!GetModuleFileName(NULL, szAppDir, MAX_PATH)) + return ""; + int nEnd = 0; + for (int i = 0; szAppDir[i]; i++) + { + if (szAppDir[i] == '\\') + nEnd = i; + } + szAppDir[nEnd] = 0; + int iLen = 2 * wcslen(szAppDir); + char* chRtn = new char[iLen + 1]; + wcstombs(chRtn, szAppDir, iLen + 1); + std::string strPath = chRtn; + delete[] chRtn; + chRtn = NULL; + char fuldir[MAX_PATH] = {0}; + _fullpath(fuldir, strPath.c_str(), MAX_PATH); + return fuldir; +} + +static bool stringEndWith(const std::string str, const std::string needle) +{ + if (str.length() >= needle.length()) + { + return (0 == str.compare(str.length() - needle.length(), needle.length(), needle)); + } + return false; +} + +static void 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); +} + +SimulatorWin *SimulatorWin::_instance = nullptr; + +SimulatorWin *SimulatorWin::getInstance() +{ + if (!_instance) + { + _instance = new SimulatorWin(); + } + return _instance; +} + +SimulatorWin::SimulatorWin() + : _app(nullptr) + , _hwnd(NULL) + , _hwndConsole(NULL) + , _writeDebugLogFile(nullptr) +{ +} + +SimulatorWin::~SimulatorWin() +{ + CC_SAFE_DELETE(_app); + if (_writeDebugLogFile) + { + fclose(_writeDebugLogFile); + } +} + +void SimulatorWin::quit() +{ + Director::getInstance()->end(); +} + +void SimulatorWin::relaunch() +{ + _project.setWindowOffset(Vec2(getPositionX(), getPositionY())); + openNewPlayerWithProjectConfig(_project); + + quit(); +} + +void SimulatorWin::openNewPlayer() +{ + openNewPlayerWithProjectConfig(_project); +} + +void SimulatorWin::openNewPlayerWithProjectConfig(const ProjectConfig &config) +{ + static long taskid = 100; + stringstream buf; + buf << taskid++; + + string commandLine; + commandLine.append(getApplicationExePath()); + commandLine.append(" "); + commandLine.append(config.makeCommandLine()); + + CCLOG("SimulatorWin::openNewPlayerWithProjectConfig(): %s", commandLine.c_str()); + + // http://msdn.microsoft.com/en-us/library/windows/desktop/ms682499(v=vs.85).aspx + SECURITY_ATTRIBUTES sa = {0}; + sa.nLength = sizeof(sa); + + PROCESS_INFORMATION pi = {0}; + STARTUPINFO si = {0}; + si.cb = sizeof(STARTUPINFO); + +#define MAX_COMMAND 1024 // lenth of commandLine is always beyond MAX_PATH + + WCHAR command[MAX_COMMAND]; + memset(command, 0, sizeof(command)); + MultiByteToWideChar(CP_UTF8, 0, commandLine.c_str(), -1, command, MAX_COMMAND); + + BOOL success = CreateProcess(NULL, + command, // command line + NULL, // process security attributes + NULL, // primary thread security attributes + FALSE, // handles are inherited + 0, // creation flags + NULL, // use parent's environment + NULL, // use parent's current directory + &si, // STARTUPINFO pointer + &pi); // receives PROCESS_INFORMATION + + if (!success) + { + CCLOG("PlayerTaskWin::run() - create process failed, for execute %s", commandLine.c_str()); + } +} + +void SimulatorWin::openProjectWithProjectConfig(const ProjectConfig &config) +{ + openNewPlayerWithProjectConfig(config); + quit(); +} + +int SimulatorWin::getPositionX() +{ + RECT rect; + GetWindowRect(_hwnd, &rect); + return rect.left; +} + +int SimulatorWin::getPositionY() +{ + RECT rect; + GetWindowRect(_hwnd, &rect); + return rect.top; +} + +int SimulatorWin::run() +{ + INITCOMMONCONTROLSEX InitCtrls; + InitCtrls.dwSize = sizeof(InitCtrls); + InitCtrls.dwICC = ICC_WIN95_CLASSES; + InitCommonControlsEx(&InitCtrls); + + parseCocosProjectConfig(_project); + + // load project config from command line args + vector args; + for (int i = 0; i < __argc; ++i) + { + wstring ws(__wargv[i]); + string s; + s.assign(ws.begin(), ws.end()); + args.push_back(s); + } + _project.parseCommandLine(args); + + if (_project.getProjectDir().empty()) + { + if (args.size() == 2) + { + // for Code IDE before RC2 + _project.setProjectDir(args.at(1)); + _project.setDebuggerType(kCCRuntimeDebuggerCodeIDE); + } + } + + // create the application instance + _app = new AppDelegate(); + RuntimeEngine::getInstance()->setProjectConfig(_project); + + // create console window + if (_project.isShowConsole()) + { + AllocConsole(); + _hwndConsole = GetConsoleWindow(); + if (_hwndConsole != NULL) + { + ShowWindow(_hwndConsole, SW_SHOW); + BringWindowToTop(_hwndConsole); + freopen("CONOUT$", "wt", stdout); + freopen("CONOUT$", "wt", stderr); + + HMENU hmenu = GetSystemMenu(_hwndConsole, FALSE); + if (hmenu != NULL) + { + DeleteMenu(hmenu, SC_CLOSE, MF_BYCOMMAND); + } + } + } + + // log file + if (_project.isWriteDebugLogToFile()) + { + const string debugLogFilePath = _project.getDebugLogFilePath(); + _writeDebugLogFile = fopen(debugLogFilePath.c_str(), "w"); + if (!_writeDebugLogFile) + { + CCLOG("Cannot create debug log file %s", debugLogFilePath.c_str()); + } + } + + // set environments + SetCurrentDirectoryA(_project.getProjectDir().c_str()); + FileUtils::getInstance()->setDefaultResourceRootPath(_project.getProjectDir()); + FileUtils::getInstance()->setWritablePath(_project.getWritableRealPath().c_str()); + + // check screen DPI + HDC screen = GetDC(0); + int dpi = GetDeviceCaps(screen, LOGPIXELSX); + ReleaseDC(0, screen); + + // set scale with DPI + // 96 DPI = 100 % scaling + // 120 DPI = 125 % scaling + // 144 DPI = 150 % scaling + // 192 DPI = 200 % scaling + // http://msdn.microsoft.com/en-us/library/windows/desktop/dn469266%28v=vs.85%29.aspx#dpi_and_the_desktop_scaling_factor + // + // enable DPI-Aware with DeclareDPIAware.manifest + // http://msdn.microsoft.com/en-us/library/windows/desktop/dn469266%28v=vs.85%29.aspx#declaring_dpi_awareness + float screenScale = 1.0f; + if (dpi >= 120 && dpi < 144) + { + screenScale = 1.25f; + } + else if (dpi >= 144 && dpi < 192) + { + screenScale = 1.5f; + } + else if (dpi >= 192) + { + screenScale = 2.0f; + } + CCLOG("SCREEN DPI = %d, SCREEN SCALE = %0.2f", dpi, screenScale); + + // check scale + Size frameSize = _project.getFrameSize(); + float frameScale = 1.0f; + if (_project.isRetinaDisplay()) + { + frameSize.width *= screenScale; + frameSize.height *= screenScale; + } + else + { + frameScale = screenScale; + } + + // check screen workarea + RECT workareaSize; + if (SystemParametersInfo(SPI_GETWORKAREA, NULL, &workareaSize, NULL)) + { + float workareaWidth = fabsf(workareaSize.right - workareaSize.left); + float workareaHeight = fabsf(workareaSize.bottom - workareaSize.top); + float frameBorderCX = GetSystemMetrics(SM_CXSIZEFRAME); + float frameBorderCY = GetSystemMetrics(SM_CYSIZEFRAME); + workareaWidth -= frameBorderCX * 2; + workareaHeight -= (frameBorderCY * 2 + GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYMENU)); + CCLOG("WORKAREA WIDTH %0.2f, HEIGHT %0.2f", workareaWidth, workareaHeight); + while (true && frameScale > 0.25f) + { + if (frameSize.width * frameScale > workareaWidth || frameSize.height * frameScale > workareaHeight) + { + frameScale = frameScale - 0.25f; + } + else + { + break; + } + } + + if (frameScale < 0.25f) frameScale = 0.25f; + } + _project.setFrameScale(frameScale); + CCLOG("FRAME SCALE = %0.2f", frameScale); + + // create opengl view + const Rect frameRect = Rect(0, 0, frameSize.width, frameSize.height); + ConfigParser::getInstance()->setInitViewSize(frameSize); + const bool isResize = _project.isResizeWindow(); + std::stringstream title; + title << "Cocos Simulator (" << _project.getFrameScale() * 100 << "%)"; + initGLContextAttrs(); + auto glview = GLViewImpl::createWithRect(title.str(), frameRect, frameScale); + _hwnd = glview->getWin32Window(); + player::PlayerWin::createWithHwnd(_hwnd); + DragAcceptFiles(_hwnd, TRUE); + //SendMessage(_hwnd, WM_SETICON, ICON_BIG, (LPARAM)icon); + //SendMessage(_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); + //FreeResource(icon); + + // path for looking Lang file, Studio Default images + FileUtils::getInstance()->addSearchPath(getApplicationPath().c_str()); + + auto director = Director::getInstance(); + director->setOpenGLView(glview); + + director->setAnimationInterval(1.0 / 60.0); + + // set window position + if (_project.getProjectDir().length()) + { + setZoom(_project.getFrameScale()); + } + Vec2 pos = _project.getWindowOffset(); + if (pos.x != 0 && pos.y != 0) + { + RECT rect; + GetWindowRect(_hwnd, &rect); + MoveWindow(_hwnd, pos.x, pos.y, rect.right - rect.left, rect.bottom - rect.top, FALSE); + } + + // init player services + setupUI(); + DrawMenuBar(_hwnd); + + // prepare + FileUtils::getInstance()->setPopupNotify(false); + _project.dump(); + auto app = Application::getInstance(); + + g_oldWindowProc = (WNDPROC)SetWindowLong(_hwnd, GWL_WNDPROC, (LONG)SimulatorWin::windowProc); + + // update window title + updateWindowTitle(); + + // startup message loop + return app->run(); +} + +// services + +void SimulatorWin::setupUI() +{ + auto menuBar = player::PlayerProtocol::getInstance()->getMenuService(); + + // FILE + menuBar->addItem("FILE_MENU", tr("File")); + menuBar->addItem("OPEN_FILE_MENU", tr("Open File") + "...", "FILE_MENU"); + menuBar->addItem("OPEN_PROJECT_MENU", tr("Open Project") + "...", "FILE_MENU"); + menuBar->addItem("FILE_MENU_SEP1", "-", "FILE_MENU"); + menuBar->addItem("EXIT_MENU", tr("Exit"), "FILE_MENU"); + + // 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); + } + } + + // About + menuBar->addItem("HELP_MENU", tr("Help")); + menuBar->addItem("ABOUT_MENUITEM", tr("About"), "HELP_MENU"); + + 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 scale200Menu = menuBar->addItem("VIEW_SCALE_MENU_200", tr("Zoom Out").append(" (200%)"), "VIEW_MENU"); + auto scale175Menu = menuBar->addItem("VIEW_SCALE_MENU_175", tr("Zoom Out").append(" (175%)"), "VIEW_MENU"); + auto scale150Menu = menuBar->addItem("VIEW_SCALE_MENU_150", tr("Zoom Out").append(" (150%)"), "VIEW_MENU"); + auto scale125Menu = menuBar->addItem("VIEW_SCALE_MENU_125", tr("Zoom Out").append(" (125%)"), "VIEW_MENU"); + auto scale100Menu = menuBar->addItem("VIEW_SCALE_MENU_100", tr("Zoom Out").append(" (100%)"), "VIEW_MENU"); + auto scale75Menu = menuBar->addItem("VIEW_SCALE_MENU_75", tr("Zoom Out").append(" (75%)"), "VIEW_MENU"); + auto scale50Menu = menuBar->addItem("VIEW_SCALE_MENU_50", tr("Zoom Out").append(" (50%)"), "VIEW_MENU"); + auto scale25Menu = menuBar->addItem("VIEW_SCALE_MENU_25", tr("Zoom Out").append(" (25%)"), "VIEW_MENU"); + int frameScale = int(_project.getFrameScale() * 100); + + if (frameScale == 200) + { + scale200Menu->setChecked(true); + } + else if (frameScale == 175) + { + scale175Menu->setChecked(true); + } + else if (frameScale == 150) + { + scale150Menu->setChecked(true); + } + else if (frameScale == 125) + { + scale125Menu->setChecked(true); + } + else 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(scale200Menu); + scaleMenuVector.push_back(scale175Menu); + scaleMenuVector.push_back(scale150Menu); + scaleMenuVector.push_back(scale125Menu); + 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"); + + HWND &hwnd = _hwnd; + ProjectConfig &project = _project; + auto dispatcher = Director::getInstance()->getEventDispatcher(); + dispatcher->addEventListenerWithFixedPriority(EventListenerCustom::create("APP.EVENT", [&project, &hwnd, 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")) + { + _instance->quit(); + } + else if (data == "REFRESH_MENU") + { + _instance->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); + + _instance->setZoom(scale); + + // update scale menu state + for (auto &it : scaleMenuVector) + { + it->setChecked(false); + } + menuItem->setChecked(true); + + // update window title + _instance->updateWindowTitle(); + + // update window size + RECT rect; + GetWindowRect(hwnd, &rect); + MoveWindow(hwnd, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top + GetSystemMetrics(SM_CYMENU), FALSE); + + // fix: can not update window on some windows system + ::SendMessage(hwnd, WM_MOVE, NULL, NULL); + } + 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)); + project.setWindowOffset(cocos2d::Vec2(_instance->getPositionX(), _instance->getPositionY())); + _instance->openProjectWithProjectConfig(project); + } + else if (data == "DIRECTION_PORTRAIT_MENU") + { + project.changeFrameOrientationToPortait(); + _instance->openProjectWithProjectConfig(project); + } + else if (data == "DIRECTION_LANDSCAPE_MENU") + { + project.changeFrameOrientationToLandscape(); + _instance->openProjectWithProjectConfig(project); + } + else if (data == "OPEN_FILE_MENU") + { + auto fileDialog = player::PlayerProtocol::getInstance()->getFileDialogService(); + stringstream extensions; + extensions << "All Support File|config.json,*.csd,*csd;" + << "Project Config File|config.json;" + << "Cocos Studio File|*.csd;" + << "Cocos Studio Binary File|*.csb"; + auto entry = fileDialog->openFile(tr("Choose File"), "", extensions.str()); + + _instance->onOpenFile(entry); + } + else if (data == "OPEN_PROJECT_MENU") + { + auto fileDialog = player::PlayerProtocol::getInstance()->getFileDialogService(); + auto path = fileDialog->openDirectory(tr("Choose Folder"), ""); + + _instance->onOpenProjectFolder(path); + } + else if (data == "ABOUT_MENUITEM") + { + onHelpAbout(); + } + } + } + } + } + }), 1); + + 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); + } + } + }); + dispatcher->addEventListenerWithFixedPriority(listener, 1); +} + +void SimulatorWin::setZoom(float frameScale) +{ + _project.setFrameScale(frameScale); + cocos2d::Director::getInstance()->getOpenGLView()->setFrameZoomFactor(frameScale); +} + +void SimulatorWin::updateWindowTitle() +{ + std::stringstream title; + title << "Cocos " << tr("Simulator") << " (" << _project.getFrameScale() * 100 << "%)"; + std::u16string u16title; + cocos2d::StringUtils::UTF8ToUTF16(title.str(), u16title); + SetWindowText(_hwnd, (LPCTSTR)u16title.c_str()); +} + +// debug log +void SimulatorWin::writeDebugLog(const char *log) +{ + if (!_writeDebugLogFile) return; + + fputs(log, _writeDebugLogFile); + fputc('\n', _writeDebugLogFile); + fflush(_writeDebugLogFile); +} + +void SimulatorWin::parseCocosProjectConfig(ProjectConfig &config) +{ + // get project directory + ProjectConfig tmpConfig; + // load project config from command line args + vector args; + for (int i = 0; i < __argc; ++i) + { + wstring ws(__wargv[i]); + string s; + s.assign(ws.begin(), ws.end()); + args.push_back(s); + } + + if (args.size() >= 2) + { + 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().c_str()); + + // 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()); +} + +// +// D:\aaa\bbb\ccc\ddd\abc.txt --> D:/aaa/bbb/ccc/ddd/abc.txt +// +std::string SimulatorWin::convertPathFormatToUnixStyle(const std::string& path) +{ + std::string ret = path; + int len = ret.length(); + for (int i = 0; i < len; ++i) + { + if (ret[i] == '\\') + { + ret[i] = '/'; + } + } + return ret; +} + +// +// @return: C:/Users/win8/Documents/ +// +std::string SimulatorWin::getUserDocumentPath() +{ + TCHAR filePath[MAX_PATH]; + SHGetSpecialFolderPath(NULL, filePath, CSIDL_PERSONAL, FALSE); + int length = 2 * wcslen(filePath); + char* tempstring = new char[length + 1]; + wcstombs(tempstring, filePath, length + 1); + string userDocumentPath(tempstring); + free(tempstring); + + userDocumentPath = convertPathFormatToUnixStyle(userDocumentPath); + userDocumentPath.append("/"); + + return userDocumentPath; +} + +// +// convert Unicode/LocalCode TCHAR to Utf8 char +// +char* SimulatorWin::convertTCharToUtf8(const TCHAR* src) +{ +#ifdef UNICODE + WCHAR* tmp = (WCHAR*)src; + size_t size = wcslen(src) * 3 + 1; + char* dest = new char[size]; + memset(dest, 0, size); + WideCharToMultiByte(CP_UTF8, 0, tmp, -1, dest, size, NULL, NULL); + return dest; +#else + char* tmp = (char*)src; + uint32 size = strlen(tmp) + 1; + WCHAR* dest = new WCHAR[size]; + memset(dest, 0, sizeof(WCHAR)*size); + MultiByteToWideChar(CP_ACP, 0, src, -1, dest, (int)size); // convert local code to unicode. + + size = wcslen(dest) * 3 + 1; + char* dest2 = new char[size]; + memset(dest2, 0, size); + WideCharToMultiByte(CP_UTF8, 0, dest, -1, dest2, size, NULL, NULL); // convert unicode to utf8. + delete[] dest; + return dest2; +#endif +} + +// +std::string SimulatorWin::getApplicationExePath() +{ + TCHAR szFileName[MAX_PATH]; + GetModuleFileName(NULL, szFileName, MAX_PATH); + std::u16string u16ApplicationName; + char *applicationExePath = convertTCharToUtf8(szFileName); + std::string path(applicationExePath); + CC_SAFE_FREE(applicationExePath); + + return path; +} + +std::string SimulatorWin::getApplicationPath() +{ + std::string path = getApplicationExePath(); + 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); + } + + return workdir; +} + +LRESULT CALLBACK SimulatorWin::windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + if (!_instance) return 0; + + switch (uMsg) + { + case WM_SYSCOMMAND: + case WM_COMMAND: + { + if (HIWORD(wParam) == 0) + { + // menu + WORD menuId = LOWORD(wParam); + auto menuService = dynamic_cast (player::PlayerProtocol::getInstance()->getMenuService()); + auto menuItem = menuService->getItemByCommandId(menuId); + if (menuItem) + { + AppEvent event("APP.EVENT", APP_EVENT_MENU); + + std::stringstream buf; + buf << "{\"data\":\"" << menuItem->getMenuId().c_str() << "\""; + buf << ",\"name\":" << "\"menuClicked\"" << "}"; + event.setDataString(buf.str()); + event.setUserData(menuItem); + Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); + } + + if (menuId == ID_HELP_ABOUT) + { + onHelpAbout(); + } + } + break; + } + case WM_KEYDOWN: + { + if (wParam == VK_F5) + { + _instance->relaunch(); + } + break; + } + + case WM_COPYDATA: + { + PCOPYDATASTRUCT pMyCDS = (PCOPYDATASTRUCT)lParam; + if (pMyCDS->dwData == 1) + { + const char *szBuf = (const char*)(pMyCDS->lpData); + SimulatorWin::getInstance()->writeDebugLog(szBuf); + break; + } + } + + case WM_DESTROY: + { + DragAcceptFiles(hWnd, FALSE); + break; + } + + case WM_DROPFILES: + { + HDROP hDrop = (HDROP)wParam; + + const int count = DragQueryFileW(hDrop, 0xffffffff, NULL, 0); + + if (count > 0) + { + int fileIndex = 0; + + const UINT length = DragQueryFileW(hDrop, fileIndex, NULL, 0); + WCHAR* buffer = (WCHAR*)calloc(length + 1, sizeof(WCHAR)); + + DragQueryFileW(hDrop, fileIndex, buffer, length + 1); + char *utf8 = SimulatorWin::convertTCharToUtf8(buffer); + std::string firstFile(utf8); + CC_SAFE_FREE(utf8); + DragFinish(hDrop); + + _instance->onDrop(firstFile); + } + } // WM_DROPFILES + + } + return g_oldWindowProc(hWnd, uMsg, wParam, lParam); +} + +void SimulatorWin::onOpenFile(const std::string &filePath) +{ + string entry = filePath; + if (entry.empty()) return; + + if (stringEndWith(entry, "config.json") || stringEndWith(entry, ".csb") || stringEndWith(entry, ".csd")) + { + replaceAll(entry, "\\", "/"); + size_t p = entry.find_last_of("/"); + if (p != entry.npos) + { + string workdir = entry.substr(0, p); + _project.setProjectDir(workdir); + } + + _project.setScriptFile(entry); + if (stringEndWith(entry, CONFIG_FILE)) + { + ConfigParser::getInstance()->readConfig(entry); + _project.setScriptFile(ConfigParser::getInstance()->getEntryFile()); + } + openProjectWithProjectConfig(_project); + } + else + { + auto title = tr("Open File") + tr("Error"); + auto msg = tr("Only support") + " config.json;*.csb;*.csd"; + auto msgBox = player::PlayerProtocol::getInstance()->getMessageBoxService(); + msgBox->showMessageBox(title, msg); + } +} + +/* +1. find @folderPath/config.json +2. get project name from file: @folderPath/folderName.ccs +3. find @folderPath/cocosstudio/MainScene.csd +4. find @folderPath/cocosstudio/MainScene.csb +*/ +void SimulatorWin::onOpenProjectFolder(const std::string &folderPath) +{ + string path = folderPath; + if (!path.empty()) + { + replaceAll(path, "\\", "/"); + + auto fileUtils = FileUtils::getInstance(); + bool foundProjectFile = false; + // 1. check config.json + auto configPath = path + "/" + CONFIG_FILE; + if (fileUtils->isFileExist(configPath)) + { + ConfigParser::getInstance()->readConfig(configPath); + _project.setProjectDir(path); + _project.setScriptFile(ConfigParser::getInstance()->getEntryFile()); + foundProjectFile = true; + } + // check ccs project + else + { + // 2. + if (path.at(path.size() - 1) == '/') path.erase(path.size() - 1); + ssize_t pos = path.find_last_of('/'); + if (pos != std::string::npos) + { + auto folderName = path.substr(path.find_last_of('/'), path.size()); + auto ccsFilePath = path + folderName + ".ccs"; + if (fileUtils->isFileExist(ccsFilePath)) + { + auto fileContent = fileUtils->getStringFromFile(ccsFilePath); + + string matchString("isFileExist(csdFilePath)) + { + _project.setProjectDir(path); + _project.setScriptFile(csdFilePath); + foundProjectFile = true; + } + // 4. + else if (fileUtils->isFileExist(csbFilePath)) + { + _project.setProjectDir(path); + _project.setScriptFile(csbFilePath); + foundProjectFile = true; + } + } + } + + if (foundProjectFile) + { + openProjectWithProjectConfig(_project); + } + else + { + auto title = tr("Open Project") + tr("Error"); + auto msgBox = player::PlayerProtocol::getInstance()->getMessageBoxService(); + msgBox->showMessageBox(title, tr("Can not find project")); + } + } +} + +void SimulatorWin::onDrop(const std::string &path) +{ + auto fileUtils = FileUtils::getInstance(); + if (fileUtils->isDirectoryExist(path)) + { + onOpenProjectFolder(path); + } + else if (fileUtils->isFileExist(path)) + { + onOpenFile(path); + } +} diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.h b/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.h new file mode 100755 index 0000000000..dce617ffd9 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.h @@ -0,0 +1,58 @@ +#pragma once + +#include "stdafx.h" +#include "Resource.h" +#include "cocos2d.h" +#include "AppDelegate.h" +#include "ProjectConfig/ProjectConfig.h" +#include "ProjectConfig/SimulatorConfig.h" + +class SimulatorWin +{ +public: + static SimulatorWin *getInstance(); + virtual ~SimulatorWin(); + int run(); + + virtual void quit(); + virtual void relaunch(); + virtual void openNewPlayer(); + virtual void openNewPlayerWithProjectConfig(const ProjectConfig &config); + virtual void openProjectWithProjectConfig(const ProjectConfig &config); + + virtual int getPositionX(); + virtual int getPositionY(); +protected: + SimulatorWin(); + + static SimulatorWin *_instance; + ProjectConfig _project; + HWND _hwnd; + HWND _hwndConsole; + AppDelegate *_app; + FILE *_writeDebugLogFile; + + // + void setupUI(); + void setZoom(float frameScale); + void updateWindowTitle(); + + // debug log + void writeDebugLog(const char *log); + void parseCocosProjectConfig(ProjectConfig &config); + + // + void onOpenFile(const std::string &filePath); + void onOpenProjectFolder(const std::string &folderPath); + void onDrop(const std::string &path); + + // helper + std::string convertPathFormatToUnixStyle(const std::string& path); + std::string getUserDocumentPath(); + std::string getApplicationExePath(); + std::string getApplicationPath(); + static char* convertTCharToUtf8(const TCHAR* src); + + static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +}; + diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json b/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json new file mode 100644 index 0000000000..07c6788bbf --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json @@ -0,0 +1,22 @@ +{ + "copy_resources": [ + { + "from": "../../../src", + "to": "src" + }, + { + "from": "../../../res", + "to": "res" + }, + { + "from": "../../../config.json", + "to": "" + }, + { + "from": "../Classes/ide-support/lang", + "to": "" + } + ], + "must_copy_resources": [ + ] +} diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/game.rc b/tools/simulator/frameworks/runtime-src/proj.win32/game.rc new file mode 100755 index 0000000000..dada0181c8 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/game.rc @@ -0,0 +1,201 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.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 ""winres.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, 134 +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 + CTEXT "Version 3.5beta0 (20150227)",IDC_ABOUT_VERSION,35,70,173,17 + CTEXT "Cocos Simulator",IDC_ABOUT_TITLE,35,49,173,17 + CTEXT "Copyright (C) 2015. All rights reserved.",IDC_STATIC,35,94,173,17 + ICON "GLFW_ICON",IDC_STATIC,111,15,20,20 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOG_ABOUT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 236 + TOPMARGIN, 7 + BOTTOMMARGIN, 127 + 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/tools/simulator/frameworks/runtime-src/proj.win32/main.cpp b/tools/simulator/frameworks/runtime-src/proj.win32/main.cpp new file mode 100755 index 0000000000..c4c0104259 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/main.cpp @@ -0,0 +1,14 @@ +#include "main.h" +#include "SimulatorWin.h" +#include + +int APIENTRY _tWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPTSTR lpCmdLine, + int nCmdShow) +{ + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); + auto simulator = SimulatorWin::getInstance(); + return simulator->run(); +} diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/main.h b/tools/simulator/frameworks/runtime-src/proj.win32/main.h new file mode 100755 index 0000000000..d756fd1e57 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/main.h @@ -0,0 +1,10 @@ +#ifndef __MAIN_H__ +#define __MAIN_H__ + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +// Windows Header Files: +#include +#include + +#endif // __WINMAIN_H__ diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/res/game.ico b/tools/simulator/frameworks/runtime-src/proj.win32/res/game.ico new file mode 100755 index 0000000000..feaf932a74 Binary files /dev/null and b/tools/simulator/frameworks/runtime-src/proj.win32/res/game.ico differ diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/resource.h b/tools/simulator/frameworks/runtime-src/proj.win32/resource.h new file mode 100755 index 0000000000..88a519df74 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/resource.h @@ -0,0 +1,39 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by game.rc +// +#define IDS_PROJNAME 100 +#define IDR_MENU_COCOS 200 +#define IDD_DIALOG1 202 +#define IDD_DIALOG_ABOUT 203 +#define IDC_ABOUT_TITLE 1000 +#define IDC_EDIT2 1001 +#define IDC_ABOUT_VERSION 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 201 +#define _APS_NEXT_COMMAND_VALUE 32794 +#define _APS_NEXT_CONTROL_VALUE 1002 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/simulator.sln b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.sln new file mode 100644 index 0000000000..e81b11e41c --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.sln @@ -0,0 +1,67 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simulator", "simulator.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}" + ProjectSection(ProjectDependencies) = postProject + {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\..\..\..\..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluacocos2d", "..\..\..\..\..\cocos\scripting\lua-bindings\proj.win32\libluacocos2d.vcxproj", "{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\..\..\..\..\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\..\..\..\..\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsimulator", "..\..\..\libsimulator\proj.win32\libsimulator.vcxproj", "{001B324A-BB91-4E83-875C-C92F75C40857}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d", "..\..\..\..\..\cocos\scripting\js-bindings\proj.win32\libjscocos2d.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\..\..\..\..\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 + {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32 + {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32 + {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32 + {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.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 + {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.ActiveCfg = Debug|Win32 + {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.Build.0 = Debug|Win32 + {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|Win32.ActiveCfg = Release|Win32 + {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.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 + {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 + {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 + {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 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.ActiveCfg = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.Build.0 = Debug|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32 + {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj new file mode 100644 index 0000000000..30633aecc9 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj @@ -0,0 +1,241 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED} + simulator + + + + Application + true + Unicode + v110 + v120 + + + Application + false + Unicode + v110 + v120 + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + true + $(IncludePath) + $(SourcePath); + AllRules.ruleset + + + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + false + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + + $(ProjectDir)..\Classes;$(ProjectDir)..\Classes\runtime;$(ProjectDir)..\Classes\ide-support;$(EngineRoot)cocos\base;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-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)external\spidermonkey\include\win32;$(EngineRoot)tools\simulator\libsimulator\lib;$(EngineRoot)tools\simulator\libsimulator\lib\protobuf-lite;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) + NotUsing + Level3 + MultiThreadedDebugDLL + false + ProgramDatabase + 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) + 4267;4251;4244;%(DisableSpecificWarnings) + true + $(IntDir)vc$(PlatformToolsetVersion).pdb + algorithm + CompileAsCpp + + + Windows + MachineX86 + true + $(OutDir);$(EngineRoot)external\spidermonkey\prebuilt\win32;%(AdditionalLibraryDirectories) + libcurl_imp.lib;lua51.lib;websockets.lib;mozjs-33.lib;%(AdditionalDependencies) + $(ProjectDir)../../../runtime/win32/$(TargetName).pdb + $(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt) + + + 0x0409 + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) + _DEBUG;%(PreprocessorDefinitions) + + + false + Win32 + _DEBUG;%(PreprocessorDefinitions) + simulator.h + simulator_i.c + simulator_p.c + true + $(IntDir)/simulator.tlb + + + + + if not exist "$(OutDir)" mkdir "$(OutDir)" + +xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(OutDir)" + + + + + + + + + + if not exist "$(ProjectDir)..\..\..\runtime" mkdir "$(ProjectDir)..\..\..\runtime" + +if not exist "$(ProjectDir)..\..\..\runtime\win32" mkdir "$(ProjectDir)..\..\..\runtime\win32" + +xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32" +xcopy /Y /Q "$(OutDir)*.exe" "$(ProjectDir)..\..\..\runtime\win32" +xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" + + + + + + $(ProjectDir)..\Classes;$(ProjectDir)..\Classes\runtime;$(EngineRoot)cocos\base;$(EngineRoot)tools\simulator\libsimulator\lib\protobuf-lite;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-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)external\spidermonkey\include\win32;$(EngineRoot)tools\simulator\libsimulator\lib;$(EngineRoot);%(AdditionalIncludeDirectories) + NotUsing + Level3 + MultiThreadedDLL + Sync + ProgramDatabase + COCOS2D_DEBUG=1;WIN32;_WINDOWS;STRICT;_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 + algorithm + CompileAsCpp + Default + true + + + Windows + MachineX86 + $(OutDir);$(EngineRoot)external\spidermonkey\prebuilt\win32;%(AdditionalLibraryDirectories) + libcurl_imp.lib;lua51.lib;websockets.lib;mozjs-33.lib;%(AdditionalDependencies) + false + $(OutDir)$(ProjectName).exe + + + 0x0409 + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) + NDEBUG;%(PreprocessorDefinitions) + + + false + Win32 + NDEBUG;%(PreprocessorDefinitions) + simulator.h + simulator_i.c + simulator_p.c + true + $(IntDir)/simulator.tlb + + + + + if not exist "$(OutDir)" mkdir "$(OutDir)" + +xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(OutDir)" + + + + + + + + + + if not exist "$(ProjectDir)..\..\..\runtime" mkdir "$(ProjectDir)..\..\..\runtime" + +if not exist "$(ProjectDir)..\..\..\runtime\win32" mkdir "$(ProjectDir)..\..\..\runtime\win32" + +xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32" +xcopy /Y /Q "$(OutDir)*.exe" "$(ProjectDir)..\..\..\runtime\win32" +xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {39379840-825a-45a0-b363-c09ffef864bd} + + + {9f2d6ce6-c893-4400-b50c-6db70cc2562f} + + + {001b324a-bb91-4e83-875c-c92f75c40857} + + + + + + \ No newline at end of file diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.filters b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.filters new file mode 100644 index 0000000000..77a9182794 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.filters @@ -0,0 +1,74 @@ + + + + + {fc5cb953-2953-4968-83b3-39e3ff951754} + + + {037a9a02-b906-4cc5-ad98-304acd4e25ee} + + + {2d1d0979-58cd-4ab6-b91c-13650158f1fa} + + + {9f68f9a7-7069-4c93-94ae-942a0aa910c1} + + + + + Classes + + + win32 + + + + + win32 + + + win32 + + + Classes\ide-support + + + Classes\ide-support + + + Classes\ide-support + + + Classes\ide-support + + + + + Classes + + + win32 + + + + win32 + + + Classes\ide-support + + + Classes\ide-support + + + Classes\ide-support + + + + + resource + + + + + + \ No newline at end of file diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.user b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.user new file mode 100644 index 0000000000..006b7cbe27 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.user @@ -0,0 +1,16 @@ + + + + false + $(OutDir) + WindowsLocalDebugger + WindowsLocalDebugger + + + $(OutDir) + $(TargetPath) + + + $(TargetPath) + + \ No newline at end of file diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/stdafx.cpp b/tools/simulator/frameworks/runtime-src/proj.win32/stdafx.cpp new file mode 100755 index 0000000000..b8b9773e01 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// player.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/stdafx.h b/tools/simulator/frameworks/runtime-src/proj.win32/stdafx.h new file mode 100755 index 0000000000..bb80440ee2 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/stdafx.h @@ -0,0 +1,21 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include + +// C RunTime Header Files +#include +#include +#include +#include + + +// TODO: reference additional headers your program requires here diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/targetver.h b/tools/simulator/frameworks/runtime-src/proj.win32/targetver.h new file mode 100755 index 0000000000..87c0086de7 --- /dev/null +++ b/tools/simulator/frameworks/runtime-src/proj.win32/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/tools/simulator/libsimulator/lib/platform/win32/PlayerMenuServiceWin.cpp b/tools/simulator/libsimulator/lib/platform/win32/PlayerMenuServiceWin.cpp index 66a0cf2af0..839d0f2857 100644 --- a/tools/simulator/libsimulator/lib/platform/win32/PlayerMenuServiceWin.cpp +++ b/tools/simulator/libsimulator/lib/platform/win32/PlayerMenuServiceWin.cpp @@ -113,7 +113,7 @@ PlayerMenuServiceWin::PlayerMenuServiceWin(HWND hwnd) _root._commandId = 0; // hwnd has menu - HMENU menu = GetMenu(hwnd); + HMENU menu = GetSystemMenu(hwnd, FALSE);// GetMenu(hwnd); if (menu) { _root._hmenu = menu; diff --git a/tools/simulator/libsimulator/proj.win32/libsimulator.vcxproj b/tools/simulator/libsimulator/proj.win32/libsimulator.vcxproj index 5787237b71..e44617b9ce 100644 --- a/tools/simulator/libsimulator/proj.win32/libsimulator.vcxproj +++ b/tools/simulator/libsimulator/proj.win32/libsimulator.vcxproj @@ -19,18 +19,14 @@ StaticLibrary true - v110 v120 - v110_xp v120_xp Unicode StaticLibrary false - v110 v120 - v110_xp v120_xp true Unicode diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index 0937c82f6b..d7692aafbe 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -13,7 +13,7 @@ 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/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID cxxgenerator_headers = @@ -22,12 +22,12 @@ 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 %(cocosdir)s/cocos/audio/include/SimpleAudioEngine.h %(cocosdir)s/cocos/2d/CCProtectedNode.h %(cocosdir)s/cocos/base/CCAsyncTaskPool.h +headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/audio/include/SimpleAudioEngine.h %(cocosdir)s/cocos/2d/CCProtectedNode.h %(cocosdir)s/cocos/base/CCAsyncTaskPool.h %(cocosdir)s/cocos/2d/SpritePolygonCache.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 SpriteBatchNode SpriteFrame SpriteFrameCache Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn ReverseTime Animate AnimationFrame Animation AnimationCache Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc CallFuncN RenderTexture GridAction Grid3DAction Grid3D TiledGrid3D GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Lens3D Ripple3D PageTurn3D ShakyTiles3D ShatteredTiles3D WavesTiles3D JumpTiles3D Speed ActionManager Set SimpleAudioEngine Scheduler Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram GLProgramCache Application ClippingNode MotionStreak TextFieldTTF GLViewProtocol GLView Component ComponentContainer __NodeRGBA __LayerRGBA SAXParser Event(?!.*(Physics).*).* Device Configuration ProtectedNode GLProgramState Image .*Light$ AsyncTaskPool +classes = New.* Sprite SpriteBatchNode SpriteFrame SpriteFrameCache Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn ReverseTime Animate AnimationFrame Animation AnimationCache Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc CallFuncN RenderTexture GridAction Grid3DAction Grid3D TiledGrid3D GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Lens3D Ripple3D PageTurn3D ShakyTiles3D ShatteredTiles3D WavesTiles3D JumpTiles3D Speed ActionManager Set SimpleAudioEngine Scheduler Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram GLProgramCache Application ClippingNode MotionStreak TextFieldTTF GLViewProtocol GLView Component ComponentContainer __NodeRGBA __LayerRGBA SAXParser Event(?!.*(Physics).*).* Device Configuration ProtectedNode GLProgramState Image .*Light$ AsyncTaskPool SpritePolygonCache classes_need_extend = Node __NodeRGBA Layer.* Sprite SpriteBatchNode SpriteFrame Menu MenuItem.* Scene DrawNode Component .*Action.* GridBase Grid3D TiledGrid3D MotionStreak ParticleBatchNode ParticleSystem TextFieldTTF RenderTexture TileMapAtlas TMXLayer TMXTiledMap TMXMapInfo TransitionScene ProgressTimer ParallaxNode Label.* GLProgram @@ -121,7 +121,7 @@ skip = Node::[^setPosition$ setGLServerState description getUserObject .*UserDat Component::[serialize], EventListenerCustom::[init], EventListener::[init], - Scene::[getCameras getLights initWithPhysics createWithPhysics getPhysicsWorld], + Scene::[getCameras getLights initWithPhysics createWithPhysics getPhysicsWorld getPhysics3DWorld setPhysics3DDebugCamera], Animate3D::[*], Sprite3D::[*], AttachNode::[*], @@ -135,7 +135,8 @@ skip = Node::[^setPosition$ setGLServerState description getUserObject .*UserDat Device::[getTextureDataForText], BillBoard::[*], Camera::[unproject isVisibleInFrustum], - ClippingNode::[init] + ClippingNode::[init], + SpritePolygonCache::[addSpritePolygonCache getSpritePolygonCache] rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame], MenuItemFont::[setFontNameObj=setFontName setFontSizeObj=setFontSize getFontSizeObj=getFontSize getFontNameObj=getFontName], @@ -181,7 +182,7 @@ base_classes_to_skip = Ref Clonable # classes that create no constructor # Set is special and we will use a hand-written constructor -abstract_classes = Action FiniteTimeAction ActionInterval ActionEase EaseRateAction EaseElastic EaseBounce ActionInstant GridAction Grid3DAction TiledGrid3DAction Director SpriteFrameCache TransitionEaseScene Set SimpleAudioEngine FileUtils Application GLViewProtocol GLView ComponentContainer SAXParser Configuration EventListener BaseLight AsyncTaskPool +abstract_classes = Action FiniteTimeAction ActionInterval ActionEase EaseRateAction EaseElastic EaseBounce ActionInstant GridAction Grid3DAction TiledGrid3DAction Director SpriteFrameCache TransitionEaseScene Set SimpleAudioEngine FileUtils Application GLViewProtocol GLView ComponentContainer SAXParser Configuration EventListener BaseLight AsyncTaskPool SpritePolygonCache # 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_3d.ini b/tools/tojs/cocos2dx_3d.ini index c8f598bc91..4245fd6d2d 100644 --- a/tools/tojs/cocos2dx_3d.ini +++ b/tools/tojs/cocos2dx_3d.ini @@ -13,7 +13,7 @@ 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/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID cxxgenerator_headers = @@ -39,11 +39,11 @@ classes_need_extend = Sprite3D skip = Skeleton3D::[create], Sprite3D::[getAABB getMeshArrayByName createAsync], - Mesh::[create getMeshCommand getAABB getDefaultGLProgram getMeshVertexAttribute], + Mesh::[create getMeshCommand getAABB getDefaultGLProgram getMeshVertexAttribute draw], Sprite3DCache::[addSprite3DData getSpriteData], Animation3D::[getBoneCurves], TextureCube::[setTexParameters], - Terrain::[getAABB getQuadTree create] + Terrain::[getAABB getQuadTree create getHeightData] rename_functions = diff --git a/tools/tojs/cocos2dx_builder.ini b/tools/tojs/cocos2dx_builder.ini index 8b0ee4f904..d4928754c6 100644 --- a/tools/tojs/cocos2dx_builder.ini +++ b/tools/tojs/cocos2dx_builder.ini @@ -13,7 +13,7 @@ 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 -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tojs/cocos2dx_experimental.ini b/tools/tojs/cocos2dx_experimental.ini new file mode 100644 index 0000000000..4ae61bbee7 --- /dev/null +++ b/tools/tojs/cocos2dx_experimental.ini @@ -0,0 +1,60 @@ +[cocos2dx_experimental] +# the prefix to be added to the generated functions. You might or might not use this in your own +# templates +prefix = cocos2dx_experimental + +# 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 = ccexp + +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 -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/2d/SpritePolygon.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 = SpritePolygon + +# 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 = SpritePolygon::[create initWithVerts initWithRect initWithPoly2tri initWithCache] + +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_spine.ini b/tools/tojs/cocos2dx_spine.ini index bd5762aca1..2561e3e4b5 100644 --- a/tools/tojs/cocos2dx_spine.ini +++ b/tools/tojs/cocos2dx_spine.ini @@ -9,7 +9,7 @@ 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__ -DNO_JS_ASSERT -DUINT32_MAX=0xffffffff -cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external/spidermonkey/include/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external/spidermonkey/include/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tojs/cocos2dx_ui.ini b/tools/tojs/cocos2dx_ui.ini index fd91a94c01..8fa317061d 100644 --- a/tools/tojs/cocos2dx_ui.ini +++ b/tools/tojs/cocos2dx_ui.ini @@ -16,7 +16,7 @@ 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_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tojs/genbindings.py b/tools/tojs/genbindings.py index d02e29cc89..11f861df39 100755 --- a/tools/tojs/genbindings.py +++ b/tools/tojs/genbindings.py @@ -114,7 +114,7 @@ def main(): if platform == 'win32': config.set('DEFAULT', 'extra_flags', '-D__WCHAR_MAX__=0x7fffffff -U__MINGW32__') - conf_ini_file = os.path.abspath(os.path.join(os.path.dirname(__file__), 'userconf.ini')) + conf_ini_file = os.path.abspath(os.path.join(os.path.dirname(__file__), 'userconf.ini')) print 'generating userconf.ini...' with open(conf_ini_file, 'w') as configfile: @@ -141,7 +141,8 @@ def main(): 'cocos2dx_studio.ini' : ('cocos2dx_studio', 'jsb_cocos2dx_studio_auto'), \ '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_3d_ext.ini' : ('cocos2dx_3d_extension', 'jsb_cocos2dx_3d_extension_auto'), \ + 'cocos2dx_experimental.ini' : ('cocos2dx_experimental', 'jsb_cocos2dx_experimental') } target = 'spidermonkey' generator_py = '%s/generator.py' % cxx_generator_root @@ -156,7 +157,7 @@ def main(): with _pushd(output_dir): _run_cmd('dos2unix *') - + custom_cmd_args = {} if len(custom_cmd_args) > 0: output_dir = '%s/frameworks/custom/auto' % project_root @@ -182,7 +183,7 @@ def main(): sys.exit(1) else: raise - + # -------------- main -------------- if __name__ == '__main__': diff --git a/tools/tolua/cocos2dx_3d.ini b/tools/tolua/cocos2dx_3d.ini index 9670921a05..bc477cc2a2 100644 --- a/tools/tolua/cocos2dx_3d.ini +++ b/tools/tolua/cocos2dx_3d.ini @@ -13,7 +13,7 @@ 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/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID cxxgenerator_headers = @@ -41,7 +41,7 @@ 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] + Terrain::[lookForIndicesLODSkrit lookForIndicesLOD insertIndicesLOD insertIndicesLODSkirt getIntersectionPoint getAABB getQuadTree create getHeight getHeightData] rename_functions = diff --git a/tools/tolua/cocos2dx_audioengine.ini b/tools/tolua/cocos2dx_audioengine.ini index 717f3e62fe..d50bab7b0d 100644 --- a/tools/tolua/cocos2dx_audioengine.ini +++ b/tools/tolua/cocos2dx_audioengine.ini @@ -15,7 +15,7 @@ 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 -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_cocosbuilder.ini b/tools/tolua/cocos2dx_cocosbuilder.ini index 410fdeb5a5..5b3d49d5c6 100644 --- a/tools/tolua/cocos2dx_cocosbuilder.ini +++ b/tools/tolua/cocos2dx_cocosbuilder.ini @@ -13,7 +13,7 @@ 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 -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_cocosdenshion.ini b/tools/tolua/cocos2dx_cocosdenshion.ini index 6e337f3b84..bbdf8117a3 100644 --- a/tools/tolua/cocos2dx_cocosdenshion.ini +++ b/tools/tolua/cocos2dx_cocosdenshion.ini @@ -13,7 +13,7 @@ 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 -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_controller.ini b/tools/tolua/cocos2dx_controller.ini index aed359d313..24de77361c 100644 --- a/tools/tolua/cocos2dx_controller.ini +++ b/tools/tolua/cocos2dx_controller.ini @@ -15,7 +15,7 @@ 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/base -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID cxxgenerator_headers = diff --git a/tools/tolua/cocos2dx_experimental.ini b/tools/tolua/cocos2dx_experimental.ini index 908f6e26c5..4c3946a5b4 100644 --- a/tools/tolua/cocos2dx_experimental.ini +++ b/tools/tolua/cocos2dx_experimental.ini @@ -13,7 +13,7 @@ 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_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_experimental_video.ini b/tools/tolua/cocos2dx_experimental_video.ini index 918170b977..160429d700 100644 --- a/tools/tolua/cocos2dx_experimental_video.ini +++ b/tools/tolua/cocos2dx_experimental_video.ini @@ -15,7 +15,7 @@ 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_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_experimental_webview.ini b/tools/tolua/cocos2dx_experimental_webview.ini index 4e91348306..232322f38d 100644 --- a/tools/tolua/cocos2dx_experimental_webview.ini +++ b/tools/tolua/cocos2dx_experimental_webview.ini @@ -15,7 +15,7 @@ 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_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_physics.ini b/tools/tolua/cocos2dx_physics.ini index c5042f1dde..6a763b9d9d 100644 --- a/tools/tolua/cocos2dx_physics.ini +++ b/tools/tolua/cocos2dx_physics.ini @@ -15,7 +15,7 @@ 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/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_spine.ini b/tools/tolua/cocos2dx_spine.ini index 8520f7d06d..015d1e65b4 100644 --- a/tools/tolua/cocos2dx_spine.ini +++ b/tools/tolua/cocos2dx_spine.ini @@ -13,7 +13,7 @@ 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_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/web b/web index bd519eeca9..39e53a863b 160000 --- a/web +++ b/web @@ -1 +1 @@ -Subproject commit bd519eeca93c0237e531d5b7a9246f30c4f29291 +Subproject commit 39e53a863b3f663562c4f044f1bd50d782e4cc89