diff --git a/AUTHORS b/AUTHORS index c3109272d8..41ba3dac1a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -920,6 +920,7 @@ Developers: Fix video scale issue in iOS Fix iOS VideoPlayer memory leak Added c++11 random library support + Added WebView widget which supports iOS and Android billtt Fixed a bug that Node::setScale(float) may not work properly diff --git a/CHANGELOG b/CHANGELOG index b3855380b2..ae0b7d74bc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ cocos2d-x-3.3?? ?? [NEW] ActionManager: added removeAllActionsByTag() [NEW] Node: added stopAllActionsByTag() + [NEW] UI: added `WebView` on iOS and Android [FIX] Node: create unneeded temple `Vec2` object in `setPosition(int, int)`, `setPositionX()` and `setPositionY()` @@ -64,7 +65,7 @@ cocos2d-x-3.3alpha0 Aug.28 2014 [FIX] Lua-binding: replace dynamic_cast to std::is_base_of in object_to_luaval - [3rd] fbx-conv: complex FBX model support which is sseful for reskin, multiple meshes and multiple materials support + [3rd] fbx-conv: complex FBX model support which is useful for reskin, multiple meshes and multiple materials support cocos2d-x-3.2 Jul.17 2014 [NEW] Node: added getChildByName method for get a node that can be cast to Type T diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 83811cdcbb..c49581a417 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1350,6 +1350,14 @@ 1ABA68B11888D700007D1BB4 /* CCFontCharMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */; }; 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; + 29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; + 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; + 29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; + 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; + 29394CF419B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */; }; + 29394CF519B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */; }; + 29394CF619B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */; }; + 29394CF719B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */; }; 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; }; 299754F4193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; @@ -2296,6 +2304,10 @@ 2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = ""; }; 2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = ""; }; 29080DEB191B82CE0066F8DF /* UIDeprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIDeprecated.h; sourceTree = ""; }; + 29394CEC19B01DBA00D2DE1A /* UIWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebView.h; sourceTree = ""; }; + 29394CED19B01DBA00D2DE1A /* UIWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebView.mm; sourceTree = ""; }; + 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebViewImpl_iOS.h; sourceTree = ""; }; + 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebViewImpl_iOS.mm; sourceTree = ""; }; 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9Sprite.cpp; sourceTree = ""; }; 2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = ""; }; 2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = ""; }; @@ -4005,6 +4017,10 @@ 29CB8F521929D65500C841D6 /* experimental */ = { isa = PBXGroup; children = ( + 29394CEC19B01DBA00D2DE1A /* UIWebView.h */, + 29394CED19B01DBA00D2DE1A /* UIWebView.mm */, + 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */, + 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */, 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */, 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */, ); @@ -5023,6 +5039,7 @@ 1A570093180BC5A10088DEC7 /* CCActionTween.h in Headers */, 50ABBD4A1925AB0000A911A9 /* Mat4.h in Headers */, 15AE1A6919AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, + 29394CF419B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */, 1A57009A180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, 15AE190819AAD35000C27E9E /* CCDatas.h in Headers */, 1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */, @@ -5220,6 +5237,7 @@ 15AE191019AAD35000C27E9E /* CCInputDelegate.h in Headers */, 15AE184C19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, 50ABBDA11925AB4100A911A9 /* CCGroupCommand.h in Headers */, + 29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */, 15AE186519AAD31D00C27E9E /* CDOpenALSupport.h in Headers */, 15AE1B5C19AADA9900C27E9E /* UITextAtlas.h in Headers */, 1A5702FC180BCE750088DEC7 /* CCTMXXMLParser.h in Headers */, @@ -5550,6 +5568,7 @@ 15AE1AB319AAD40300C27E9E /* b2CircleContact.h in Headers */, 5034CA2E191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, 15AE1A4F19AAD3D500C27E9E /* b2Shape.h in Headers */, + 29394CF519B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */, 50ABBD5B1925AB0000A911A9 /* Vec2.h in Headers */, 50ABBD411925AB0000A911A9 /* CCMath.h in Headers */, 1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */, @@ -5662,6 +5681,7 @@ 15AE1BAC19AADFDF00C27E9E /* UILayout.h in Headers */, 1A570230180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 15AE1AF619AAD42500C27E9E /* chipmunk_ffi.h in Headers */, + 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */, 15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */, 15AE1AB919AAD40300C27E9E /* b2EdgeAndCircleContact.h in Headers */, @@ -6114,6 +6134,7 @@ 15AE187A19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */, 15AE1B6D19AADA9900C27E9E /* UIHelper.cpp in Sources */, 15AE1A8A19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */, + 29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */, 15AE1BD419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */, 1A57019D180BCB590088DEC7 /* CCFont.cpp in Sources */, 1A5701A1180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, @@ -6279,6 +6300,7 @@ 15AE196E19AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, 50ABBEB31925AB6F00A911A9 /* CCUserDefault.mm in Sources */, 50ABBEB51925AB6F00A911A9 /* CCUserDefaultAndroid.cpp in Sources */, + 29394CF619B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */, 50ABBE831925AB6F00A911A9 /* ccFPSImages.c in Sources */, 15AE1B7019AADA9900C27E9E /* CocosGUI.cpp in Sources */, 15AE19D019AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */, @@ -6622,6 +6644,7 @@ 50ABBD9C1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */, 1A5701E7180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, 15AE1AC019AAD40300C27E9E /* b2MotorJoint.cpp in Sources */, + 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */, 15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, 50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */, 15AE1B3A19AAD43700C27E9E /* cpBB.c in Sources */, @@ -6664,6 +6687,7 @@ 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, 15AE18CE19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, + 29394CF719B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */, 15AE1AC619AAD40300C27E9E /* b2GearJoint.cpp in Sources */, B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, 1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */, diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index 977187abac..2029a5d0ff 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -865,6 +865,8 @@ 290E94B6196FC16900694919 /* CocostudioParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 290E94B3196FC16900694919 /* CocostudioParserTest.cpp */; }; 295824591987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; 2958245A1987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; + 298D7F6F19AC31F300FF096D /* UIWebViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */; }; + 29AFEF6719ACCAA000F6B10A /* Test.html in Resources */ = {isa = PBXBuildFile; fileRef = 29AFEF6619ACCAA000F6B10A /* Test.html */; }; 29FBBBFE196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; }; 29FBBBFF196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; }; 38FA2E73194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */; }; @@ -2886,6 +2888,9 @@ 290E94B4196FC16900694919 /* CocostudioParserTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CocostudioParserTest.h; path = ../CocostudioParserTest.h; sourceTree = ""; }; 295824571987415900F9746D /* UIScale9SpriteTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9SpriteTest.cpp; sourceTree = ""; }; 295824581987415900F9746D /* UIScale9SpriteTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9SpriteTest.h; sourceTree = ""; }; + 298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIWebViewTest.cpp; path = UIWebViewTest/UIWebViewTest.cpp; sourceTree = ""; }; + 298D7F6E19AC31F300FF096D /* UIWebViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIWebViewTest.h; path = UIWebViewTest/UIWebViewTest.h; sourceTree = ""; }; + 29AFEF6619ACCAA000F6B10A /* Test.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = Test.html; path = "../tests/cpp-tests/Resources/Test.html"; sourceTree = ""; }; 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocostudioParserJsonTest.cpp; sourceTree = ""; }; 29FBBBFD196A9ECD00E65826 /* CocostudioParserJsonTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocostudioParserJsonTest.h; sourceTree = ""; }; 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActionTimelineTestScene.cpp; sourceTree = ""; }; @@ -6495,6 +6500,7 @@ 1AC35CB518CED84500F37B72 /* effect1.raw */, 1AC35CB618CED84500F37B72 /* effect1.wav */, 1AC35CC418CED84500F37B72 /* pew-pew-lei.wav */, + 29AFEF6619ACCAA000F6B10A /* Test.html */, ); name = Resources; sourceTree = ""; @@ -6907,6 +6913,15 @@ path = UIWidgetAddNodeTest; sourceTree = ""; }; + 298D7F6C19AC31C000FF096D /* UIWebViewTest */ = { + isa = PBXGroup; + children = ( + 298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */, + 298D7F6E19AC31F300FF096D /* UIWebViewTest.h */, + ); + name = UIWebViewTest; + sourceTree = ""; + }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( @@ -6988,6 +7003,7 @@ 29FBBC00196A9F0D00E65826 /* UIAndEditorTests */ = { isa = PBXGroup; children = ( + 298D7F6C19AC31C000FF096D /* UIWebViewTest */, 295824571987415900F9746D /* UIScale9SpriteTest.cpp */, 295824581987415900F9746D /* UIScale9SpriteTest.h */, 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */, @@ -7816,6 +7832,7 @@ 1AC35D0918CED84500F37B72 /* TileMaps in Resources */, 1AC35CFF18CED84500F37B72 /* Particles in Resources */, 1AC35C8818CECF1400F37B72 /* Default-568h@2x.png in Resources */, + 29AFEF6719ACCAA000F6B10A /* Test.html in Resources */, 1AC35CD518CED84500F37B72 /* ccb in Resources */, 1AC35CE118CED84500F37B72 /* configs in Resources */, 1AC35CE918CED84500F37B72 /* extensions in Resources */, @@ -8316,6 +8333,7 @@ 1AC35B3E18CECF0C00F37B72 /* Bug-422.cpp in Sources */, 29080DAC191B595E0066F8DF /* UIFocusTest.cpp in Sources */, 1AC35BF618CECF0C00F37B72 /* HttpClientTest.cpp in Sources */, + 298D7F6F19AC31F300FF096D /* UIWebViewTest.cpp in Sources */, 29080DA6191B595E0066F8DF /* UIButtonTest_Editor.cpp in Sources */, 1AC35B5018CECF0C00F37B72 /* ClickAndMoveTest.cpp in Sources */, ); diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 49ab060c9a..01abec6bef 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -72,6 +72,8 @@ bool nodeComparisonLess(Node* n1, Node* n2) // XXX: Yes, nodes might have a sort problem once every 15 days if the game runs at 60 FPS and each frame sprites are reordered. int Node::s_globalOrderOfArrival = 1; +// MARK: Constructor, Destructor, Init + Node::Node(void) : _rotationX(0.0f) , _rotationY(0.0f) @@ -144,6 +146,20 @@ Node::Node(void) _transform = _inverse = _additionalTransform = Mat4::IDENTITY; } +Node * Node::create() +{ + Node * ret = new (std::nothrow) Node(); + if (ret && ret->init()) + { + ret->autorelease(); + } + else + { + CC_SAFE_DELETE(ret); + } + return ret; +} + Node::~Node() { CCLOGINFO( "deallocing Node: %p - tag: %i", this, _tag ); @@ -194,6 +210,34 @@ bool Node::init() return true; } +void Node::cleanup() +{ + // actions + this->stopAllActions(); + this->unscheduleAllSelectors(); + +#if CC_ENABLE_SCRIPT_BINDING + if ( _scriptType != kScriptTypeNone) + { + int action = kNodeOnCleanup; + BasicScriptData data(this,(void*)&action); + ScriptEvent scriptEvent(kNodeEvent,(void*)&data); + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&scriptEvent); + } +#endif // #if CC_ENABLE_SCRIPT_BINDING + + // timers + for( const auto &child: _children) + child->cleanup(); +} + +std::string Node::getDescription() const +{ + return StringUtils::format("init()) - { - ret->autorelease(); - } - else - { - CC_SAFE_DELETE(ret); - } - return ret; -} - -void Node::cleanup() -{ - // actions - this->stopAllActions(); - this->unscheduleAllSelectors(); - -#if CC_ENABLE_SCRIPT_BINDING - if ( _scriptType != kScriptTypeNone) - { - int action = kNodeOnCleanup; - BasicScriptData data(this,(void*)&action); - ScriptEvent scriptEvent(kNodeEvent,(void*)&data); - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&scriptEvent); - } -#endif // #if CC_ENABLE_SCRIPT_BINDING - - // timers - for( const auto &child: _children) - child->cleanup(); -} - - -std::string Node::getDescription() const -{ - return StringUtils::format("getRenderer(); @@ -1292,6 +1299,8 @@ Mat4 Node::transform(const Mat4& parentTransform) return ret; } +// MARK: events + void Node::onEnter() { if (_onEnterCallback) @@ -1420,6 +1429,8 @@ void Node::setActionManager(ActionManager* actionManager) } } +// MARK: actions + Action * Node::runAction(Action* action) { CCASSERT( action != nullptr, "Argument must be non-nil"); @@ -1460,7 +1471,7 @@ ssize_t Node::getNumberOfRunningActions() const return _actionManager->getNumberOfRunningActionsInTarget(this); } -// Node - Callbacks +// MARK: Callbacks void Node::setScheduler(Scheduler* scheduler) { @@ -1591,6 +1602,8 @@ void Node::update(float fDelta) } } +// MARK: coordinates + AffineTransform Node::getNodeToParentAffineTransform() const { AffineTransform ret; @@ -1845,6 +1858,8 @@ void Node::updateTransform() child->updateTransform(); } +// MARK: components + Component* Node::getComponent(const std::string& name) { if( _componentContainer ) @@ -1882,6 +1897,9 @@ void Node::removeAllComponents() } #if CC_USE_PHYSICS + +// MARK: Physics + void Node::updatePhysicsBodyTransform(Scene* scene) { updatePhysicsBodyScale(scene); @@ -2035,6 +2053,8 @@ PhysicsBody* Node::getPhysicsBody() const } #endif //CC_USE_PHYSICS +// MARK: Opacity and Color + GLubyte Node::getOpacity(void) const { return _realOpacity; @@ -2184,6 +2204,7 @@ void Node::disableCascadeColor() } } +// MARK: Camera void Node::setCameraMask(unsigned short mask, bool applyChildren) { _cameraMask = mask; @@ -2195,6 +2216,8 @@ void Node::setCameraMask(unsigned short mask, bool applyChildren) } } +// MARK: Deprecated + __NodeRGBA::__NodeRGBA() { CCLOG("NodeRGBA deprecated."); diff --git a/cocos/2d/cocos2d_wp8.vcxproj b/cocos/2d/cocos2d_wp8.vcxproj index 07a0aefc46..bd9eafacf0 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj +++ b/cocos/2d/cocos2d_wp8.vcxproj @@ -236,8 +236,6 @@ - - @@ -280,7 +278,6 @@ NotUsing - @@ -462,8 +459,6 @@ - - @@ -496,7 +491,6 @@ - diff --git a/cocos/2d/cocos2d_wp8.vcxproj.filters b/cocos/2d/cocos2d_wp8.vcxproj.filters index 5a53e1329e..154b65da34 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj.filters +++ b/cocos/2d/cocos2d_wp8.vcxproj.filters @@ -623,12 +623,6 @@ 3d - - 3d - - - 3d - 3d @@ -647,9 +641,6 @@ renderer - - base - base @@ -1313,12 +1304,6 @@ 3d - - 3d - - - 3d - 3d @@ -1337,9 +1322,6 @@ renderer - - base - base diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index f56e2e6351..c454b4f63a 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -85,6 +85,8 @@ list(REMOVE_ITEM cocos2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/base/CCController-android.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCUserDefaultAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIVideoPlayerAndroid.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebView.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebViewImpl_android.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/LocalStorageAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventController.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventListenerController.cpp" diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java index 1ad24349ab..53ea0418a3 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java @@ -33,11 +33,10 @@ import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.os.Message; -import android.view.ViewGroup; -import android.view.WindowManager; -import android.util.Log; -import android.widget.FrameLayout; import android.preference.PreferenceManager.OnActivityResultListener; +import android.util.Log; +import android.view.ViewGroup; +import android.widget.FrameLayout; public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelperListener { // =========================================================== @@ -55,6 +54,7 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe private Cocos2dxHandler mHandler; private static Cocos2dxActivity sContext = null; private Cocos2dxVideoHelper mVideoHelper = null; + private Cocos2dxWebViewHelper mWebViewHelper = null; public static Context getContext() { return sContext; @@ -102,6 +102,10 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe if (mVideoHelper == null) { mVideoHelper = new Cocos2dxVideoHelper(this, mFrameLayout); } + + if(mWebViewHelper == null){ + mWebViewHelper = new Cocos2dxWebViewHelper(mFrameLayout); + } } //native method,call GLViewImpl::getGLContextAttrs() to get the OpenGL ES context attributions diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java new file mode 100755 index 0000000000..15a55841b7 --- /dev/null +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java @@ -0,0 +1,94 @@ +package org.cocos2dx.lib; + +import java.lang.reflect.Method; +import java.net.URI; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.util.Log; +import android.webkit.WebChromeClient; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.FrameLayout; + +public class Cocos2dxWebView extends WebView { + private static final String TAG = Cocos2dxWebViewHelper.class.getSimpleName(); + + private int viewTag; + private String jsScheme; + + public Cocos2dxWebView(Context context) { + this(context, -1); + } + + @SuppressLint("SetJavaScriptEnabled") + public Cocos2dxWebView(Context context, int viewTag) { + super(context); + this.viewTag = viewTag; + this.jsScheme = ""; + + this.setFocusable(true); + this.setFocusableInTouchMode(true); + + this.getSettings().setSupportZoom(false); + + this.getSettings().setJavaScriptEnabled(true); + + // `searchBoxJavaBridge_` has big security risk. http://jvn.jp/en/jp/JVN53768697 + try { + Method method = this.getClass().getMethod("removeJavascriptInterface", new Class[]{String.class}); + method.invoke(this, "searchBoxJavaBridge_"); + } catch (Exception e) { + Log.d(TAG, "This API level do not support `removeJavascriptInterface`"); + } + + this.setWebViewClient(new Cocos2dxWebViewClient()); + this.setWebChromeClient(new WebChromeClient()); + } + + public void setJavascriptInterfaceScheme(String scheme) { + this.jsScheme = scheme != null ? scheme : ""; + } + + public void setScalesPageToFit(boolean scalesPageToFit) { + this.getSettings().setSupportZoom(scalesPageToFit); + } + + class Cocos2dxWebViewClient extends WebViewClient { + @Override + public boolean shouldOverrideUrlLoading(WebView view, String urlString) { + URI uri = URI.create(urlString); + if (uri != null && uri.getScheme().equals(jsScheme)) { + Cocos2dxWebViewHelper._onJsCallback(viewTag, urlString); + return true; + } + return Cocos2dxWebViewHelper._shouldStartLoading(viewTag, urlString); + } + + @Override + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + Cocos2dxWebViewHelper._didFinishLoading(viewTag, url); + } + + @Override + public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { + super.onReceivedError(view, errorCode, description, failingUrl); + Cocos2dxWebViewHelper._didFailLoading(viewTag, failingUrl); + } + } + + public void setWebViewRect(int left, int top, int maxWidth, int maxHeight) { + fixSize(left, top, maxWidth, maxHeight); + } + + private void fixSize(int left, int top, int width, int height) { + FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, + FrameLayout.LayoutParams.WRAP_CONTENT); + layoutParams.leftMargin = left; + layoutParams.topMargin = top; + layoutParams.width = width; + layoutParams.height = height; + this.setLayoutParams(layoutParams); + } +} diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebViewHelper.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebViewHelper.java new file mode 100755 index 0000000000..e8d45b787e --- /dev/null +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebViewHelper.java @@ -0,0 +1,296 @@ +package org.cocos2dx.lib; + +import android.os.Handler; +import android.os.Looper; +import android.util.SparseArray; +import android.view.View; +import android.widget.FrameLayout; + +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.FutureTask; + + +public class Cocos2dxWebViewHelper { + private static final String TAG = Cocos2dxWebViewHelper.class.getSimpleName(); + private static Handler handler; + private static Cocos2dxActivity cocos2dxActivity; + private static FrameLayout layout; + + private static SparseArray webViews; + private static int viewTag = 0; + + public Cocos2dxWebViewHelper(FrameLayout layout) { + Cocos2dxWebViewHelper.layout = layout; + Cocos2dxWebViewHelper.handler = new Handler(Looper.myLooper()); + + Cocos2dxWebViewHelper.cocos2dxActivity = (Cocos2dxActivity) Cocos2dxActivity.getContext(); + Cocos2dxWebViewHelper.webViews = new SparseArray(); + } + + private static native boolean shouldStartLoading(int index, String message); + + public static boolean _shouldStartLoading(int index, String message) { + return !shouldStartLoading(index, message); + } + + private static native void didFinishLoading(int index, String message); + + public static void _didFinishLoading(int index, String message) { + didFinishLoading(index, message); + } + + private static native void didFailLoading(int index, String message); + + public static void _didFailLoading(int index, String message) { + didFailLoading(index, message); + } + + private static native void onJsCallback(int index, String message); + + public static void _onJsCallback(int index, String message) { + onJsCallback(index, message); + } + + @SuppressWarnings("unused") + public static int createWebView() { + final int index = viewTag; + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = new Cocos2dxWebView(cocos2dxActivity, index); + FrameLayout.LayoutParams lParams = new FrameLayout.LayoutParams( + FrameLayout.LayoutParams.WRAP_CONTENT, + FrameLayout.LayoutParams.WRAP_CONTENT); + layout.addView(webView, lParams); + + webViews.put(index, webView); + } + }); + return viewTag++; + } + + @SuppressWarnings("unused") + public static void removeWebView(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webViews.remove(index); + layout.removeView(webView); + } + } + }); + } + + @SuppressWarnings("unused") + public static void setVisible(final int index, final boolean visible) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.setVisibility(visible ? View.VISIBLE : View.GONE); + } + } + }); + } + + @SuppressWarnings("unused") + public static void setWebViewRect(final int index, final int left, final int top, final int maxWidth, final int maxHeight) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.setWebViewRect(left, top, maxWidth, maxHeight); + } + } + }); + } + + @SuppressWarnings("unused") + public static void setJavascriptInterfaceScheme(final int index, final String scheme) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.setJavascriptInterfaceScheme(scheme); + } + } + }); + } + + @SuppressWarnings("unused") + public static void loadData(final int index, final String data, final String mimeType, final String encoding, final String baseURL) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadDataWithBaseURL(baseURL, data, mimeType, encoding, null); + } + } + }); + } + + @SuppressWarnings("unused") + public static void loadHTMLString(final int index, final String htmlString, final String mimeType, final String encoding) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadData(htmlString, mimeType, encoding); + } + } + }); + } + + @SuppressWarnings("unused") + public static void loadUrl(final int index, final String url) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadUrl(url); + } + } + }); + } + + @SuppressWarnings("unused") + public static void loadFile(final int index, final String filePath) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadUrl(filePath); + } + } + }); + } + + public static void stopLoading(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.stopLoading(); + } + } + }); + + } + + public static void reload(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.reload(); + } + } + }); + } + + public static T callInMainThread(Callable call) throws ExecutionException, InterruptedException { + FutureTask task = new FutureTask(call); + handler.post(task); + return task.get(); + } + + @SuppressWarnings("unused") + public static boolean canGoBack(final int index) { + Callable callable = new Callable() { + @Override + public Boolean call() throws Exception { + Cocos2dxWebView webView = webViews.get(index); + return webView != null && webView.canGoBack(); + } + }; + try { + return callInMainThread(callable); + } catch (ExecutionException e) { + return false; + } catch (InterruptedException e) { + return false; + } + } + + @SuppressWarnings("unused") + public static boolean canGoForward(final int index) { + Callable callable = new Callable() { + @Override + public Boolean call() throws Exception { + Cocos2dxWebView webView = webViews.get(index); + return webView != null && webView.canGoForward(); + } + }; + try { + return callInMainThread(callable); + } catch (ExecutionException e) { + return false; + } catch (InterruptedException e) { + return false; + } + } + + @SuppressWarnings("unused") + public static void goBack(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.goBack(); + } + } + }); + } + + @SuppressWarnings("unused") + public static void goForward(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.goForward(); + } + } + }); + } + + @SuppressWarnings("unused") + public static void evaluateJS(final int index, final String js) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadUrl("javascript:" + js); + } + } + }); + } + + @SuppressWarnings("unused") + public static void setScalesPageToFit(final int index, final boolean scalesPageToFit) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.setScalesPageToFit(scalesPageToFit); + } + } + }); + } +} diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 9e956b5000..88054b0c75 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -364,6 +364,1852 @@ int lua_register_cocos2dx_Console(lua_State* tolua_S) return 1; } +int lua_cocos2dx_Texture2D_getMaxT(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getMaxT'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getMaxT(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getMaxT",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getMaxT'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getStringForFormat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getStringForFormat'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const char* ret = cobj->getStringForFormat(); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getStringForFormat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getStringForFormat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_initWithImage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_initWithImage'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Image* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); + + if (!ok) { break; } + cocos2d::Texture2D::PixelFormat arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Texture2D:initWithImage"); + + if (!ok) { break; } + bool ret = cobj->initWithImage(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Image* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); + + if (!ok) { break; } + bool ret = cobj->initWithImage(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:initWithImage",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_initWithImage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getMaxS(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getMaxS'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getMaxS(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getMaxS",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getMaxS'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_releaseGLTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_releaseGLTexture'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->releaseGLTexture(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:releaseGLTexture",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_releaseGLTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_hasPremultipliedAlpha(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_hasPremultipliedAlpha'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->hasPremultipliedAlpha(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:hasPremultipliedAlpha",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_hasPremultipliedAlpha'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getPixelsHigh(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelsHigh'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getPixelsHigh(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelsHigh",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelsHigh'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getBitsPerPixelForFormat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getBitsPerPixelForFormat'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Texture2D::PixelFormat arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Texture2D:getBitsPerPixelForFormat"); + + if (!ok) { break; } + unsigned int ret = cobj->getBitsPerPixelForFormat(arg0); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + unsigned int ret = cobj->getBitsPerPixelForFormat(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getBitsPerPixelForFormat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getBitsPerPixelForFormat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned int ret = cobj->getName(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getName",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_initWithString(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_initWithString'", 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.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + cocos2d::FontDefinition arg1; + ok &= luaval_to_fontdefinition(tolua_S, 3, &arg1, "cc.Texture2D: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 == 3) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 4) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::Size arg3; + ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 5) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::Size arg3; + ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::TextHAlignment arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.Texture2D: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 == 6) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::Size arg3; + ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::TextHAlignment arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::TextVAlignment arg5; + ok &= luaval_to_int32(tolua_S, 7,(int *)&arg5, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4, arg5); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:initWithString",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_initWithString'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setMaxT(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setMaxT'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Texture2D:setMaxT"); + if(!ok) + return 0; + cobj->setMaxT(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setMaxT",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setMaxT'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_drawInRect(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_drawInRect'", 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.Texture2D:drawInRect"); + if(!ok) + return 0; + cobj->drawInRect(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:drawInRect",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_drawInRect'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getContentSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getContentSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Size ret = cobj->getContentSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getContentSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getContentSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setAliasTexParameters(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setAliasTexParameters'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->setAliasTexParameters(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setAliasTexParameters",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setAliasTexParameters'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setAntiAliasTexParameters(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setAntiAliasTexParameters'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->setAntiAliasTexParameters(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setAntiAliasTexParameters",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setAntiAliasTexParameters'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_generateMipmap(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_generateMipmap'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->generateMipmap(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:generateMipmap",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_generateMipmap'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getDescription(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getDescription'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getDescription(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getDescription",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getDescription'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getPixelFormat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelFormat'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getPixelFormat(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelFormat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelFormat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getContentSizeInPixels(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getContentSizeInPixels'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Size& ret = cobj->getContentSizeInPixels(); + size_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getContentSizeInPixels",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getContentSizeInPixels'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getPixelsWide(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelsWide'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getPixelsWide(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelsWide",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelsWide'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_drawAtPoint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_drawAtPoint'", 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.Texture2D:drawAtPoint"); + if(!ok) + return 0; + cobj->drawAtPoint(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:drawAtPoint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_drawAtPoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgram* ret = cobj->getGLProgram(); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getGLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_hasMipmaps(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_hasMipmaps'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->hasMipmaps(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:hasMipmaps",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_hasMipmaps'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setMaxS(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setMaxS'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Texture2D:setMaxS"); + if(!ok) + return 0; + cobj->setMaxS(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setMaxS",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setMaxS'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat(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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Texture2D::PixelFormat arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Texture2D:setDefaultAlphaPixelFormat"); + if(!ok) + return 0; + cocos2d::Texture2D::setDefaultAlphaPixelFormat(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Texture2D:setDefaultAlphaPixelFormat",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat(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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cocos2d::Texture2D::getDefaultAlphaPixelFormat(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Texture2D:getDefaultAlphaPixelFormat",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Texture2D_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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) + return 0; + cobj = new cocos2d::Texture2D(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Texture2D"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:Texture2D",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Texture2D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Texture2D)"); + return 0; +} + +int lua_register_cocos2dx_Texture2D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Texture2D"); + tolua_cclass(tolua_S,"Texture2D","cc.Texture2D","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Texture2D"); + tolua_function(tolua_S,"new",lua_cocos2dx_Texture2D_constructor); + tolua_function(tolua_S,"getMaxT",lua_cocos2dx_Texture2D_getMaxT); + tolua_function(tolua_S,"getStringForFormat",lua_cocos2dx_Texture2D_getStringForFormat); + tolua_function(tolua_S,"initWithImage",lua_cocos2dx_Texture2D_initWithImage); + tolua_function(tolua_S,"getMaxS",lua_cocos2dx_Texture2D_getMaxS); + tolua_function(tolua_S,"releaseGLTexture",lua_cocos2dx_Texture2D_releaseGLTexture); + tolua_function(tolua_S,"hasPremultipliedAlpha",lua_cocos2dx_Texture2D_hasPremultipliedAlpha); + tolua_function(tolua_S,"getPixelsHigh",lua_cocos2dx_Texture2D_getPixelsHigh); + tolua_function(tolua_S,"getBitsPerPixelForFormat",lua_cocos2dx_Texture2D_getBitsPerPixelForFormat); + tolua_function(tolua_S,"getName",lua_cocos2dx_Texture2D_getName); + tolua_function(tolua_S,"initWithString",lua_cocos2dx_Texture2D_initWithString); + tolua_function(tolua_S,"setMaxT",lua_cocos2dx_Texture2D_setMaxT); + tolua_function(tolua_S,"drawInRect",lua_cocos2dx_Texture2D_drawInRect); + tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Texture2D_getContentSize); + tolua_function(tolua_S,"setAliasTexParameters",lua_cocos2dx_Texture2D_setAliasTexParameters); + tolua_function(tolua_S,"setAntiAliasTexParameters",lua_cocos2dx_Texture2D_setAntiAliasTexParameters); + tolua_function(tolua_S,"generateMipmap",lua_cocos2dx_Texture2D_generateMipmap); + tolua_function(tolua_S,"getDescription",lua_cocos2dx_Texture2D_getDescription); + tolua_function(tolua_S,"getPixelFormat",lua_cocos2dx_Texture2D_getPixelFormat); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Texture2D_setGLProgram); + tolua_function(tolua_S,"getContentSizeInPixels",lua_cocos2dx_Texture2D_getContentSizeInPixels); + tolua_function(tolua_S,"getPixelsWide",lua_cocos2dx_Texture2D_getPixelsWide); + tolua_function(tolua_S,"drawAtPoint",lua_cocos2dx_Texture2D_drawAtPoint); + tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Texture2D_getGLProgram); + tolua_function(tolua_S,"hasMipmaps",lua_cocos2dx_Texture2D_hasMipmaps); + tolua_function(tolua_S,"setMaxS",lua_cocos2dx_Texture2D_setMaxS); + tolua_function(tolua_S,"setDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat); + tolua_function(tolua_S,"getDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Texture2D).name(); + g_luaType[typeName] = "cc.Texture2D"; + g_typeCast["Texture2D"] = "cc.Texture2D"; + return 1; +} + +int lua_cocos2dx_Touch_getPreviousLocationInView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getPreviousLocationInView'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getPreviousLocationInView(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getPreviousLocationInView",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getPreviousLocationInView'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getLocation(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getLocation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getDelta(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getDelta'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getDelta(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getDelta",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getDelta'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getStartLocationInView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getStartLocationInView'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getStartLocationInView(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getStartLocationInView",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getStartLocationInView'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getStartLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getStartLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getStartLocation(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getStartLocation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getStartLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getID(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getID'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getID(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getID",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getID'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_setTouchInfo(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_setTouchInfo'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + int arg0; + double arg1; + double arg2; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Touch:setTouchInfo"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Touch:setTouchInfo"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Touch:setTouchInfo"); + if(!ok) + return 0; + cobj->setTouchInfo(arg0, arg1, arg2); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:setTouchInfo",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_setTouchInfo'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getLocationInView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getLocationInView'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getLocationInView(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getLocationInView",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getLocationInView'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getPreviousLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getPreviousLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getPreviousLocation(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getPreviousLocation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getPreviousLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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) + return 0; + cobj = new cocos2d::Touch(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Touch"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:Touch",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Touch_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Touch)"); + return 0; +} + +int lua_register_cocos2dx_Touch(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Touch"); + tolua_cclass(tolua_S,"Touch","cc.Touch","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Touch"); + tolua_function(tolua_S,"new",lua_cocos2dx_Touch_constructor); + tolua_function(tolua_S,"getPreviousLocationInView",lua_cocos2dx_Touch_getPreviousLocationInView); + tolua_function(tolua_S,"getLocation",lua_cocos2dx_Touch_getLocation); + tolua_function(tolua_S,"getDelta",lua_cocos2dx_Touch_getDelta); + tolua_function(tolua_S,"getStartLocationInView",lua_cocos2dx_Touch_getStartLocationInView); + tolua_function(tolua_S,"getStartLocation",lua_cocos2dx_Touch_getStartLocation); + tolua_function(tolua_S,"getId",lua_cocos2dx_Touch_getID); + tolua_function(tolua_S,"setTouchInfo",lua_cocos2dx_Touch_setTouchInfo); + tolua_function(tolua_S,"getLocationInView",lua_cocos2dx_Touch_getLocationInView); + tolua_function(tolua_S,"getPreviousLocation",lua_cocos2dx_Touch_getPreviousLocation); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Touch).name(); + g_luaType[typeName] = "cc.Touch"; + g_typeCast["Touch"] = "cc.Touch"; + return 1; +} + int lua_cocos2dx_Event_isStopped(lua_State* tolua_S) { int argc = 0; @@ -708,6 +2554,8372 @@ int lua_register_cocos2dx_EventTouch(lua_State* tolua_S) return 1; } +int lua_cocos2dx_EventKeyboard_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::EventKeyboard* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::EventKeyboard::KeyCode arg0; + bool arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.EventKeyboard:EventKeyboard"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.EventKeyboard:EventKeyboard"); + if(!ok) + return 0; + cobj = new cocos2d::EventKeyboard(arg0, arg1); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventKeyboard"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventKeyboard:EventKeyboard",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventKeyboard_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_EventKeyboard_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventKeyboard)"); + return 0; +} + +int lua_register_cocos2dx_EventKeyboard(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventKeyboard"); + tolua_cclass(tolua_S,"EventKeyboard","cc.EventKeyboard","cc.Event",nullptr); + + tolua_beginmodule(tolua_S,"EventKeyboard"); + tolua_function(tolua_S,"new",lua_cocos2dx_EventKeyboard_constructor); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::EventKeyboard).name(); + g_luaType[typeName] = "cc.EventKeyboard"; + g_typeCast["EventKeyboard"] = "cc.EventKeyboard"; + return 1; +} + +int lua_cocos2dx_Node_addChild(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_addChild'", 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.Node:addChild"); + + if (!ok) { break; } + cobj->addChild(arg0, arg1); + return 0; + } + }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->addChild(arg0); + return 0; + } + }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.Node:addChild"); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.Node:addChild"); + + if (!ok) { break; } + cobj->addChild(arg0, arg1, arg2); + return 0; + } + }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.Node:addChild"); + + if (!ok) { break; } + std::string arg2; + ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.Node:addChild"); + + if (!ok) { break; } + cobj->addChild(arg0, arg1, arg2); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:addChild",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_addChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeComponent(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_removeComponent'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Component* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); + + if (!ok) { break; } + bool ret = cobj->removeComponent(arg0); + 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.Node:removeComponent"); + + if (!ok) { break; } + bool ret = cobj->removeComponent(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeComponent",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeComponent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPhysicsBody(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_setPhysicsBody'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::PhysicsBody* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + if(!ok) + return 0; + cobj->setPhysicsBody(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPhysicsBody",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPhysicsBody'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getDescription(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_getDescription'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getDescription(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDescription",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDescription'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setRotationSkewY(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_setRotationSkewY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotationSkewY"); + if(!ok) + return 0; + cobj->setRotationSkewY(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotationSkewY",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotationSkewY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOpacityModifyRGB(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_setOpacityModifyRGB'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setOpacityModifyRGB"); + if(!ok) + return 0; + cobj->setOpacityModifyRGB(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOpacityModifyRGB",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOpacityModifyRGB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setCascadeOpacityEnabled(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_setCascadeOpacityEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setCascadeOpacityEnabled"); + if(!ok) + return 0; + cobj->setCascadeOpacityEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCascadeOpacityEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCascadeOpacityEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getChildren(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_getChildren'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + const cocos2d::Vector& ret = cobj->getChildren(); + ccvector_to_luaval(tolua_S, ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cocos2d::Vector& ret = cobj->getChildren(); + ccvector_to_luaval(tolua_S, ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildren'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOnExitCallback(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_setOnExitCallback'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setOnExitCallback(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOnExitCallback",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOnExitCallback'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_pause(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_pause'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->pause(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:pause",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_pause'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertToWorldSpaceAR(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_convertToWorldSpaceAR'", 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.Node:convertToWorldSpaceAR"); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertToWorldSpaceAR(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToWorldSpaceAR",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToWorldSpaceAR'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isIgnoreAnchorPointForPosition(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_isIgnoreAnchorPointForPosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isIgnoreAnchorPointForPosition(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isIgnoreAnchorPointForPosition",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isIgnoreAnchorPointForPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getChildByName(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_getChildByName'", 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.Node:getChildByName"); + if(!ok) + return 0; + cocos2d::Node* ret = cobj->getChildByName(arg0); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_updateDisplayedOpacity(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_updateDisplayedOpacity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + uint16_t arg0; + + ok &= luaval_to_uint16(tolua_S, 2,&arg0, "cc.Node:updateDisplayedOpacity"); + if(!ok) + return 0; + cobj->updateDisplayedOpacity(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateDisplayedOpacity",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateDisplayedOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getCameraMask(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_getCameraMask'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned short ret = cobj->getCameraMask(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getCameraMask",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getCameraMask'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setRotation(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_setRotation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotation"); + if(!ok) + return 0; + cobj->setRotation(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotation",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScaleZ(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_setScaleZ'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleZ"); + if(!ok) + return 0; + cobj->setScaleZ(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleZ",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleZ'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScaleY(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_setScaleY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleY"); + if(!ok) + return 0; + cobj->setScaleY(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleY",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScaleX(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_setScaleX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleX"); + if(!ok) + return 0; + cobj->setScaleX(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleX",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setRotationSkewX(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_setRotationSkewX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotationSkewX"); + if(!ok) + return 0; + cobj->setRotationSkewX(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotationSkewX",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotationSkewX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback(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_setonEnterTransitionDidFinishCallback'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setonEnterTransitionDidFinishCallback(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setonEnterTransitionDidFinishCallback",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeAllComponents(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_removeAllComponents'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->removeAllComponents(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeAllComponents",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeAllComponents'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node__setLocalZOrder(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__setLocalZOrder'", 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.Node:_setLocalZOrder"); + if(!ok) + return 0; + cobj->_setLocalZOrder(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:_setLocalZOrder",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node__setLocalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setCameraMask(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_setCameraMask'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned short arg0; + + ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); + if(!ok) + return 0; + cobj->setCameraMask(arg0); + return 0; + } + if (argc == 2) + { + unsigned short arg0; + bool arg1; + + ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:setCameraMask"); + if(!ok) + return 0; + cobj->setCameraMask(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCameraMask",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCameraMask'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getTag(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_getTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getTag(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getTag",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getGLProgram(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_getGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgram* ret = cobj->getGLProgram(); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNodeToWorldTransform(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_getNodeToWorldTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Mat4 ret = cobj->getNodeToWorldTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToWorldTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToWorldTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPosition3D(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_getPosition3D'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec3 ret = cobj->getPosition3D(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPosition3D",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPosition3D'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeChild(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_removeChild'", 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) + return 0; + cobj->removeChild(arg0); + return 0; + } + 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.Node:removeChild"); + if(!ok) + return 0; + cobj->removeChild(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChild",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertToWorldSpace(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_convertToWorldSpace'", 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.Node:convertToWorldSpace"); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertToWorldSpace(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToWorldSpace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToWorldSpace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScene(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_getScene'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Scene* ret = cobj->getScene(); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getEventDispatcher(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_getEventDispatcher'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::EventDispatcher* ret = cobj->getEventDispatcher(); + object_to_luaval(tolua_S, "cc.EventDispatcher",(cocos2d::EventDispatcher*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getEventDispatcher",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getEventDispatcher'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setSkewX(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_setSkewX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setSkewX"); + if(!ok) + return 0; + cobj->setSkewX(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setSkewX",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setSkewX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setGLProgramState(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_setGLProgramState'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgramState* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0); + if(!ok) + return 0; + cobj->setGLProgramState(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgramState",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgramState'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOnEnterCallback(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_setOnEnterCallback'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setOnEnterCallback(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOnEnterCallback",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOnEnterCallback'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getOpacity(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_getOpacity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + uint16_t ret = cobj->getOpacity(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setNormalizedPosition(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_setNormalizedPosition'", 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.Node:setNormalizedPosition"); + if(!ok) + return 0; + cobj->setNormalizedPosition(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setNormalizedPosition",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setNormalizedPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setonExitTransitionDidStartCallback(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_setonExitTransitionDidStartCallback'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setonExitTransitionDidStartCallback(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setonExitTransitionDidStartCallback",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setonExitTransitionDidStartCallback'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertTouchToNodeSpace(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_convertTouchToNodeSpace'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Touch* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertTouchToNodeSpace(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertTouchToNodeSpace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertTouchToNodeSpace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeAllChildrenWithCleanup(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_removeAllChildrenWithCleanup'", 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.Node:removeAllChildrenWithCleanup"); + + if (!ok) { break; } + cobj->removeAllChildrenWithCleanup(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cobj->removeAllChildren(); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeAllChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeAllChildrenWithCleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNodeToParentAffineTransform(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_getNodeToParentAffineTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform(); + affinetransform_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentAffineTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToParentAffineTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isCascadeOpacityEnabled(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_isCascadeOpacityEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isCascadeOpacityEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isCascadeOpacityEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isCascadeOpacityEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setParent(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_setParent'", 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) + return 0; + cobj->setParent(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setParent",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setParent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getName(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_getName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getName(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getName",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getRotation3D(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_getRotation3D'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec3 ret = cobj->getRotation3D(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotation3D",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotation3D'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNodeToParentTransform(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_getNodeToParentTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Mat4& ret = cobj->getNodeToParentTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToParentTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertTouchToNodeSpaceAR(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_convertTouchToNodeSpaceAR'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Touch* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertTouchToNodeSpaceAR(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertTouchToNodeSpaceAR",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertTouchToNodeSpaceAR'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertToNodeSpace(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_convertToNodeSpace'", 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.Node:convertToNodeSpace"); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertToNodeSpace(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToNodeSpace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToNodeSpace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_resume(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_resume'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->resume(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:resume",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_resume'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPhysicsBody(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_getPhysicsBody'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::PhysicsBody* ret = cobj->getPhysicsBody(); + object_to_luaval(tolua_S, "cc.PhysicsBody",(cocos2d::PhysicsBody*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPhysicsBody",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPhysicsBody'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPosition(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_setPosition'", 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.Node:setPosition"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Node:setPosition"); + + if (!ok) { break; } + cobj->setPosition(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:setPosition"); + + if (!ok) { break; } + cobj->setPosition(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPosition",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_stopActionByTag(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_stopActionByTag'", 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.Node:stopActionByTag"); + if(!ok) + return 0; + cobj->stopActionByTag(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopActionByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopActionByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_reorderChild(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_reorderChild'", 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.Node:reorderChild"); + if(!ok) + return 0; + cobj->reorderChild(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:reorderChild",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_reorderChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_ignoreAnchorPointForPosition(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_ignoreAnchorPointForPosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:ignoreAnchorPointForPosition"); + if(!ok) + return 0; + cobj->ignoreAnchorPointForPosition(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:ignoreAnchorPointForPosition",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_ignoreAnchorPointForPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setSkewY(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_setSkewY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setSkewY"); + if(!ok) + return 0; + cobj->setSkewY(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setSkewY",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setSkewY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPositionZ(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_setPositionZ'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionZ"); + if(!ok) + return 0; + cobj->setPositionZ(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionZ",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionZ'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setRotation3D(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_setRotation3D'", 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.Node:setRotation3D"); + if(!ok) + return 0; + cobj->setRotation3D(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotation3D",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotation3D'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPositionX(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_setPositionX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionX"); + if(!ok) + return 0; + cobj->setPositionX(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionX",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setNodeToParentTransform(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_setNodeToParentTransform'", 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.Node:setNodeToParentTransform"); + if(!ok) + return 0; + cobj->setNodeToParentTransform(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setNodeToParentTransform",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setNodeToParentTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getAnchorPoint(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_getAnchorPoint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Vec2& ret = cobj->getAnchorPoint(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getAnchorPoint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getAnchorPoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNumberOfRunningActions(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_getNumberOfRunningActions'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getNumberOfRunningActions(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNumberOfRunningActions",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNumberOfRunningActions'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_updateTransform(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_updateTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateTransform(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setGLProgram(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_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isVisible(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_isVisible'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isVisible(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isVisible",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isVisible'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getChildrenCount(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_getChildrenCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getChildrenCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildrenCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildrenCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertToNodeSpaceAR(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_convertToNodeSpaceAR'", 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.Node:convertToNodeSpaceAR"); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertToNodeSpaceAR(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToNodeSpaceAR",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToNodeSpaceAR'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_addComponent(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_addComponent'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Component* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); + if(!ok) + return 0; + bool ret = cobj->addComponent(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:addComponent",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_addComponent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_runAction(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_runAction'", 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) + return 0; + cocos2d::Action* ret = cobj->runAction(arg0); + object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:runAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_runAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isOpacityModifyRGB(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_isOpacityModifyRGB'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isOpacityModifyRGB(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isOpacityModifyRGB",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isOpacityModifyRGB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getRotation(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_getRotation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getRotation(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getAnchorPointInPoints(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_getAnchorPointInPoints'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Vec2& ret = cobj->getAnchorPointInPoints(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getAnchorPointInPoints",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getAnchorPointInPoints'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_visit(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_visit'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + cobj->visit(); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Renderer* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:visit"); + + if (!ok) { break; } + unsigned int arg2; + ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:visit"); + + if (!ok) { break; } + cobj->visit(arg0, arg1, arg2); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:visit",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_visit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeChildByName(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_removeChildByName'", 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.Node:removeChildByName"); + if(!ok) + return 0; + cobj->removeChildByName(arg0); + return 0; + } + if (argc == 2) + { + std::string arg0; + bool arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:removeChildByName"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChildByName"); + if(!ok) + return 0; + cobj->removeChildByName(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChildByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChildByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getGLProgramState(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_getGLProgramState'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cobj->getGLProgramState(); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGLProgramState",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGLProgramState'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScheduler(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_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) + return 0; + cobj->setScheduler(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScheduler",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScheduler'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_stopAllActions(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_stopAllActions'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->stopAllActions(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAllActions",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAllActions'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getSkewX(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_getSkewX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getSkewX(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getSkewX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getSkewX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getSkewY(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_getSkewY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getSkewY(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getSkewY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getSkewY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getDisplayedColor(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_getDisplayedColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Color3B& ret = cobj->getDisplayedColor(); + color3b_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDisplayedColor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDisplayedColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getActionByTag(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_getActionByTag'", 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.Node:getActionByTag"); + if(!ok) + return 0; + cocos2d::Action* ret = cobj->getActionByTag(arg0); + object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getActionByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getActionByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setName(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_setName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:setName"); + if(!ok) + return 0; + cobj->setName(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setAdditionalTransform(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_setAdditionalTransform'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::AffineTransform arg0; + ok &= luaval_to_affinetransform(tolua_S, 2, &arg0, "cc.Node:setAdditionalTransform"); + + if (!ok) { break; } + cobj->setAdditionalTransform(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Mat4* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Mat4",&arg0); + + if (!ok) { break; } + cobj->setAdditionalTransform(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setAdditionalTransform",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setAdditionalTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getDisplayedOpacity(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_getDisplayedOpacity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + uint16_t ret = cobj->getDisplayedOpacity(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDisplayedOpacity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDisplayedOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getLocalZOrder(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_getLocalZOrder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getLocalZOrder(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getLocalZOrder",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getLocalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScheduler(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_getScheduler'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + const cocos2d::Scheduler* ret = cobj->getScheduler(); + object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cocos2d::Scheduler* ret = cobj->getScheduler(); + object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScheduler",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScheduler'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getParentToNodeAffineTransform(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_getParentToNodeAffineTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::AffineTransform ret = cobj->getParentToNodeAffineTransform(); + affinetransform_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParentToNodeAffineTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParentToNodeAffineTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getOrderOfArrival(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_getOrderOfArrival'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getOrderOfArrival(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOrderOfArrival",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOrderOfArrival'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setActionManager(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_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) + return 0; + cobj->setActionManager(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setActionManager",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setActionManager'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setColor(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_setColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Color3B arg0; + + ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.Node:setColor"); + if(!ok) + return 0; + cobj->setColor(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setColor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isRunning(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_isRunning'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isRunning(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isRunning",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isRunning'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getParent(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_getParent'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + const cocos2d::Node* ret = cobj->getParent(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cocos2d::Node* ret = cobj->getParent(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParent",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPositionZ(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_getPositionZ'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPositionZ(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionZ",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionZ'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPositionY(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_getPositionY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPositionY(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPositionX(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_getPositionX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPositionX(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeChildByTag(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_removeChildByTag'", 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.Node:removeChildByTag"); + if(!ok) + return 0; + cobj->removeChildByTag(arg0); + return 0; + } + if (argc == 2) + { + int arg0; + bool arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:removeChildByTag"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChildByTag"); + if(!ok) + return 0; + cobj->removeChildByTag(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChildByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChildByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPositionY(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_setPositionY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionY"); + if(!ok) + return 0; + cobj->setPositionY(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionY",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNodeToWorldAffineTransform(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_getNodeToWorldAffineTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::AffineTransform ret = cobj->getNodeToWorldAffineTransform(); + affinetransform_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToWorldAffineTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToWorldAffineTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_updateDisplayedColor(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_updateDisplayedColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Color3B arg0; + + ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.Node:updateDisplayedColor"); + if(!ok) + return 0; + cobj->updateDisplayedColor(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateDisplayedColor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateDisplayedColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setVisible(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_setVisible'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setVisible"); + if(!ok) + return 0; + cobj->setVisible(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setVisible",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setVisible'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getParentToNodeTransform(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_getParentToNodeTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Mat4& ret = cobj->getParentToNodeTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParentToNodeTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParentToNodeTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setGlobalZOrder(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_setGlobalZOrder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setGlobalZOrder"); + if(!ok) + return 0; + cobj->setGlobalZOrder(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGlobalZOrder",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGlobalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScale(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_setScale'", 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.Node:setScale"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Node:setScale"); + + if (!ok) { break; } + cobj->setScale(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScale"); + + if (!ok) { break; } + cobj->setScale(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScale",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScale'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getChildByTag(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_getChildByTag'", 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.Node:getChildByTag"); + if(!ok) + return 0; + cocos2d::Node* ret = cobj->getChildByTag(arg0); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOrderOfArrival(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_setOrderOfArrival'", 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.Node:setOrderOfArrival"); + if(!ok) + return 0; + cobj->setOrderOfArrival(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOrderOfArrival",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOrderOfArrival'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScaleZ(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_getScaleZ'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getScaleZ(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleZ",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleZ'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScaleY(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_getScaleY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getScaleY(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScaleX(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_getScaleX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getScaleX(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setLocalZOrder(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_setLocalZOrder'", 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.Node:setLocalZOrder"); + if(!ok) + return 0; + cobj->setLocalZOrder(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setLocalZOrder",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setLocalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getWorldToNodeAffineTransform(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_getWorldToNodeAffineTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::AffineTransform ret = cobj->getWorldToNodeAffineTransform(); + affinetransform_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getWorldToNodeAffineTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getWorldToNodeAffineTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setCascadeColorEnabled(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_setCascadeColorEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setCascadeColorEnabled"); + if(!ok) + return 0; + cobj->setCascadeColorEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCascadeColorEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCascadeColorEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOpacity(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_setOpacity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + uint16_t arg0; + + ok &= luaval_to_uint16(tolua_S, 2,&arg0, "cc.Node:setOpacity"); + if(!ok) + return 0; + cobj->setOpacity(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOpacity",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_cleanup(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_cleanup'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->cleanup(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:cleanup",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_cleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getComponent(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_getComponent'", 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.Node:getComponent"); + if(!ok) + return 0; + cocos2d::Component* ret = cobj->getComponent(arg0); + object_to_luaval(tolua_S, "cc.Component",(cocos2d::Component*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getComponent",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getComponent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getContentSize(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_getContentSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Size& ret = cobj->getContentSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getContentSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getContentSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_stopAllActionsByTag(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_stopAllActionsByTag'", 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.Node:stopAllActionsByTag"); + if(!ok) + return 0; + cobj->stopAllActionsByTag(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAllActionsByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAllActionsByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getColor(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_getColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Color3B& ret = cobj->getColor(); + color3b_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getColor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getBoundingBox(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_getBoundingBox'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Rect ret = cobj->getBoundingBox(); + rect_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getBoundingBox",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getBoundingBox'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setEventDispatcher(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_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) + return 0; + cobj->setEventDispatcher(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setEventDispatcher",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setEventDispatcher'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getGlobalZOrder(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_getGlobalZOrder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getGlobalZOrder(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGlobalZOrder",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGlobalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_draw(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_draw'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + cobj->draw(); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Renderer* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:draw"); + + if (!ok) { break; } + unsigned int arg2; + ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:draw"); + + if (!ok) { break; } + cobj->draw(arg0, arg1, arg2); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:draw",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_draw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setUserObject(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_setUserObject'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Ref* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + if(!ok) + return 0; + cobj->setUserObject(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setUserObject",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setUserObject'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeFromParentAndCleanup(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_removeFromParentAndCleanup'", 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.Node:removeFromParentAndCleanup"); + + if (!ok) { break; } + cobj->removeFromParentAndCleanup(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cobj->removeFromParent(); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeFromParent",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeFromParentAndCleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPosition3D(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_setPosition3D'", 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.Node:setPosition3D"); + if(!ok) + return 0; + cobj->setPosition3D(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPosition3D",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPosition3D'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_update(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_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.Node:update"); + if(!ok) + return 0; + cobj->update(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:update",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_update'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_sortAllChildren(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_sortAllChildren'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->sortAllChildren(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:sortAllChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_sortAllChildren'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getWorldToNodeTransform(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_getWorldToNodeTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Mat4 ret = cobj->getWorldToNodeTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getWorldToNodeTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getWorldToNodeTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScale(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_getScale'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getScale(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScale",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScale'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNormalizedPosition(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_getNormalizedPosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Vec2& ret = cobj->getNormalizedPosition(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNormalizedPosition",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNormalizedPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getRotationSkewX(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_getRotationSkewX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getRotationSkewX(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotationSkewX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotationSkewX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getRotationSkewY(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_getRotationSkewY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getRotationSkewY(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotationSkewY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotationSkewY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setTag(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_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.Node:setTag"); + if(!ok) + return 0; + cobj->setTag(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isCascadeColorEnabled(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_isCascadeColorEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isCascadeColorEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isCascadeColorEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isCascadeColorEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_stopAction(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_stopAction'", 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) + return 0; + cobj->stopAction(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getActionManager(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_getActionManager'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + const cocos2d::ActionManager* ret = cobj->getActionManager(); + object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cocos2d::ActionManager* ret = cobj->getActionManager(); + object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getActionManager",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getActionManager'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Node* ret = cocos2d::Node::create(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Node:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Node_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Node)"); + return 0; +} + +int lua_register_cocos2dx_Node(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Node"); + tolua_cclass(tolua_S,"Node","cc.Node","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Node"); + tolua_function(tolua_S,"addChild",lua_cocos2dx_Node_addChild); + tolua_function(tolua_S,"removeComponent",lua_cocos2dx_Node_removeComponent); + tolua_function(tolua_S,"setPhysicsBody",lua_cocos2dx_Node_setPhysicsBody); + tolua_function(tolua_S,"getDescription",lua_cocos2dx_Node_getDescription); + tolua_function(tolua_S,"setRotationSkewY",lua_cocos2dx_Node_setRotationSkewY); + tolua_function(tolua_S,"setOpacityModifyRGB",lua_cocos2dx_Node_setOpacityModifyRGB); + tolua_function(tolua_S,"setCascadeOpacityEnabled",lua_cocos2dx_Node_setCascadeOpacityEnabled); + tolua_function(tolua_S,"getChildren",lua_cocos2dx_Node_getChildren); + tolua_function(tolua_S,"setOnExitCallback",lua_cocos2dx_Node_setOnExitCallback); + tolua_function(tolua_S,"pause",lua_cocos2dx_Node_pause); + tolua_function(tolua_S,"convertToWorldSpaceAR",lua_cocos2dx_Node_convertToWorldSpaceAR); + tolua_function(tolua_S,"isIgnoreAnchorPointForPosition",lua_cocos2dx_Node_isIgnoreAnchorPointForPosition); + tolua_function(tolua_S,"getChildByName",lua_cocos2dx_Node_getChildByName); + tolua_function(tolua_S,"updateDisplayedOpacity",lua_cocos2dx_Node_updateDisplayedOpacity); + tolua_function(tolua_S,"getCameraMask",lua_cocos2dx_Node_getCameraMask); + tolua_function(tolua_S,"setRotation",lua_cocos2dx_Node_setRotation); + tolua_function(tolua_S,"setScaleZ",lua_cocos2dx_Node_setScaleZ); + tolua_function(tolua_S,"setScaleY",lua_cocos2dx_Node_setScaleY); + tolua_function(tolua_S,"setScaleX",lua_cocos2dx_Node_setScaleX); + tolua_function(tolua_S,"setRotationSkewX",lua_cocos2dx_Node_setRotationSkewX); + tolua_function(tolua_S,"setonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback); + tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents); + tolua_function(tolua_S,"_setLocalZOrder",lua_cocos2dx_Node__setLocalZOrder); + tolua_function(tolua_S,"setCameraMask",lua_cocos2dx_Node_setCameraMask); + tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag); + tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram); + tolua_function(tolua_S,"getNodeToWorldTransform",lua_cocos2dx_Node_getNodeToWorldTransform); + tolua_function(tolua_S,"getPosition3D",lua_cocos2dx_Node_getPosition3D); + tolua_function(tolua_S,"removeChild",lua_cocos2dx_Node_removeChild); + tolua_function(tolua_S,"convertToWorldSpace",lua_cocos2dx_Node_convertToWorldSpace); + tolua_function(tolua_S,"getScene",lua_cocos2dx_Node_getScene); + tolua_function(tolua_S,"getEventDispatcher",lua_cocos2dx_Node_getEventDispatcher); + tolua_function(tolua_S,"setSkewX",lua_cocos2dx_Node_setSkewX); + tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_Node_setGLProgramState); + tolua_function(tolua_S,"setOnEnterCallback",lua_cocos2dx_Node_setOnEnterCallback); + tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity); + 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,"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,"setParent",lua_cocos2dx_Node_setParent); + tolua_function(tolua_S,"getName",lua_cocos2dx_Node_getName); + tolua_function(tolua_S,"getRotation3D",lua_cocos2dx_Node_getRotation3D); + tolua_function(tolua_S,"getNodeToParentTransform",lua_cocos2dx_Node_getNodeToParentTransform); + tolua_function(tolua_S,"convertTouchToNodeSpaceAR",lua_cocos2dx_Node_convertTouchToNodeSpaceAR); + tolua_function(tolua_S,"convertToNodeSpace",lua_cocos2dx_Node_convertToNodeSpace); + tolua_function(tolua_S,"resume",lua_cocos2dx_Node_resume); + tolua_function(tolua_S,"getPhysicsBody",lua_cocos2dx_Node_getPhysicsBody); + tolua_function(tolua_S,"setPosition",lua_cocos2dx_Node_setPosition); + tolua_function(tolua_S,"stopActionByTag",lua_cocos2dx_Node_stopActionByTag); + tolua_function(tolua_S,"reorderChild",lua_cocos2dx_Node_reorderChild); + tolua_function(tolua_S,"ignoreAnchorPointForPosition",lua_cocos2dx_Node_ignoreAnchorPointForPosition); + tolua_function(tolua_S,"setSkewY",lua_cocos2dx_Node_setSkewY); + tolua_function(tolua_S,"setPositionZ",lua_cocos2dx_Node_setPositionZ); + tolua_function(tolua_S,"setRotation3D",lua_cocos2dx_Node_setRotation3D); + tolua_function(tolua_S,"setPositionX",lua_cocos2dx_Node_setPositionX); + tolua_function(tolua_S,"setNodeToParentTransform",lua_cocos2dx_Node_setNodeToParentTransform); + tolua_function(tolua_S,"getAnchorPoint",lua_cocos2dx_Node_getAnchorPoint); + tolua_function(tolua_S,"getNumberOfRunningActions",lua_cocos2dx_Node_getNumberOfRunningActions); + tolua_function(tolua_S,"updateTransform",lua_cocos2dx_Node_updateTransform); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram); + tolua_function(tolua_S,"isVisible",lua_cocos2dx_Node_isVisible); + tolua_function(tolua_S,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount); + tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR); + tolua_function(tolua_S,"addComponent",lua_cocos2dx_Node_addComponent); + tolua_function(tolua_S,"runAction",lua_cocos2dx_Node_runAction); + tolua_function(tolua_S,"isOpacityModifyRGB",lua_cocos2dx_Node_isOpacityModifyRGB); + tolua_function(tolua_S,"getRotation",lua_cocos2dx_Node_getRotation); + tolua_function(tolua_S,"getAnchorPointInPoints",lua_cocos2dx_Node_getAnchorPointInPoints); + tolua_function(tolua_S,"visit",lua_cocos2dx_Node_visit); + tolua_function(tolua_S,"removeChildByName",lua_cocos2dx_Node_removeChildByName); + tolua_function(tolua_S,"getGLProgramState",lua_cocos2dx_Node_getGLProgramState); + tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Node_setScheduler); + tolua_function(tolua_S,"stopAllActions",lua_cocos2dx_Node_stopAllActions); + tolua_function(tolua_S,"getSkewX",lua_cocos2dx_Node_getSkewX); + tolua_function(tolua_S,"getSkewY",lua_cocos2dx_Node_getSkewY); + tolua_function(tolua_S,"getDisplayedColor",lua_cocos2dx_Node_getDisplayedColor); + tolua_function(tolua_S,"getActionByTag",lua_cocos2dx_Node_getActionByTag); + tolua_function(tolua_S,"setName",lua_cocos2dx_Node_setName); + tolua_function(tolua_S,"setAdditionalTransform",lua_cocos2dx_Node_setAdditionalTransform); + tolua_function(tolua_S,"getDisplayedOpacity",lua_cocos2dx_Node_getDisplayedOpacity); + tolua_function(tolua_S,"getLocalZOrder",lua_cocos2dx_Node_getLocalZOrder); + tolua_function(tolua_S,"getScheduler",lua_cocos2dx_Node_getScheduler); + tolua_function(tolua_S,"getParentToNodeAffineTransform",lua_cocos2dx_Node_getParentToNodeAffineTransform); + tolua_function(tolua_S,"getOrderOfArrival",lua_cocos2dx_Node_getOrderOfArrival); + tolua_function(tolua_S,"setActionManager",lua_cocos2dx_Node_setActionManager); + tolua_function(tolua_S,"setColor",lua_cocos2dx_Node_setColor); + tolua_function(tolua_S,"isRunning",lua_cocos2dx_Node_isRunning); + tolua_function(tolua_S,"getParent",lua_cocos2dx_Node_getParent); + tolua_function(tolua_S,"getPositionZ",lua_cocos2dx_Node_getPositionZ); + tolua_function(tolua_S,"getPositionY",lua_cocos2dx_Node_getPositionY); + tolua_function(tolua_S,"getPositionX",lua_cocos2dx_Node_getPositionX); + tolua_function(tolua_S,"removeChildByTag",lua_cocos2dx_Node_removeChildByTag); + tolua_function(tolua_S,"setPositionY",lua_cocos2dx_Node_setPositionY); + tolua_function(tolua_S,"getNodeToWorldAffineTransform",lua_cocos2dx_Node_getNodeToWorldAffineTransform); + tolua_function(tolua_S,"updateDisplayedColor",lua_cocos2dx_Node_updateDisplayedColor); + tolua_function(tolua_S,"setVisible",lua_cocos2dx_Node_setVisible); + tolua_function(tolua_S,"getParentToNodeTransform",lua_cocos2dx_Node_getParentToNodeTransform); + tolua_function(tolua_S,"setGlobalZOrder",lua_cocos2dx_Node_setGlobalZOrder); + tolua_function(tolua_S,"setScale",lua_cocos2dx_Node_setScale); + tolua_function(tolua_S,"getChildByTag",lua_cocos2dx_Node_getChildByTag); + tolua_function(tolua_S,"setOrderOfArrival",lua_cocos2dx_Node_setOrderOfArrival); + tolua_function(tolua_S,"getScaleZ",lua_cocos2dx_Node_getScaleZ); + tolua_function(tolua_S,"getScaleY",lua_cocos2dx_Node_getScaleY); + tolua_function(tolua_S,"getScaleX",lua_cocos2dx_Node_getScaleX); + tolua_function(tolua_S,"setLocalZOrder",lua_cocos2dx_Node_setLocalZOrder); + tolua_function(tolua_S,"getWorldToNodeAffineTransform",lua_cocos2dx_Node_getWorldToNodeAffineTransform); + tolua_function(tolua_S,"setCascadeColorEnabled",lua_cocos2dx_Node_setCascadeColorEnabled); + tolua_function(tolua_S,"setOpacity",lua_cocos2dx_Node_setOpacity); + tolua_function(tolua_S,"cleanup",lua_cocos2dx_Node_cleanup); + tolua_function(tolua_S,"getComponent",lua_cocos2dx_Node_getComponent); + tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Node_getContentSize); + tolua_function(tolua_S,"stopAllActionsByTag",lua_cocos2dx_Node_stopAllActionsByTag); + tolua_function(tolua_S,"getColor",lua_cocos2dx_Node_getColor); + tolua_function(tolua_S,"getBoundingBox",lua_cocos2dx_Node_getBoundingBox); + tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Node_setEventDispatcher); + tolua_function(tolua_S,"getGlobalZOrder",lua_cocos2dx_Node_getGlobalZOrder); + tolua_function(tolua_S,"draw",lua_cocos2dx_Node_draw); + tolua_function(tolua_S,"setUserObject",lua_cocos2dx_Node_setUserObject); + tolua_function(tolua_S,"removeFromParent",lua_cocos2dx_Node_removeFromParentAndCleanup); + tolua_function(tolua_S,"setPosition3D",lua_cocos2dx_Node_setPosition3D); + tolua_function(tolua_S,"update",lua_cocos2dx_Node_update); + tolua_function(tolua_S,"sortAllChildren",lua_cocos2dx_Node_sortAllChildren); + tolua_function(tolua_S,"getWorldToNodeTransform",lua_cocos2dx_Node_getWorldToNodeTransform); + tolua_function(tolua_S,"getScale",lua_cocos2dx_Node_getScale); + tolua_function(tolua_S,"getNormalizedPosition",lua_cocos2dx_Node_getNormalizedPosition); + tolua_function(tolua_S,"getRotationSkewX",lua_cocos2dx_Node_getRotationSkewX); + tolua_function(tolua_S,"getRotationSkewY",lua_cocos2dx_Node_getRotationSkewY); + tolua_function(tolua_S,"setTag",lua_cocos2dx_Node_setTag); + tolua_function(tolua_S,"isCascadeColorEnabled",lua_cocos2dx_Node_isCascadeColorEnabled); + tolua_function(tolua_S,"stopAction",lua_cocos2dx_Node_stopAction); + tolua_function(tolua_S,"getActionManager",lua_cocos2dx_Node_getActionManager); + tolua_function(tolua_S,"create", lua_cocos2dx_Node_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Node).name(); + g_luaType[typeName] = "cc.Node"; + g_typeCast["Node"] = "cc.Node"; + return 1; +} + +int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformTexture'", 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.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + unsigned int arg1; + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + unsigned int arg1; + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformTexture",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformMat4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformMat4'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cobj->setUniformMat4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cobj->setUniformMat4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformMat4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformMat4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_applyUniforms(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyUniforms'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->applyUniforms(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyUniforms",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyUniforms'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_applyGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyGLProgram'", 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.GLProgramState:applyGLProgram"); + if(!ok) + return 0; + cobj->applyGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getUniformCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getUniformCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getUniformCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getUniformCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getUniformCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_applyAttributes(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyAttributes'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->applyAttributes(); + return 0; + } + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLProgramState:applyAttributes"); + if(!ok) + return 0; + cobj->applyAttributes(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyAttributes",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyAttributes'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformFloat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformFloat'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + cobj->setUniformFloat(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + cobj->setUniformFloat(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformFloat",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformFloat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec3(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec3'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cobj->setUniformVec3(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cobj->setUniformVec3(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec3",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec3'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformInt(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformInt'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + cobj->setUniformInt(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + cobj->setUniformInt(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformInt",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformInt'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getVertexAttribCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getVertexAttribCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec4'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cocos2d::Vec4 arg1; + ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cobj->setUniformVec4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cocos2d::Vec4 arg1; + ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cobj->setUniformVec4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec2(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec2'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cocos2d::Vec2 arg1; + ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cobj->setUniformVec2(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cocos2d::Vec2 arg1; + ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cobj->setUniformVec2(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec2",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec2'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getVertexAttribsFlags(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned int ret = cobj->getVertexAttribsFlags(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribsFlags",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_apply(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_apply'", 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.GLProgramState:apply"); + if(!ok) + return 0; + cobj->apply(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:apply",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_apply'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgram* ret = cobj->getGLProgram(); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getGLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::GLProgram* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::create(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(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.GLProgramState",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.GLProgramState:getOrCreateWithGLProgramName"); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgramName",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram(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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::GLProgram* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgram(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgram",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_GLProgramState_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (GLProgramState)"); + return 0; +} + +int lua_register_cocos2dx_GLProgramState(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.GLProgramState"); + tolua_cclass(tolua_S,"GLProgramState","cc.GLProgramState","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"GLProgramState"); + tolua_function(tolua_S,"setUniformTexture",lua_cocos2dx_GLProgramState_setUniformTexture); + tolua_function(tolua_S,"setUniformMat4",lua_cocos2dx_GLProgramState_setUniformMat4); + tolua_function(tolua_S,"applyUniforms",lua_cocos2dx_GLProgramState_applyUniforms); + tolua_function(tolua_S,"applyGLProgram",lua_cocos2dx_GLProgramState_applyGLProgram); + tolua_function(tolua_S,"getUniformCount",lua_cocos2dx_GLProgramState_getUniformCount); + tolua_function(tolua_S,"applyAttributes",lua_cocos2dx_GLProgramState_applyAttributes); + tolua_function(tolua_S,"setUniformFloat",lua_cocos2dx_GLProgramState_setUniformFloat); + tolua_function(tolua_S,"setUniformVec3",lua_cocos2dx_GLProgramState_setUniformVec3); + tolua_function(tolua_S,"setUniformInt",lua_cocos2dx_GLProgramState_setUniformInt); + tolua_function(tolua_S,"getVertexAttribCount",lua_cocos2dx_GLProgramState_getVertexAttribCount); + tolua_function(tolua_S,"setUniformVec4",lua_cocos2dx_GLProgramState_setUniformVec4); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_GLProgramState_setGLProgram); + tolua_function(tolua_S,"setUniformVec2",lua_cocos2dx_GLProgramState_setUniformVec2); + tolua_function(tolua_S,"getVertexAttribsFlags",lua_cocos2dx_GLProgramState_getVertexAttribsFlags); + tolua_function(tolua_S,"apply",lua_cocos2dx_GLProgramState_apply); + tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramState_getGLProgram); + tolua_function(tolua_S,"create", lua_cocos2dx_GLProgramState_create); + tolua_function(tolua_S,"getOrCreateWithGLProgramName", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName); + tolua_function(tolua_S,"getOrCreateWithGLProgram", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::GLProgramState).name(); + g_luaType[typeName] = "cc.GLProgramState"; + g_typeCast["GLProgramState"] = "cc.GLProgramState"; + return 1; +} + +int lua_cocos2dx_AtlasNode_updateAtlasValues(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateAtlasValues(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:updateAtlasValues",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_getTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTexture'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Texture2D* ret = cobj->getTexture(); + object_to_luaval(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTexture",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_setTextureAtlas(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_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) + return 0; + cobj->setTextureAtlas(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTextureAtlas",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_getTextureAtlas(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); + object_to_luaval(tolua_S, "cc.TextureAtlas",(cocos2d::TextureAtlas*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTextureAtlas",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_getQuadsToDraw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getQuadsToDraw(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getQuadsToDraw",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_setTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTexture'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Texture2D* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + if(!ok) + return 0; + cobj->setTexture(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTexture",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_setQuadsToDraw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'", 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.AtlasNode:setQuadsToDraw"); + if(!ok) + return 0; + cobj->setQuadsToDraw(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setQuadsToDraw",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 4) + { + std::string arg0; + int arg1; + int arg2; + int arg3; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AtlasNode:create"); + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.AtlasNode:create"); + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.AtlasNode:create"); + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.AtlasNode:create"); + if(!ok) + return 0; + cocos2d::AtlasNode* ret = cocos2d::AtlasNode::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.AtlasNode",(cocos2d::AtlasNode*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AtlasNode:create",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_AtlasNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (AtlasNode)"); + return 0; +} + +int lua_register_cocos2dx_AtlasNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.AtlasNode"); + tolua_cclass(tolua_S,"AtlasNode","cc.AtlasNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"AtlasNode"); + tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_AtlasNode_updateAtlasValues); + tolua_function(tolua_S,"getTexture",lua_cocos2dx_AtlasNode_getTexture); + tolua_function(tolua_S,"setTextureAtlas",lua_cocos2dx_AtlasNode_setTextureAtlas); + tolua_function(tolua_S,"getTextureAtlas",lua_cocos2dx_AtlasNode_getTextureAtlas); + tolua_function(tolua_S,"getQuadsToDraw",lua_cocos2dx_AtlasNode_getQuadsToDraw); + tolua_function(tolua_S,"setTexture",lua_cocos2dx_AtlasNode_setTexture); + tolua_function(tolua_S,"setQuadsToDraw",lua_cocos2dx_AtlasNode_setQuadsToDraw); + tolua_function(tolua_S,"create", lua_cocos2dx_AtlasNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::AtlasNode).name(); + g_luaType[typeName] = "cc.AtlasNode"; + g_typeCast["AtlasNode"] = "cc.AtlasNode"; + 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) + return 0; + cobj->setString(arg0); + return 0; + } + CCLOG("%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; + CCLOG("%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_updateAtlasValues(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_updateAtlasValues'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateAtlasValues(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:updateAtlasValues",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'.",&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) + return 0; + const std::string& ret = cobj->getString(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%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; + CCLOG("%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; +} +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,"setString",lua_cocos2dx_LabelAtlas_setString); + tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelAtlas_initWithString); + tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_LabelAtlas_updateAtlasValues); + 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_Scene_getPhysicsWorld(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_getPhysicsWorld'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::PhysicsWorld* ret = cobj->getPhysicsWorld(); + object_to_luaval(tolua_S, "cc.PhysicsWorld",(cocos2d::PhysicsWorld*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:getPhysicsWorld",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_getPhysicsWorld'.",&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) + return 0; + cocos2d::Scene* ret = cocos2d::Scene::createWithSize(arg0); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + CCLOG("%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) + return 0; + cocos2d::Scene* ret = cocos2d::Scene::create(); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + CCLOG("%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_createWithPhysics(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) + return 0; + cocos2d::Scene* ret = cocos2d::Scene::createWithPhysics(); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:createWithPhysics",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_createWithPhysics'.",&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,"getPhysicsWorld",lua_cocos2dx_Scene_getPhysicsWorld); + tolua_function(tolua_S,"createWithSize", lua_cocos2dx_Scene_createWithSize); + tolua_function(tolua_S,"create", lua_cocos2dx_Scene_create); + tolua_function(tolua_S,"createWithPhysics", lua_cocos2dx_Scene_createWithPhysics); + 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; @@ -7571,8340 +17783,6 @@ int lua_register_cocos2dx_UserDefault(lua_State* tolua_S) return 1; } -int lua_cocos2dx_Texture2D_getMaxT(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getMaxT'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getMaxT(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getMaxT",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getMaxT'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getStringForFormat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getStringForFormat'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const char* ret = cobj->getStringForFormat(); - tolua_pushstring(tolua_S,(const char*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getStringForFormat",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getStringForFormat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_initWithImage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_initWithImage'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Image* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); - - if (!ok) { break; } - cocos2d::Texture2D::PixelFormat arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Texture2D:initWithImage"); - - if (!ok) { break; } - bool ret = cobj->initWithImage(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Image* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); - - if (!ok) { break; } - bool ret = cobj->initWithImage(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:initWithImage",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_initWithImage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getMaxS(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getMaxS'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getMaxS(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getMaxS",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getMaxS'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_releaseGLTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_releaseGLTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->releaseGLTexture(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:releaseGLTexture",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_releaseGLTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_hasPremultipliedAlpha(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_hasPremultipliedAlpha'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->hasPremultipliedAlpha(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:hasPremultipliedAlpha",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_hasPremultipliedAlpha'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getPixelsHigh(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelsHigh'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getPixelsHigh(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelsHigh",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelsHigh'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getBitsPerPixelForFormat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getBitsPerPixelForFormat'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D::PixelFormat arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Texture2D:getBitsPerPixelForFormat"); - - if (!ok) { break; } - unsigned int ret = cobj->getBitsPerPixelForFormat(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - unsigned int ret = cobj->getBitsPerPixelForFormat(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getBitsPerPixelForFormat",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getBitsPerPixelForFormat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned int ret = cobj->getName(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_initWithString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_initWithString'", 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.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - cocos2d::FontDefinition arg1; - ok &= luaval_to_fontdefinition(tolua_S, 3, &arg1, "cc.Texture2D: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 == 3) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 4) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::Size arg3; - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 5) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::Size arg3; - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::TextHAlignment arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.Texture2D: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 == 6) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::Size arg3; - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::TextHAlignment arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::TextVAlignment arg5; - ok &= luaval_to_int32(tolua_S, 7,(int *)&arg5, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4, arg5); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:initWithString",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_initWithString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setMaxT(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setMaxT'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Texture2D:setMaxT"); - if(!ok) - return 0; - cobj->setMaxT(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setMaxT",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setMaxT'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_drawInRect(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_drawInRect'", 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.Texture2D:drawInRect"); - if(!ok) - return 0; - cobj->drawInRect(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:drawInRect",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_drawInRect'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getContentSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getContentSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Size ret = cobj->getContentSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getContentSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getContentSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setAliasTexParameters(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setAliasTexParameters'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->setAliasTexParameters(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setAliasTexParameters",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setAliasTexParameters'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setAntiAliasTexParameters(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setAntiAliasTexParameters'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->setAntiAliasTexParameters(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setAntiAliasTexParameters",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setAntiAliasTexParameters'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_generateMipmap(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_generateMipmap'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->generateMipmap(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:generateMipmap",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_generateMipmap'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getDescription(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getDescription'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getDescription(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getDescription",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getDescription'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getPixelFormat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelFormat'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = (int)cobj->getPixelFormat(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelFormat",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelFormat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgram* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cobj->setGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getContentSizeInPixels(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getContentSizeInPixels'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Size& ret = cobj->getContentSizeInPixels(); - size_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getContentSizeInPixels",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getContentSizeInPixels'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getPixelsWide(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelsWide'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getPixelsWide(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelsWide",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelsWide'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_drawAtPoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_drawAtPoint'", 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.Texture2D:drawAtPoint"); - if(!ok) - return 0; - cobj->drawAtPoint(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:drawAtPoint",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_drawAtPoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getGLProgram",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_hasMipmaps(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_hasMipmaps'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->hasMipmaps(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:hasMipmaps",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_hasMipmaps'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setMaxS(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setMaxS'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Texture2D:setMaxS"); - if(!ok) - return 0; - cobj->setMaxS(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setMaxS",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setMaxS'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat(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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Texture2D::PixelFormat arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Texture2D:setDefaultAlphaPixelFormat"); - if(!ok) - return 0; - cocos2d::Texture2D::setDefaultAlphaPixelFormat(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Texture2D:setDefaultAlphaPixelFormat",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat(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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - return 0; - int ret = (int)cocos2d::Texture2D::getDefaultAlphaPixelFormat(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Texture2D:getDefaultAlphaPixelFormat",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Texture2D_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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) - return 0; - cobj = new cocos2d::Texture2D(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Texture2D"); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:Texture2D",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Texture2D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Texture2D)"); - return 0; -} - -int lua_register_cocos2dx_Texture2D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Texture2D"); - tolua_cclass(tolua_S,"Texture2D","cc.Texture2D","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Texture2D"); - tolua_function(tolua_S,"new",lua_cocos2dx_Texture2D_constructor); - tolua_function(tolua_S,"getMaxT",lua_cocos2dx_Texture2D_getMaxT); - tolua_function(tolua_S,"getStringForFormat",lua_cocos2dx_Texture2D_getStringForFormat); - tolua_function(tolua_S,"initWithImage",lua_cocos2dx_Texture2D_initWithImage); - tolua_function(tolua_S,"getMaxS",lua_cocos2dx_Texture2D_getMaxS); - tolua_function(tolua_S,"releaseGLTexture",lua_cocos2dx_Texture2D_releaseGLTexture); - tolua_function(tolua_S,"hasPremultipliedAlpha",lua_cocos2dx_Texture2D_hasPremultipliedAlpha); - tolua_function(tolua_S,"getPixelsHigh",lua_cocos2dx_Texture2D_getPixelsHigh); - tolua_function(tolua_S,"getBitsPerPixelForFormat",lua_cocos2dx_Texture2D_getBitsPerPixelForFormat); - tolua_function(tolua_S,"getName",lua_cocos2dx_Texture2D_getName); - tolua_function(tolua_S,"initWithString",lua_cocos2dx_Texture2D_initWithString); - tolua_function(tolua_S,"setMaxT",lua_cocos2dx_Texture2D_setMaxT); - tolua_function(tolua_S,"drawInRect",lua_cocos2dx_Texture2D_drawInRect); - tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Texture2D_getContentSize); - tolua_function(tolua_S,"setAliasTexParameters",lua_cocos2dx_Texture2D_setAliasTexParameters); - tolua_function(tolua_S,"setAntiAliasTexParameters",lua_cocos2dx_Texture2D_setAntiAliasTexParameters); - tolua_function(tolua_S,"generateMipmap",lua_cocos2dx_Texture2D_generateMipmap); - tolua_function(tolua_S,"getDescription",lua_cocos2dx_Texture2D_getDescription); - tolua_function(tolua_S,"getPixelFormat",lua_cocos2dx_Texture2D_getPixelFormat); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Texture2D_setGLProgram); - tolua_function(tolua_S,"getContentSizeInPixels",lua_cocos2dx_Texture2D_getContentSizeInPixels); - tolua_function(tolua_S,"getPixelsWide",lua_cocos2dx_Texture2D_getPixelsWide); - tolua_function(tolua_S,"drawAtPoint",lua_cocos2dx_Texture2D_drawAtPoint); - tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Texture2D_getGLProgram); - tolua_function(tolua_S,"hasMipmaps",lua_cocos2dx_Texture2D_hasMipmaps); - tolua_function(tolua_S,"setMaxS",lua_cocos2dx_Texture2D_setMaxS); - tolua_function(tolua_S,"setDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat); - tolua_function(tolua_S,"getDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Texture2D).name(); - g_luaType[typeName] = "cc.Texture2D"; - g_typeCast["Texture2D"] = "cc.Texture2D"; - return 1; -} - -int lua_cocos2dx_Touch_getPreviousLocationInView(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getPreviousLocationInView'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getPreviousLocationInView(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getPreviousLocationInView",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getPreviousLocationInView'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getLocation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getLocation(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getLocation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getDelta(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getDelta'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getDelta(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getDelta",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getDelta'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getStartLocationInView(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getStartLocationInView'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getStartLocationInView(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getStartLocationInView",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getStartLocationInView'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getStartLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getStartLocation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getStartLocation(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getStartLocation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getStartLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getID(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getID'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getID(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getID",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getID'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_setTouchInfo(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_setTouchInfo'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - int arg0; - double arg1; - double arg2; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Touch:setTouchInfo"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Touch:setTouchInfo"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Touch:setTouchInfo"); - if(!ok) - return 0; - cobj->setTouchInfo(arg0, arg1, arg2); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:setTouchInfo",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_setTouchInfo'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getLocationInView(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getLocationInView'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getLocationInView(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getLocationInView",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getLocationInView'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getPreviousLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getPreviousLocation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getPreviousLocation(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getPreviousLocation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getPreviousLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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) - return 0; - cobj = new cocos2d::Touch(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Touch"); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:Touch",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Touch_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Touch)"); - return 0; -} - -int lua_register_cocos2dx_Touch(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Touch"); - tolua_cclass(tolua_S,"Touch","cc.Touch","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Touch"); - tolua_function(tolua_S,"new",lua_cocos2dx_Touch_constructor); - tolua_function(tolua_S,"getPreviousLocationInView",lua_cocos2dx_Touch_getPreviousLocationInView); - tolua_function(tolua_S,"getLocation",lua_cocos2dx_Touch_getLocation); - tolua_function(tolua_S,"getDelta",lua_cocos2dx_Touch_getDelta); - tolua_function(tolua_S,"getStartLocationInView",lua_cocos2dx_Touch_getStartLocationInView); - tolua_function(tolua_S,"getStartLocation",lua_cocos2dx_Touch_getStartLocation); - tolua_function(tolua_S,"getId",lua_cocos2dx_Touch_getID); - tolua_function(tolua_S,"setTouchInfo",lua_cocos2dx_Touch_setTouchInfo); - tolua_function(tolua_S,"getLocationInView",lua_cocos2dx_Touch_getLocationInView); - tolua_function(tolua_S,"getPreviousLocation",lua_cocos2dx_Touch_getPreviousLocation); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Touch).name(); - g_luaType[typeName] = "cc.Touch"; - g_typeCast["Touch"] = "cc.Touch"; - return 1; -} - -int lua_cocos2dx_EventKeyboard_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::EventKeyboard* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::EventKeyboard::KeyCode arg0; - bool arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.EventKeyboard:EventKeyboard"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.EventKeyboard:EventKeyboard"); - if(!ok) - return 0; - cobj = new cocos2d::EventKeyboard(arg0, arg1); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventKeyboard"); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventKeyboard:EventKeyboard",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventKeyboard_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_EventKeyboard_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (EventKeyboard)"); - return 0; -} - -int lua_register_cocos2dx_EventKeyboard(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.EventKeyboard"); - tolua_cclass(tolua_S,"EventKeyboard","cc.EventKeyboard","cc.Event",nullptr); - - tolua_beginmodule(tolua_S,"EventKeyboard"); - tolua_function(tolua_S,"new",lua_cocos2dx_EventKeyboard_constructor); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventKeyboard).name(); - g_luaType[typeName] = "cc.EventKeyboard"; - g_typeCast["EventKeyboard"] = "cc.EventKeyboard"; - return 1; -} - -int lua_cocos2dx_Node_addChild(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_addChild'", 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.Node:addChild"); - - if (!ok) { break; } - cobj->addChild(arg0, arg1); - return 0; - } - }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->addChild(arg0); - return 0; - } - }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.Node:addChild"); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.Node:addChild"); - - if (!ok) { break; } - cobj->addChild(arg0, arg1, arg2); - return 0; - } - }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.Node:addChild"); - - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.Node:addChild"); - - if (!ok) { break; } - cobj->addChild(arg0, arg1, arg2); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:addChild",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_addChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeComponent(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_removeComponent'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Component* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); - - if (!ok) { break; } - bool ret = cobj->removeComponent(arg0); - 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.Node:removeComponent"); - - if (!ok) { break; } - bool ret = cobj->removeComponent(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeComponent",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeComponent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPhysicsBody(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_setPhysicsBody'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::PhysicsBody* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - if(!ok) - return 0; - cobj->setPhysicsBody(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPhysicsBody",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPhysicsBody'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getDescription(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_getDescription'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getDescription(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDescription",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDescription'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setRotationSkewY(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_setRotationSkewY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotationSkewY"); - if(!ok) - return 0; - cobj->setRotationSkewY(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotationSkewY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotationSkewY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOpacityModifyRGB(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_setOpacityModifyRGB'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setOpacityModifyRGB"); - if(!ok) - return 0; - cobj->setOpacityModifyRGB(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOpacityModifyRGB",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOpacityModifyRGB'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setCascadeOpacityEnabled(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_setCascadeOpacityEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setCascadeOpacityEnabled"); - if(!ok) - return 0; - cobj->setCascadeOpacityEnabled(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCascadeOpacityEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCascadeOpacityEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getChildren(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_getChildren'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - const cocos2d::Vector& ret = cobj->getChildren(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cocos2d::Vector& ret = cobj->getChildren(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildren'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOnExitCallback(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_setOnExitCallback'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::function arg0; - - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - if(!ok) - return 0; - cobj->setOnExitCallback(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOnExitCallback",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOnExitCallback'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_pause(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_pause'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->pause(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:pause",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_pause'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertToWorldSpaceAR(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_convertToWorldSpaceAR'", 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.Node:convertToWorldSpaceAR"); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertToWorldSpaceAR(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToWorldSpaceAR",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToWorldSpaceAR'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isIgnoreAnchorPointForPosition(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_isIgnoreAnchorPointForPosition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isIgnoreAnchorPointForPosition(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isIgnoreAnchorPointForPosition",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isIgnoreAnchorPointForPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getChildByName(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_getChildByName'", 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.Node:getChildByName"); - if(!ok) - return 0; - cocos2d::Node* ret = cobj->getChildByName(arg0); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_updateDisplayedOpacity(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_updateDisplayedOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - uint16_t arg0; - - ok &= luaval_to_uint16(tolua_S, 2,&arg0, "cc.Node:updateDisplayedOpacity"); - if(!ok) - return 0; - cobj->updateDisplayedOpacity(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateDisplayedOpacity",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateDisplayedOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getCameraMask(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_getCameraMask'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned short ret = cobj->getCameraMask(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getCameraMask",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getCameraMask'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setRotation(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_setRotation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotation"); - if(!ok) - return 0; - cobj->setRotation(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotation",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScaleZ(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_setScaleZ'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleZ"); - if(!ok) - return 0; - cobj->setScaleZ(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleZ",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleZ'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScaleY(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_setScaleY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleY"); - if(!ok) - return 0; - cobj->setScaleY(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScaleX(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_setScaleX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleX"); - if(!ok) - return 0; - cobj->setScaleX(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setRotationSkewX(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_setRotationSkewX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotationSkewX"); - if(!ok) - return 0; - cobj->setRotationSkewX(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotationSkewX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotationSkewX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback(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_setonEnterTransitionDidFinishCallback'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::function arg0; - - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - if(!ok) - return 0; - cobj->setonEnterTransitionDidFinishCallback(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setonEnterTransitionDidFinishCallback",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeAllComponents(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_removeAllComponents'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->removeAllComponents(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeAllComponents",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeAllComponents'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node__setLocalZOrder(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__setLocalZOrder'", 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.Node:_setLocalZOrder"); - if(!ok) - return 0; - cobj->_setLocalZOrder(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:_setLocalZOrder",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node__setLocalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setCameraMask(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_setCameraMask'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned short arg0; - - ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); - if(!ok) - return 0; - cobj->setCameraMask(arg0); - return 0; - } - if (argc == 2) - { - unsigned short arg0; - bool arg1; - - ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:setCameraMask"); - if(!ok) - return 0; - cobj->setCameraMask(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCameraMask",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCameraMask'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getTag(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_getTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getTag(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getTag",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getGLProgram(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_getGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGLProgram",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNodeToWorldTransform(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_getNodeToWorldTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Mat4 ret = cobj->getNodeToWorldTransform(); - mat4_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToWorldTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToWorldTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPosition3D(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_getPosition3D'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec3 ret = cobj->getPosition3D(); - vec3_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPosition3D",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPosition3D'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeChild(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_removeChild'", 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) - return 0; - cobj->removeChild(arg0); - return 0; - } - 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.Node:removeChild"); - if(!ok) - return 0; - cobj->removeChild(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChild",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertToWorldSpace(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_convertToWorldSpace'", 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.Node:convertToWorldSpace"); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertToWorldSpace(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToWorldSpace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToWorldSpace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScene(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_getScene'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Scene* ret = cobj->getScene(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getEventDispatcher(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_getEventDispatcher'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::EventDispatcher* ret = cobj->getEventDispatcher(); - object_to_luaval(tolua_S, "cc.EventDispatcher",(cocos2d::EventDispatcher*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getEventDispatcher",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getEventDispatcher'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setSkewX(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_setSkewX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setSkewX"); - if(!ok) - return 0; - cobj->setSkewX(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setSkewX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setSkewX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setGLProgramState(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_setGLProgramState'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgramState* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0); - if(!ok) - return 0; - cobj->setGLProgramState(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgramState",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgramState'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOnEnterCallback(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_setOnEnterCallback'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::function arg0; - - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - if(!ok) - return 0; - cobj->setOnEnterCallback(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOnEnterCallback",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOnEnterCallback'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getOpacity(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_getOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - uint16_t ret = cobj->getOpacity(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setNormalizedPosition(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_setNormalizedPosition'", 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.Node:setNormalizedPosition"); - if(!ok) - return 0; - cobj->setNormalizedPosition(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setNormalizedPosition",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setNormalizedPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setonExitTransitionDidStartCallback(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_setonExitTransitionDidStartCallback'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::function arg0; - - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - if(!ok) - return 0; - cobj->setonExitTransitionDidStartCallback(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setonExitTransitionDidStartCallback",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setonExitTransitionDidStartCallback'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertTouchToNodeSpace(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_convertTouchToNodeSpace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Touch* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertTouchToNodeSpace(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertTouchToNodeSpace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertTouchToNodeSpace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeAllChildrenWithCleanup(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_removeAllChildrenWithCleanup'", 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.Node:removeAllChildrenWithCleanup"); - - if (!ok) { break; } - cobj->removeAllChildrenWithCleanup(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cobj->removeAllChildren(); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeAllChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeAllChildrenWithCleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNodeToParentAffineTransform(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_getNodeToParentAffineTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform(); - affinetransform_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentAffineTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToParentAffineTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isCascadeOpacityEnabled(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_isCascadeOpacityEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isCascadeOpacityEnabled(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isCascadeOpacityEnabled",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isCascadeOpacityEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setParent(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_setParent'", 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) - return 0; - cobj->setParent(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setParent",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setParent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getName(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_getName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getName(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getRotation3D(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_getRotation3D'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec3 ret = cobj->getRotation3D(); - vec3_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotation3D",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotation3D'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNodeToParentTransform(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_getNodeToParentTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Mat4& ret = cobj->getNodeToParentTransform(); - mat4_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToParentTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertTouchToNodeSpaceAR(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_convertTouchToNodeSpaceAR'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Touch* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertTouchToNodeSpaceAR(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertTouchToNodeSpaceAR",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertTouchToNodeSpaceAR'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertToNodeSpace(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_convertToNodeSpace'", 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.Node:convertToNodeSpace"); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertToNodeSpace(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToNodeSpace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToNodeSpace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_resume(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_resume'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->resume(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:resume",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_resume'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPhysicsBody(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_getPhysicsBody'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::PhysicsBody* ret = cobj->getPhysicsBody(); - object_to_luaval(tolua_S, "cc.PhysicsBody",(cocos2d::PhysicsBody*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPhysicsBody",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPhysicsBody'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPosition(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_setPosition'", 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.Node:setPosition"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Node:setPosition"); - - if (!ok) { break; } - cobj->setPosition(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:setPosition"); - - if (!ok) { break; } - cobj->setPosition(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPosition",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_stopActionByTag(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_stopActionByTag'", 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.Node:stopActionByTag"); - if(!ok) - return 0; - cobj->stopActionByTag(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopActionByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopActionByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_reorderChild(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_reorderChild'", 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.Node:reorderChild"); - if(!ok) - return 0; - cobj->reorderChild(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:reorderChild",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_reorderChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_ignoreAnchorPointForPosition(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_ignoreAnchorPointForPosition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:ignoreAnchorPointForPosition"); - if(!ok) - return 0; - cobj->ignoreAnchorPointForPosition(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:ignoreAnchorPointForPosition",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_ignoreAnchorPointForPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setSkewY(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_setSkewY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setSkewY"); - if(!ok) - return 0; - cobj->setSkewY(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setSkewY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setSkewY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPositionZ(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_setPositionZ'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionZ"); - if(!ok) - return 0; - cobj->setPositionZ(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionZ",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionZ'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setRotation3D(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_setRotation3D'", 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.Node:setRotation3D"); - if(!ok) - return 0; - cobj->setRotation3D(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotation3D",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotation3D'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPositionX(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_setPositionX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionX"); - if(!ok) - return 0; - cobj->setPositionX(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setNodeToParentTransform(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_setNodeToParentTransform'", 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.Node:setNodeToParentTransform"); - if(!ok) - return 0; - cobj->setNodeToParentTransform(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setNodeToParentTransform",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setNodeToParentTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getAnchorPoint(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_getAnchorPoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Vec2& ret = cobj->getAnchorPoint(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getAnchorPoint",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getAnchorPoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNumberOfRunningActions(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_getNumberOfRunningActions'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getNumberOfRunningActions(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNumberOfRunningActions",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNumberOfRunningActions'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_updateTransform(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_updateTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateTransform(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setGLProgram(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_setGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgram* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cobj->setGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isVisible(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_isVisible'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isVisible(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isVisible",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isVisible'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getChildrenCount(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_getChildrenCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getChildrenCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildrenCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildrenCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertToNodeSpaceAR(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_convertToNodeSpaceAR'", 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.Node:convertToNodeSpaceAR"); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertToNodeSpaceAR(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToNodeSpaceAR",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToNodeSpaceAR'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_addComponent(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_addComponent'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Component* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); - if(!ok) - return 0; - bool ret = cobj->addComponent(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:addComponent",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_addComponent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_runAction(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_runAction'", 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) - return 0; - cocos2d::Action* ret = cobj->runAction(arg0); - object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:runAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_runAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isOpacityModifyRGB(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_isOpacityModifyRGB'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isOpacityModifyRGB(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isOpacityModifyRGB",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isOpacityModifyRGB'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getRotation(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_getRotation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getRotation(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getAnchorPointInPoints(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_getAnchorPointInPoints'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Vec2& ret = cobj->getAnchorPointInPoints(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getAnchorPointInPoints",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getAnchorPointInPoints'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_visit(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_visit'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - cobj->visit(); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocos2d::Renderer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:visit"); - - if (!ok) { break; } - unsigned int arg2; - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:visit"); - - if (!ok) { break; } - cobj->visit(arg0, arg1, arg2); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:visit",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_visit'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeChildByName(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_removeChildByName'", 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.Node:removeChildByName"); - if(!ok) - return 0; - cobj->removeChildByName(arg0); - return 0; - } - if (argc == 2) - { - std::string arg0; - bool arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:removeChildByName"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChildByName"); - if(!ok) - return 0; - cobj->removeChildByName(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChildByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChildByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getGLProgramState(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_getGLProgramState'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cobj->getGLProgramState(); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGLProgramState",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGLProgramState'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScheduler(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_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) - return 0; - cobj->setScheduler(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScheduler",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScheduler'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_stopAllActions(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_stopAllActions'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->stopAllActions(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAllActions",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAllActions'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getSkewX(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_getSkewX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getSkewX(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getSkewX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getSkewX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getSkewY(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_getSkewY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getSkewY(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getSkewY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getSkewY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getDisplayedColor(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_getDisplayedColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Color3B& ret = cobj->getDisplayedColor(); - color3b_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDisplayedColor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDisplayedColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getActionByTag(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_getActionByTag'", 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.Node:getActionByTag"); - if(!ok) - return 0; - cocos2d::Action* ret = cobj->getActionByTag(arg0); - object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getActionByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getActionByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setName(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_setName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:setName"); - if(!ok) - return 0; - cobj->setName(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setAdditionalTransform(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_setAdditionalTransform'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::AffineTransform arg0; - ok &= luaval_to_affinetransform(tolua_S, 2, &arg0, "cc.Node:setAdditionalTransform"); - - if (!ok) { break; } - cobj->setAdditionalTransform(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Mat4* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Mat4",&arg0); - - if (!ok) { break; } - cobj->setAdditionalTransform(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setAdditionalTransform",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setAdditionalTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getDisplayedOpacity(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_getDisplayedOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - uint16_t ret = cobj->getDisplayedOpacity(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDisplayedOpacity",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDisplayedOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getLocalZOrder(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_getLocalZOrder'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getLocalZOrder(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getLocalZOrder",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getLocalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScheduler(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_getScheduler'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - const cocos2d::Scheduler* ret = cobj->getScheduler(); - object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cocos2d::Scheduler* ret = cobj->getScheduler(); - object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScheduler",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScheduler'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getParentToNodeAffineTransform(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_getParentToNodeAffineTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::AffineTransform ret = cobj->getParentToNodeAffineTransform(); - affinetransform_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParentToNodeAffineTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParentToNodeAffineTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getOrderOfArrival(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_getOrderOfArrival'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getOrderOfArrival(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOrderOfArrival",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOrderOfArrival'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setActionManager(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_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) - return 0; - cobj->setActionManager(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setActionManager",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setActionManager'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setColor(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_setColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Color3B arg0; - - ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.Node:setColor"); - if(!ok) - return 0; - cobj->setColor(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setColor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isRunning(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_isRunning'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isRunning(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isRunning",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isRunning'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getParent(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_getParent'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - const cocos2d::Node* ret = cobj->getParent(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cocos2d::Node* ret = cobj->getParent(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParent",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPositionZ(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_getPositionZ'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getPositionZ(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionZ",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionZ'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPositionY(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_getPositionY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getPositionY(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPositionX(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_getPositionX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getPositionX(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeChildByTag(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_removeChildByTag'", 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.Node:removeChildByTag"); - if(!ok) - return 0; - cobj->removeChildByTag(arg0); - return 0; - } - if (argc == 2) - { - int arg0; - bool arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:removeChildByTag"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChildByTag"); - if(!ok) - return 0; - cobj->removeChildByTag(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChildByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChildByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPositionY(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_setPositionY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionY"); - if(!ok) - return 0; - cobj->setPositionY(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNodeToWorldAffineTransform(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_getNodeToWorldAffineTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::AffineTransform ret = cobj->getNodeToWorldAffineTransform(); - affinetransform_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToWorldAffineTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToWorldAffineTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_updateDisplayedColor(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_updateDisplayedColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Color3B arg0; - - ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.Node:updateDisplayedColor"); - if(!ok) - return 0; - cobj->updateDisplayedColor(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateDisplayedColor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateDisplayedColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setVisible(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_setVisible'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setVisible"); - if(!ok) - return 0; - cobj->setVisible(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setVisible",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setVisible'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getParentToNodeTransform(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_getParentToNodeTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Mat4& ret = cobj->getParentToNodeTransform(); - mat4_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParentToNodeTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParentToNodeTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setGlobalZOrder(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_setGlobalZOrder'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setGlobalZOrder"); - if(!ok) - return 0; - cobj->setGlobalZOrder(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGlobalZOrder",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGlobalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScale(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_setScale'", 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.Node:setScale"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Node:setScale"); - - if (!ok) { break; } - cobj->setScale(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScale"); - - if (!ok) { break; } - cobj->setScale(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScale",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScale'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getChildByTag(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_getChildByTag'", 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.Node:getChildByTag"); - if(!ok) - return 0; - cocos2d::Node* ret = cobj->getChildByTag(arg0); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOrderOfArrival(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_setOrderOfArrival'", 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.Node:setOrderOfArrival"); - if(!ok) - return 0; - cobj->setOrderOfArrival(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOrderOfArrival",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOrderOfArrival'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScaleZ(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_getScaleZ'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getScaleZ(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleZ",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleZ'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScaleY(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_getScaleY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getScaleY(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScaleX(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_getScaleX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getScaleX(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setLocalZOrder(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_setLocalZOrder'", 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.Node:setLocalZOrder"); - if(!ok) - return 0; - cobj->setLocalZOrder(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setLocalZOrder",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setLocalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getWorldToNodeAffineTransform(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_getWorldToNodeAffineTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::AffineTransform ret = cobj->getWorldToNodeAffineTransform(); - affinetransform_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getWorldToNodeAffineTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getWorldToNodeAffineTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setCascadeColorEnabled(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_setCascadeColorEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setCascadeColorEnabled"); - if(!ok) - return 0; - cobj->setCascadeColorEnabled(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCascadeColorEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCascadeColorEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOpacity(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_setOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - uint16_t arg0; - - ok &= luaval_to_uint16(tolua_S, 2,&arg0, "cc.Node:setOpacity"); - if(!ok) - return 0; - cobj->setOpacity(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOpacity",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_cleanup(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_cleanup'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->cleanup(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:cleanup",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_cleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getComponent(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_getComponent'", 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.Node:getComponent"); - if(!ok) - return 0; - cocos2d::Component* ret = cobj->getComponent(arg0); - object_to_luaval(tolua_S, "cc.Component",(cocos2d::Component*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getComponent",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getComponent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getContentSize(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_getContentSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Size& ret = cobj->getContentSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getContentSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getContentSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_stopAllActionsByTag(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_stopAllActionsByTag'", 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.Node:stopAllActionsByTag"); - if(!ok) - return 0; - cobj->stopAllActionsByTag(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAllActionsByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAllActionsByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getColor(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_getColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Color3B& ret = cobj->getColor(); - color3b_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getColor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getBoundingBox(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_getBoundingBox'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Rect ret = cobj->getBoundingBox(); - rect_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getBoundingBox",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getBoundingBox'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setEventDispatcher(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_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) - return 0; - cobj->setEventDispatcher(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setEventDispatcher",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setEventDispatcher'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getGlobalZOrder(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_getGlobalZOrder'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getGlobalZOrder(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGlobalZOrder",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGlobalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_draw(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_draw'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - cobj->draw(); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocos2d::Renderer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:draw"); - - if (!ok) { break; } - unsigned int arg2; - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:draw"); - - if (!ok) { break; } - cobj->draw(arg0, arg1, arg2); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:draw",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_draw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setUserObject(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_setUserObject'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Ref* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); - if(!ok) - return 0; - cobj->setUserObject(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setUserObject",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setUserObject'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeFromParentAndCleanup(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_removeFromParentAndCleanup'", 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.Node:removeFromParentAndCleanup"); - - if (!ok) { break; } - cobj->removeFromParentAndCleanup(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cobj->removeFromParent(); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeFromParent",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeFromParentAndCleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPosition3D(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_setPosition3D'", 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.Node:setPosition3D"); - if(!ok) - return 0; - cobj->setPosition3D(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPosition3D",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPosition3D'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_update(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_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.Node:update"); - if(!ok) - return 0; - cobj->update(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:update",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_update'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_sortAllChildren(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_sortAllChildren'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->sortAllChildren(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:sortAllChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_sortAllChildren'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getWorldToNodeTransform(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_getWorldToNodeTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Mat4 ret = cobj->getWorldToNodeTransform(); - mat4_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getWorldToNodeTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getWorldToNodeTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScale(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_getScale'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getScale(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScale",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScale'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNormalizedPosition(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_getNormalizedPosition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Vec2& ret = cobj->getNormalizedPosition(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNormalizedPosition",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNormalizedPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getRotationSkewX(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_getRotationSkewX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getRotationSkewX(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotationSkewX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotationSkewX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getRotationSkewY(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_getRotationSkewY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getRotationSkewY(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotationSkewY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotationSkewY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setTag(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_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.Node:setTag"); - if(!ok) - return 0; - cobj->setTag(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isCascadeColorEnabled(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_isCascadeColorEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isCascadeColorEnabled(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isCascadeColorEnabled",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isCascadeColorEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_stopAction(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_stopAction'", 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) - return 0; - cobj->stopAction(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getActionManager(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_getActionManager'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - const cocos2d::ActionManager* ret = cobj->getActionManager(); - object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cocos2d::ActionManager* ret = cobj->getActionManager(); - object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getActionManager",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getActionManager'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Node* ret = cocos2d::Node::create(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Node:create",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_Node_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Node)"); - return 0; -} - -int lua_register_cocos2dx_Node(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Node"); - tolua_cclass(tolua_S,"Node","cc.Node","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Node"); - tolua_function(tolua_S,"addChild",lua_cocos2dx_Node_addChild); - tolua_function(tolua_S,"removeComponent",lua_cocos2dx_Node_removeComponent); - tolua_function(tolua_S,"setPhysicsBody",lua_cocos2dx_Node_setPhysicsBody); - tolua_function(tolua_S,"getDescription",lua_cocos2dx_Node_getDescription); - tolua_function(tolua_S,"setRotationSkewY",lua_cocos2dx_Node_setRotationSkewY); - tolua_function(tolua_S,"setOpacityModifyRGB",lua_cocos2dx_Node_setOpacityModifyRGB); - tolua_function(tolua_S,"setCascadeOpacityEnabled",lua_cocos2dx_Node_setCascadeOpacityEnabled); - tolua_function(tolua_S,"getChildren",lua_cocos2dx_Node_getChildren); - tolua_function(tolua_S,"setOnExitCallback",lua_cocos2dx_Node_setOnExitCallback); - tolua_function(tolua_S,"pause",lua_cocos2dx_Node_pause); - tolua_function(tolua_S,"convertToWorldSpaceAR",lua_cocos2dx_Node_convertToWorldSpaceAR); - tolua_function(tolua_S,"isIgnoreAnchorPointForPosition",lua_cocos2dx_Node_isIgnoreAnchorPointForPosition); - tolua_function(tolua_S,"getChildByName",lua_cocos2dx_Node_getChildByName); - tolua_function(tolua_S,"updateDisplayedOpacity",lua_cocos2dx_Node_updateDisplayedOpacity); - tolua_function(tolua_S,"getCameraMask",lua_cocos2dx_Node_getCameraMask); - tolua_function(tolua_S,"setRotation",lua_cocos2dx_Node_setRotation); - tolua_function(tolua_S,"setScaleZ",lua_cocos2dx_Node_setScaleZ); - tolua_function(tolua_S,"setScaleY",lua_cocos2dx_Node_setScaleY); - tolua_function(tolua_S,"setScaleX",lua_cocos2dx_Node_setScaleX); - tolua_function(tolua_S,"setRotationSkewX",lua_cocos2dx_Node_setRotationSkewX); - tolua_function(tolua_S,"setonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback); - tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents); - tolua_function(tolua_S,"_setLocalZOrder",lua_cocos2dx_Node__setLocalZOrder); - tolua_function(tolua_S,"setCameraMask",lua_cocos2dx_Node_setCameraMask); - tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag); - tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram); - tolua_function(tolua_S,"getNodeToWorldTransform",lua_cocos2dx_Node_getNodeToWorldTransform); - tolua_function(tolua_S,"getPosition3D",lua_cocos2dx_Node_getPosition3D); - tolua_function(tolua_S,"removeChild",lua_cocos2dx_Node_removeChild); - tolua_function(tolua_S,"convertToWorldSpace",lua_cocos2dx_Node_convertToWorldSpace); - tolua_function(tolua_S,"getScene",lua_cocos2dx_Node_getScene); - tolua_function(tolua_S,"getEventDispatcher",lua_cocos2dx_Node_getEventDispatcher); - tolua_function(tolua_S,"setSkewX",lua_cocos2dx_Node_setSkewX); - tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_Node_setGLProgramState); - tolua_function(tolua_S,"setOnEnterCallback",lua_cocos2dx_Node_setOnEnterCallback); - tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity); - 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,"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,"setParent",lua_cocos2dx_Node_setParent); - tolua_function(tolua_S,"getName",lua_cocos2dx_Node_getName); - tolua_function(tolua_S,"getRotation3D",lua_cocos2dx_Node_getRotation3D); - tolua_function(tolua_S,"getNodeToParentTransform",lua_cocos2dx_Node_getNodeToParentTransform); - tolua_function(tolua_S,"convertTouchToNodeSpaceAR",lua_cocos2dx_Node_convertTouchToNodeSpaceAR); - tolua_function(tolua_S,"convertToNodeSpace",lua_cocos2dx_Node_convertToNodeSpace); - tolua_function(tolua_S,"resume",lua_cocos2dx_Node_resume); - tolua_function(tolua_S,"getPhysicsBody",lua_cocos2dx_Node_getPhysicsBody); - tolua_function(tolua_S,"setPosition",lua_cocos2dx_Node_setPosition); - tolua_function(tolua_S,"stopActionByTag",lua_cocos2dx_Node_stopActionByTag); - tolua_function(tolua_S,"reorderChild",lua_cocos2dx_Node_reorderChild); - tolua_function(tolua_S,"ignoreAnchorPointForPosition",lua_cocos2dx_Node_ignoreAnchorPointForPosition); - tolua_function(tolua_S,"setSkewY",lua_cocos2dx_Node_setSkewY); - tolua_function(tolua_S,"setPositionZ",lua_cocos2dx_Node_setPositionZ); - tolua_function(tolua_S,"setRotation3D",lua_cocos2dx_Node_setRotation3D); - tolua_function(tolua_S,"setPositionX",lua_cocos2dx_Node_setPositionX); - tolua_function(tolua_S,"setNodeToParentTransform",lua_cocos2dx_Node_setNodeToParentTransform); - tolua_function(tolua_S,"getAnchorPoint",lua_cocos2dx_Node_getAnchorPoint); - tolua_function(tolua_S,"getNumberOfRunningActions",lua_cocos2dx_Node_getNumberOfRunningActions); - tolua_function(tolua_S,"updateTransform",lua_cocos2dx_Node_updateTransform); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram); - tolua_function(tolua_S,"isVisible",lua_cocos2dx_Node_isVisible); - tolua_function(tolua_S,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount); - tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR); - tolua_function(tolua_S,"addComponent",lua_cocos2dx_Node_addComponent); - tolua_function(tolua_S,"runAction",lua_cocos2dx_Node_runAction); - tolua_function(tolua_S,"isOpacityModifyRGB",lua_cocos2dx_Node_isOpacityModifyRGB); - tolua_function(tolua_S,"getRotation",lua_cocos2dx_Node_getRotation); - tolua_function(tolua_S,"getAnchorPointInPoints",lua_cocos2dx_Node_getAnchorPointInPoints); - tolua_function(tolua_S,"visit",lua_cocos2dx_Node_visit); - tolua_function(tolua_S,"removeChildByName",lua_cocos2dx_Node_removeChildByName); - tolua_function(tolua_S,"getGLProgramState",lua_cocos2dx_Node_getGLProgramState); - tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Node_setScheduler); - tolua_function(tolua_S,"stopAllActions",lua_cocos2dx_Node_stopAllActions); - tolua_function(tolua_S,"getSkewX",lua_cocos2dx_Node_getSkewX); - tolua_function(tolua_S,"getSkewY",lua_cocos2dx_Node_getSkewY); - tolua_function(tolua_S,"getDisplayedColor",lua_cocos2dx_Node_getDisplayedColor); - tolua_function(tolua_S,"getActionByTag",lua_cocos2dx_Node_getActionByTag); - tolua_function(tolua_S,"setName",lua_cocos2dx_Node_setName); - tolua_function(tolua_S,"setAdditionalTransform",lua_cocos2dx_Node_setAdditionalTransform); - tolua_function(tolua_S,"getDisplayedOpacity",lua_cocos2dx_Node_getDisplayedOpacity); - tolua_function(tolua_S,"getLocalZOrder",lua_cocos2dx_Node_getLocalZOrder); - tolua_function(tolua_S,"getScheduler",lua_cocos2dx_Node_getScheduler); - tolua_function(tolua_S,"getParentToNodeAffineTransform",lua_cocos2dx_Node_getParentToNodeAffineTransform); - tolua_function(tolua_S,"getOrderOfArrival",lua_cocos2dx_Node_getOrderOfArrival); - tolua_function(tolua_S,"setActionManager",lua_cocos2dx_Node_setActionManager); - tolua_function(tolua_S,"setColor",lua_cocos2dx_Node_setColor); - tolua_function(tolua_S,"isRunning",lua_cocos2dx_Node_isRunning); - tolua_function(tolua_S,"getParent",lua_cocos2dx_Node_getParent); - tolua_function(tolua_S,"getPositionZ",lua_cocos2dx_Node_getPositionZ); - tolua_function(tolua_S,"getPositionY",lua_cocos2dx_Node_getPositionY); - tolua_function(tolua_S,"getPositionX",lua_cocos2dx_Node_getPositionX); - tolua_function(tolua_S,"removeChildByTag",lua_cocos2dx_Node_removeChildByTag); - tolua_function(tolua_S,"setPositionY",lua_cocos2dx_Node_setPositionY); - tolua_function(tolua_S,"getNodeToWorldAffineTransform",lua_cocos2dx_Node_getNodeToWorldAffineTransform); - tolua_function(tolua_S,"updateDisplayedColor",lua_cocos2dx_Node_updateDisplayedColor); - tolua_function(tolua_S,"setVisible",lua_cocos2dx_Node_setVisible); - tolua_function(tolua_S,"getParentToNodeTransform",lua_cocos2dx_Node_getParentToNodeTransform); - tolua_function(tolua_S,"setGlobalZOrder",lua_cocos2dx_Node_setGlobalZOrder); - tolua_function(tolua_S,"setScale",lua_cocos2dx_Node_setScale); - tolua_function(tolua_S,"getChildByTag",lua_cocos2dx_Node_getChildByTag); - tolua_function(tolua_S,"setOrderOfArrival",lua_cocos2dx_Node_setOrderOfArrival); - tolua_function(tolua_S,"getScaleZ",lua_cocos2dx_Node_getScaleZ); - tolua_function(tolua_S,"getScaleY",lua_cocos2dx_Node_getScaleY); - tolua_function(tolua_S,"getScaleX",lua_cocos2dx_Node_getScaleX); - tolua_function(tolua_S,"setLocalZOrder",lua_cocos2dx_Node_setLocalZOrder); - tolua_function(tolua_S,"getWorldToNodeAffineTransform",lua_cocos2dx_Node_getWorldToNodeAffineTransform); - tolua_function(tolua_S,"setCascadeColorEnabled",lua_cocos2dx_Node_setCascadeColorEnabled); - tolua_function(tolua_S,"setOpacity",lua_cocos2dx_Node_setOpacity); - tolua_function(tolua_S,"cleanup",lua_cocos2dx_Node_cleanup); - tolua_function(tolua_S,"getComponent",lua_cocos2dx_Node_getComponent); - tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Node_getContentSize); - tolua_function(tolua_S,"stopAllActionsByTag",lua_cocos2dx_Node_stopAllActionsByTag); - tolua_function(tolua_S,"getColor",lua_cocos2dx_Node_getColor); - tolua_function(tolua_S,"getBoundingBox",lua_cocos2dx_Node_getBoundingBox); - tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Node_setEventDispatcher); - tolua_function(tolua_S,"getGlobalZOrder",lua_cocos2dx_Node_getGlobalZOrder); - tolua_function(tolua_S,"draw",lua_cocos2dx_Node_draw); - tolua_function(tolua_S,"setUserObject",lua_cocos2dx_Node_setUserObject); - tolua_function(tolua_S,"removeFromParent",lua_cocos2dx_Node_removeFromParentAndCleanup); - tolua_function(tolua_S,"setPosition3D",lua_cocos2dx_Node_setPosition3D); - tolua_function(tolua_S,"update",lua_cocos2dx_Node_update); - tolua_function(tolua_S,"sortAllChildren",lua_cocos2dx_Node_sortAllChildren); - tolua_function(tolua_S,"getWorldToNodeTransform",lua_cocos2dx_Node_getWorldToNodeTransform); - tolua_function(tolua_S,"getScale",lua_cocos2dx_Node_getScale); - tolua_function(tolua_S,"getNormalizedPosition",lua_cocos2dx_Node_getNormalizedPosition); - tolua_function(tolua_S,"getRotationSkewX",lua_cocos2dx_Node_getRotationSkewX); - tolua_function(tolua_S,"getRotationSkewY",lua_cocos2dx_Node_getRotationSkewY); - tolua_function(tolua_S,"setTag",lua_cocos2dx_Node_setTag); - tolua_function(tolua_S,"isCascadeColorEnabled",lua_cocos2dx_Node_isCascadeColorEnabled); - tolua_function(tolua_S,"stopAction",lua_cocos2dx_Node_stopAction); - tolua_function(tolua_S,"getActionManager",lua_cocos2dx_Node_getActionManager); - tolua_function(tolua_S,"create", lua_cocos2dx_Node_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Node).name(); - g_luaType[typeName] = "cc.Node"; - g_typeCast["Node"] = "cc.Node"; - return 1; -} - int lua_cocos2dx_Camera_getProjectionMatrix(lua_State* tolua_S) { int argc = 0; @@ -31903,1389 +33781,6 @@ int lua_register_cocos2dx_CatmullRomBy(lua_State* tolua_S) return 1; } -int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformTexture'", 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.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - unsigned int arg1; - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - unsigned int arg1; - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformTexture",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformMat4(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformMat4'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cobj->setUniformMat4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cobj->setUniformMat4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformMat4",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformMat4'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_applyUniforms(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyUniforms'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->applyUniforms(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyUniforms",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyUniforms'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_applyGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyGLProgram'", 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.GLProgramState:applyGLProgram"); - if(!ok) - return 0; - cobj->applyGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getUniformCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getUniformCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getUniformCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getUniformCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getUniformCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_applyAttributes(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyAttributes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->applyAttributes(); - return 0; - } - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLProgramState:applyAttributes"); - if(!ok) - return 0; - cobj->applyAttributes(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyAttributes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyAttributes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformFloat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformFloat'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - cobj->setUniformFloat(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - cobj->setUniformFloat(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformFloat",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformFloat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec3(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec3'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cocos2d::Vec3 arg1; - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cobj->setUniformVec3(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cocos2d::Vec3 arg1; - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cobj->setUniformVec3(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec3",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec3'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformInt(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformInt'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - cobj->setUniformInt(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - cobj->setUniformInt(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformInt",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformInt'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getVertexAttribCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getVertexAttribCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec4(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec4'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cocos2d::Vec4 arg1; - ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cobj->setUniformVec4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cocos2d::Vec4 arg1; - ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cobj->setUniformVec4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec4",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec4'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgram* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cobj->setGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec2(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec2'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cocos2d::Vec2 arg1; - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cobj->setUniformVec2(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cocos2d::Vec2 arg1; - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cobj->setUniformVec2(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec2",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec2'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getVertexAttribsFlags(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned int ret = cobj->getVertexAttribsFlags(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribsFlags",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_apply(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_apply'", 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.GLProgramState:apply"); - if(!ok) - return 0; - cobj->apply(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:apply",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_apply'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getGLProgram",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::create(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(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.GLProgramState",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.GLProgramState:getOrCreateWithGLProgramName"); - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgramName",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram(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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgram(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgram",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_GLProgramState_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (GLProgramState)"); - return 0; -} - -int lua_register_cocos2dx_GLProgramState(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.GLProgramState"); - tolua_cclass(tolua_S,"GLProgramState","cc.GLProgramState","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"GLProgramState"); - tolua_function(tolua_S,"setUniformTexture",lua_cocos2dx_GLProgramState_setUniformTexture); - tolua_function(tolua_S,"setUniformMat4",lua_cocos2dx_GLProgramState_setUniformMat4); - tolua_function(tolua_S,"applyUniforms",lua_cocos2dx_GLProgramState_applyUniforms); - tolua_function(tolua_S,"applyGLProgram",lua_cocos2dx_GLProgramState_applyGLProgram); - tolua_function(tolua_S,"getUniformCount",lua_cocos2dx_GLProgramState_getUniformCount); - tolua_function(tolua_S,"applyAttributes",lua_cocos2dx_GLProgramState_applyAttributes); - tolua_function(tolua_S,"setUniformFloat",lua_cocos2dx_GLProgramState_setUniformFloat); - tolua_function(tolua_S,"setUniformVec3",lua_cocos2dx_GLProgramState_setUniformVec3); - tolua_function(tolua_S,"setUniformInt",lua_cocos2dx_GLProgramState_setUniformInt); - tolua_function(tolua_S,"getVertexAttribCount",lua_cocos2dx_GLProgramState_getVertexAttribCount); - tolua_function(tolua_S,"setUniformVec4",lua_cocos2dx_GLProgramState_setUniformVec4); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_GLProgramState_setGLProgram); - tolua_function(tolua_S,"setUniformVec2",lua_cocos2dx_GLProgramState_setUniformVec2); - tolua_function(tolua_S,"getVertexAttribsFlags",lua_cocos2dx_GLProgramState_getVertexAttribsFlags); - tolua_function(tolua_S,"apply",lua_cocos2dx_GLProgramState_apply); - tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramState_getGLProgram); - tolua_function(tolua_S,"create", lua_cocos2dx_GLProgramState_create); - tolua_function(tolua_S,"getOrCreateWithGLProgramName", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName); - tolua_function(tolua_S,"getOrCreateWithGLProgram", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::GLProgramState).name(); - g_luaType[typeName] = "cc.GLProgramState"; - g_typeCast["GLProgramState"] = "cc.GLProgramState"; - return 1; -} - -int lua_cocos2dx_AtlasNode_updateAtlasValues(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateAtlasValues(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:updateAtlasValues",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_getTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Texture2D* ret = cobj->getTexture(); - object_to_luaval(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTexture",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_setTextureAtlas(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_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) - return 0; - cobj->setTextureAtlas(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTextureAtlas",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_getTextureAtlas(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); - object_to_luaval(tolua_S, "cc.TextureAtlas",(cocos2d::TextureAtlas*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTextureAtlas",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_getQuadsToDraw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getQuadsToDraw(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getQuadsToDraw",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Texture2D* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - if(!ok) - return 0; - cobj->setTexture(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_setQuadsToDraw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'", 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.AtlasNode:setQuadsToDraw"); - if(!ok) - return 0; - cobj->setQuadsToDraw(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setQuadsToDraw",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 4) - { - std::string arg0; - int arg1; - int arg2; - int arg3; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AtlasNode:create"); - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.AtlasNode:create"); - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.AtlasNode:create"); - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.AtlasNode:create"); - if(!ok) - return 0; - cocos2d::AtlasNode* ret = cocos2d::AtlasNode::create(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.AtlasNode",(cocos2d::AtlasNode*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AtlasNode:create",argc, 4); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_AtlasNode_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (AtlasNode)"); - return 0; -} - -int lua_register_cocos2dx_AtlasNode(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.AtlasNode"); - tolua_cclass(tolua_S,"AtlasNode","cc.AtlasNode","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"AtlasNode"); - tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_AtlasNode_updateAtlasValues); - tolua_function(tolua_S,"getTexture",lua_cocos2dx_AtlasNode_getTexture); - tolua_function(tolua_S,"setTextureAtlas",lua_cocos2dx_AtlasNode_setTextureAtlas); - tolua_function(tolua_S,"getTextureAtlas",lua_cocos2dx_AtlasNode_getTextureAtlas); - tolua_function(tolua_S,"getQuadsToDraw",lua_cocos2dx_AtlasNode_getQuadsToDraw); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_AtlasNode_setTexture); - tolua_function(tolua_S,"setQuadsToDraw",lua_cocos2dx_AtlasNode_setQuadsToDraw); - tolua_function(tolua_S,"create", lua_cocos2dx_AtlasNode_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::AtlasNode).name(); - g_luaType[typeName] = "cc.AtlasNode"; - g_typeCast["AtlasNode"] = "cc.AtlasNode"; - return 1; -} - int lua_cocos2dx_DrawNode_drawQuadraticBezier(lua_State* tolua_S) { int argc = 0; @@ -33717,10 +34212,10 @@ int lua_register_cocos2dx_DrawNode(lua_State* tolua_S) return 1; } -int lua_cocos2dx_LabelAtlas_setString(lua_State* tolua_S) +int lua_cocos2dx_GLProgram_getFragmentShaderLog(lua_State* tolua_S) { int argc = 0; - cocos2d::LabelAtlas* cobj = nullptr; + cocos2d::GLProgram* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -33729,15 +34224,479 @@ int lua_cocos2dx_LabelAtlas_setString(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::GLProgram*)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); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getFragmentShaderLog(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getFragmentShaderLog",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_initWithByteArrays(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithByteArrays'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + const char* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:initWithByteArrays"); arg0 = arg0_tmp.c_str(); + + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:initWithByteArrays"); arg1 = arg1_tmp.c_str(); + if(!ok) + return 0; + bool ret = cobj->initWithByteArrays(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithByteArrays",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithByteArrays'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_initWithFilenames(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithFilenames'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + std::string arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:initWithFilenames"); + + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:initWithFilenames"); + if(!ok) + return 0; + bool ret = cobj->initWithFilenames(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithFilenames",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithFilenames'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_use(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_use'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->use(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:use",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_use'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_getVertexShaderLog(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getVertexShaderLog(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getVertexShaderLog",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_setUniformsForBuiltins(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Mat4 arg0; + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgram:setUniformsForBuiltins"); + + if (!ok) { break; } + cobj->setUniformsForBuiltins(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cobj->setUniformsForBuiltins(); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformsForBuiltins",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_updateUniforms(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_updateUniforms'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateUniforms(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:updateUniforms",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_updateUniforms'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_setUniformLocationWith1i(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + int arg0; + int arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWith1i"); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgram:setUniformLocationWith1i"); + if(!ok) + return 0; + cobj->setUniformLocationWith1i(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWith1i",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_reset(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_reset'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->reset(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:reset",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_reset'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_bindAttribLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_bindAttribLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + unsigned int arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:bindAttribLocation"); + + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgram:bindAttribLocation"); + if(!ok) + return 0; + cobj->bindAttribLocation(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:bindAttribLocation",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_bindAttribLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_getAttribLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getAttribLocation'", nullptr); return 0; } #endif @@ -33747,306 +34706,202 @@ int lua_cocos2dx_LabelAtlas_setString(lua_State* tolua_S) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:setString"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:getAttribLocation"); if(!ok) return 0; - cobj->setString(arg0); - return 0; - } - CCLOG("%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; - CCLOG("%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_updateAtlasValues(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_updateAtlasValues'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateAtlasValues(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:updateAtlasValues",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'.",&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) - return 0; - const std::string& ret = cobj->getString(); - tolua_pushcppstring(tolua_S,ret); + int ret = cobj->getAttribLocation(arg0); + tolua_pushnumber(tolua_S,(lua_Number)ret); return 1; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:getString",argc, 0); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getAttribLocation",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_getString'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getAttribLocation'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_LabelAtlas_create(lua_State* tolua_S) +int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_link'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->link(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:link",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_link'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_createWithByteArrays(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; + if (!tolua_isusertable(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; #endif - argc = lua_gettop(tolua_S)-1; + argc = lua_gettop(tolua_S) - 1; - do + if (argc == 2) { - 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; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.LabelAtlas:create",argc, 2); + const char* arg0; + const char* arg1; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:createWithByteArrays"); arg0 = arg0_tmp.c_str(); + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:createWithByteArrays"); arg1 = arg1_tmp.c_str(); + if(!ok) + return 0; + cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithByteArrays(arg0, arg1); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithByteArrays",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_create'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithByteArrays'.",&tolua_err); #endif return 0; } -static int lua_cocos2dx_LabelAtlas_finalize(lua_State* tolua_S) +int lua_cocos2dx_GLProgram_createWithFilenames(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (LabelAtlas)"); + 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + std::string arg0; + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:createWithFilenames"); + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:createWithFilenames"); + if(!ok) + return 0; + cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithFilenames(arg0, arg1); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithFilenames",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithFilenames'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgram_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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) + return 0; + cobj = new cocos2d::GLProgram(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.GLProgram"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:GLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_constructor'.",&tolua_err); +#endif + return 0; } -int lua_register_cocos2dx_LabelAtlas(lua_State* tolua_S) +static int lua_cocos2dx_GLProgram_finalize(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.LabelAtlas"); - tolua_cclass(tolua_S,"LabelAtlas","cc.LabelAtlas","cc.AtlasNode",nullptr); + printf("luabindings: finalizing LUA object (GLProgram)"); + return 0; +} - tolua_beginmodule(tolua_S,"LabelAtlas"); - tolua_function(tolua_S,"setString",lua_cocos2dx_LabelAtlas_setString); - tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelAtlas_initWithString); - tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_LabelAtlas_updateAtlasValues); - tolua_function(tolua_S,"getString",lua_cocos2dx_LabelAtlas_getString); - tolua_function(tolua_S,"_create", lua_cocos2dx_LabelAtlas_create); +int lua_register_cocos2dx_GLProgram(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.GLProgram"); + tolua_cclass(tolua_S,"GLProgram","cc.GLProgram","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"GLProgram"); + tolua_function(tolua_S,"new",lua_cocos2dx_GLProgram_constructor); + tolua_function(tolua_S,"getFragmentShaderLog",lua_cocos2dx_GLProgram_getFragmentShaderLog); + tolua_function(tolua_S,"initWithByteArrays",lua_cocos2dx_GLProgram_initWithByteArrays); + tolua_function(tolua_S,"initWithFilenames",lua_cocos2dx_GLProgram_initWithFilenames); + tolua_function(tolua_S,"use",lua_cocos2dx_GLProgram_use); + tolua_function(tolua_S,"getVertexShaderLog",lua_cocos2dx_GLProgram_getVertexShaderLog); + tolua_function(tolua_S,"setUniformsForBuiltins",lua_cocos2dx_GLProgram_setUniformsForBuiltins); + tolua_function(tolua_S,"updateUniforms",lua_cocos2dx_GLProgram_updateUniforms); + tolua_function(tolua_S,"setUniformLocationI32",lua_cocos2dx_GLProgram_setUniformLocationWith1i); + tolua_function(tolua_S,"reset",lua_cocos2dx_GLProgram_reset); + tolua_function(tolua_S,"bindAttribLocation",lua_cocos2dx_GLProgram_bindAttribLocation); + tolua_function(tolua_S,"getAttribLocation",lua_cocos2dx_GLProgram_getAttribLocation); + tolua_function(tolua_S,"link",lua_cocos2dx_GLProgram_link); + tolua_function(tolua_S,"createWithByteArrays", lua_cocos2dx_GLProgram_createWithByteArrays); + tolua_function(tolua_S,"createWithFilenames", lua_cocos2dx_GLProgram_createWithFilenames); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::LabelAtlas).name(); - g_luaType[typeName] = "cc.LabelAtlas"; - g_typeCast["LabelAtlas"] = "cc.LabelAtlas"; + std::string typeName = typeid(cocos2d::GLProgram).name(); + g_luaType[typeName] = "cc.GLProgram"; + g_typeCast["GLProgram"] = "cc.GLProgram"; return 1; } @@ -38416,168 +39271,6 @@ int lua_register_cocos2dx_LayerMultiplex(lua_State* tolua_S) return 1; } -int lua_cocos2dx_Scene_getPhysicsWorld(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_getPhysicsWorld'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::PhysicsWorld* ret = cobj->getPhysicsWorld(); - object_to_luaval(tolua_S, "cc.PhysicsWorld",(cocos2d::PhysicsWorld*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:getPhysicsWorld",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_getPhysicsWorld'.",&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) - return 0; - cocos2d::Scene* ret = cocos2d::Scene::createWithSize(arg0); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - CCLOG("%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) - return 0; - cocos2d::Scene* ret = cocos2d::Scene::create(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - CCLOG("%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_createWithPhysics(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) - return 0; - cocos2d::Scene* ret = cocos2d::Scene::createWithPhysics(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:createWithPhysics",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_createWithPhysics'.",&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,"getPhysicsWorld",lua_cocos2dx_Scene_getPhysicsWorld); - tolua_function(tolua_S,"createWithSize", lua_cocos2dx_Scene_createWithSize); - tolua_function(tolua_S,"create", lua_cocos2dx_Scene_create); - tolua_function(tolua_S,"createWithPhysics", lua_cocos2dx_Scene_createWithPhysics); - 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_TransitionEaseScene_easeActionWithAction(lua_State* tolua_S) { int argc = 0; @@ -44447,618 +45140,6 @@ int lua_register_cocos2dx_MotionStreak(lua_State* tolua_S) return 1; } -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) - return 0; - bool ret = cobj->isReverseDirection(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%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) - return 0; - cobj->setBarChangeRate(arg0); - return 0; - } - CCLOG("%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) - return 0; - double ret = cobj->getPercentage(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%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) - return 0; - cobj->setSprite(arg0); - return 0; - } - CCLOG("%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) - return 0; - int ret = (int)cobj->getType(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%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) - return 0; - cocos2d::Sprite* ret = cobj->getSprite(); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - CCLOG("%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) - return 0; - cobj->setMidpoint(arg0); - return 0; - } - CCLOG("%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) - return 0; - cocos2d::Vec2 ret = cobj->getBarChangeRate(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%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); - return 0; - } - }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); - return 0; - } - }while(0); - ok = true; - CCLOG("%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) - return 0; - cocos2d::Vec2 ret = cobj->getMidpoint(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%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) - return 0; - cobj->setPercentage(arg0); - return 0; - } - CCLOG("%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) - return 0; - cobj->setType(arg0); - return 0; - } - CCLOG("%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) - return 0; - cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); - object_to_luaval(tolua_S, "cc.ProgressTimer",(cocos2d::ProgressTimer*)ret); - return 1; - } - CCLOG("%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; -} -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,"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; @@ -46462,6 +46543,618 @@ int lua_register_cocos2dx_Sprite(lua_State* tolua_S) return 1; } +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) + return 0; + bool ret = cobj->isReverseDirection(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%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) + return 0; + cobj->setBarChangeRate(arg0); + return 0; + } + CCLOG("%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) + return 0; + double ret = cobj->getPercentage(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%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) + return 0; + cobj->setSprite(arg0); + return 0; + } + CCLOG("%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) + return 0; + int ret = (int)cobj->getType(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%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) + return 0; + cocos2d::Sprite* ret = cobj->getSprite(); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + CCLOG("%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) + return 0; + cobj->setMidpoint(arg0); + return 0; + } + CCLOG("%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) + return 0; + cocos2d::Vec2 ret = cobj->getBarChangeRate(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%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); + return 0; + } + }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); + return 0; + } + }while(0); + ok = true; + CCLOG("%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) + return 0; + cocos2d::Vec2 ret = cobj->getMidpoint(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%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) + return 0; + cobj->setPercentage(arg0); + return 0; + } + CCLOG("%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) + return 0; + cobj->setType(arg0); + return 0; + } + CCLOG("%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) + return 0; + cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); + object_to_luaval(tolua_S, "cc.ProgressTimer",(cocos2d::ProgressTimer*)ret); + return 1; + } + CCLOG("%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; +} +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,"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_Image_hasPremultipliedAlpha(lua_State* tolua_S) { int argc = 0; @@ -56068,699 +56761,6 @@ int lua_register_cocos2dx_TiledGrid3D(lua_State* tolua_S) return 1; } -int lua_cocos2dx_GLProgram_getFragmentShaderLog(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getFragmentShaderLog(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getFragmentShaderLog",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_initWithByteArrays(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithByteArrays'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - const char* arg0; - const char* arg1; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:initWithByteArrays"); arg0 = arg0_tmp.c_str(); - - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:initWithByteArrays"); arg1 = arg1_tmp.c_str(); - if(!ok) - return 0; - bool ret = cobj->initWithByteArrays(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithByteArrays",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithByteArrays'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_initWithFilenames(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithFilenames'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - std::string arg0; - std::string arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:initWithFilenames"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:initWithFilenames"); - if(!ok) - return 0; - bool ret = cobj->initWithFilenames(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithFilenames",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithFilenames'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_use(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_use'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->use(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:use",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_use'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_getVertexShaderLog(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getVertexShaderLog(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getVertexShaderLog",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_setUniformsForBuiltins(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Mat4 arg0; - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgram:setUniformsForBuiltins"); - - if (!ok) { break; } - cobj->setUniformsForBuiltins(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cobj->setUniformsForBuiltins(); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformsForBuiltins",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_updateUniforms(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_updateUniforms'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateUniforms(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:updateUniforms",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_updateUniforms'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_setUniformLocationWith1i(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - int arg0; - int arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWith1i"); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgram:setUniformLocationWith1i"); - if(!ok) - return 0; - cobj->setUniformLocationWith1i(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWith1i",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_reset(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_reset'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->reset(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:reset",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_reset'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_bindAttribLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_bindAttribLocation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - std::string arg0; - unsigned int arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:bindAttribLocation"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgram:bindAttribLocation"); - if(!ok) - return 0; - cobj->bindAttribLocation(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:bindAttribLocation",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_bindAttribLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_getAttribLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getAttribLocation'", 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.GLProgram:getAttribLocation"); - if(!ok) - return 0; - int ret = cobj->getAttribLocation(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getAttribLocation",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getAttribLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_link'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->link(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:link",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_link'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_createWithByteArrays(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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - const char* arg0; - const char* arg1; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:createWithByteArrays"); arg0 = arg0_tmp.c_str(); - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:createWithByteArrays"); arg1 = arg1_tmp.c_str(); - if(!ok) - return 0; - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithByteArrays(arg0, arg1); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithByteArrays",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithByteArrays'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgram_createWithFilenames(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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - std::string arg0; - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:createWithFilenames"); - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:createWithFilenames"); - if(!ok) - return 0; - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithFilenames(arg0, arg1); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithFilenames",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithFilenames'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgram_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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) - return 0; - cobj = new cocos2d::GLProgram(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.GLProgram"); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:GLProgram",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_GLProgram_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (GLProgram)"); - return 0; -} - -int lua_register_cocos2dx_GLProgram(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.GLProgram"); - tolua_cclass(tolua_S,"GLProgram","cc.GLProgram","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"GLProgram"); - tolua_function(tolua_S,"new",lua_cocos2dx_GLProgram_constructor); - tolua_function(tolua_S,"getFragmentShaderLog",lua_cocos2dx_GLProgram_getFragmentShaderLog); - tolua_function(tolua_S,"initWithByteArrays",lua_cocos2dx_GLProgram_initWithByteArrays); - tolua_function(tolua_S,"initWithFilenames",lua_cocos2dx_GLProgram_initWithFilenames); - tolua_function(tolua_S,"use",lua_cocos2dx_GLProgram_use); - tolua_function(tolua_S,"getVertexShaderLog",lua_cocos2dx_GLProgram_getVertexShaderLog); - tolua_function(tolua_S,"setUniformsForBuiltins",lua_cocos2dx_GLProgram_setUniformsForBuiltins); - tolua_function(tolua_S,"updateUniforms",lua_cocos2dx_GLProgram_updateUniforms); - tolua_function(tolua_S,"setUniformLocationI32",lua_cocos2dx_GLProgram_setUniformLocationWith1i); - tolua_function(tolua_S,"reset",lua_cocos2dx_GLProgram_reset); - tolua_function(tolua_S,"bindAttribLocation",lua_cocos2dx_GLProgram_bindAttribLocation); - tolua_function(tolua_S,"getAttribLocation",lua_cocos2dx_GLProgram_getAttribLocation); - tolua_function(tolua_S,"link",lua_cocos2dx_GLProgram_link); - tolua_function(tolua_S,"createWithByteArrays", lua_cocos2dx_GLProgram_createWithByteArrays); - tolua_function(tolua_S,"createWithFilenames", lua_cocos2dx_GLProgram_createWithFilenames); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::GLProgram).name(); - g_luaType[typeName] = "cc.GLProgram"; - g_typeCast["GLProgram"] = "cc.GLProgram"; - return 1; -} - int lua_cocos2dx_GLProgramCache_addGLProgram(lua_State* tolua_S) { int argc = 0; @@ -64670,7 +64670,9 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_FiniteTimeAction(tolua_S); lua_register_cocos2dx_ActionInstant(tolua_S); lua_register_cocos2dx_Hide(tolua_S); - lua_register_cocos2dx_Scheduler(tolua_S); + lua_register_cocos2dx_ParticleSystem(tolua_S); + lua_register_cocos2dx_ParticleSystemQuad(tolua_S); + lua_register_cocos2dx_ParticleSpiral(tolua_S); lua_register_cocos2dx_GridBase(tolua_S); lua_register_cocos2dx_AnimationCache(tolua_S); lua_register_cocos2dx_ActionInterval(tolua_S); @@ -64684,23 +64686,21 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_EventListenerMouse(tolua_S); lua_register_cocos2dx_TransitionRotoZoom(tolua_S); lua_register_cocos2dx_Director(tolua_S); - lua_register_cocos2dx_Texture2D(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_ParticleSystem(tolua_S); - lua_register_cocos2dx_ParticleSystemQuad(tolua_S); lua_register_cocos2dx_GridAction(tolua_S); lua_register_cocos2dx_TiledGrid3DAction(tolua_S); lua_register_cocos2dx_FadeOutTRTiles(tolua_S); lua_register_cocos2dx_FadeOutUpTiles(tolua_S); lua_register_cocos2dx_FadeOutDownTiles(tolua_S); lua_register_cocos2dx_StopGrid(tolua_S); - lua_register_cocos2dx_ParticleSpiral(tolua_S); lua_register_cocos2dx_SkewTo(tolua_S); lua_register_cocos2dx_SkewBy(tolua_S); lua_register_cocos2dx_EaseQuadraticActionOut(tolua_S); @@ -64711,7 +64711,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_Grid3DAction(tolua_S); lua_register_cocos2dx_FadeTo(tolua_S); lua_register_cocos2dx_FadeIn(tolua_S); - lua_register_cocos2dx_GLProgramState(tolua_S); + lua_register_cocos2dx_ShakyTiles3D(tolua_S); lua_register_cocos2dx_EventListenerCustom(tolua_S); lua_register_cocos2dx_FlipX3D(tolua_S); lua_register_cocos2dx_FlipY3D(tolua_S); @@ -64765,7 +64765,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* 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); + lua_register_cocos2dx_GLProgram(tolua_S); lua_register_cocos2dx_EaseBounceOut(tolua_S); lua_register_cocos2dx_RenderTexture(tolua_S); lua_register_cocos2dx_TintBy(tolua_S); @@ -64786,7 +64786,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TMXLayerInfo(tolua_S); lua_register_cocos2dx_EaseSineIn(tolua_S); lua_register_cocos2dx_EaseBounceIn(tolua_S); - lua_register_cocos2dx_GLProgram(tolua_S); + lua_register_cocos2dx_TiledGrid3D(tolua_S); lua_register_cocos2dx_ParticleGalaxy(tolua_S); lua_register_cocos2dx_Twirl(tolua_S); lua_register_cocos2dx_MenuItemLabel(tolua_S); @@ -64830,7 +64830,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_ScaleTo(tolua_S); lua_register_cocos2dx_Spawn(tolua_S); lua_register_cocos2dx_EaseQuarticActionInOut(tolua_S); - lua_register_cocos2dx_ShakyTiles3D(tolua_S); + lua_register_cocos2dx_GLProgramState(tolua_S); lua_register_cocos2dx_PageTurn3D(tolua_S); lua_register_cocos2dx_TransitionSlideInL(tolua_S); lua_register_cocos2dx_TransitionSlideInT(tolua_S); diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index 78bd2c4630..221315e578 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -31,6 +31,8 @@ UIRelativeBox.cpp \ UIVideoPlayerAndroid.cpp \ UIDeprecated.cpp \ UIScale9Sprite.cpp \ +UIWebView.cpp \ +UIWebViewImpl_android.cpp \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/../editor-support diff --git a/cocos/ui/CocosGUI.h b/cocos/ui/CocosGUI.h index 5fc08abefc..04ce980bd5 100644 --- a/cocos/ui/CocosGUI.h +++ b/cocos/ui/CocosGUI.h @@ -47,6 +47,7 @@ THE SOFTWARE. #include "ui/UIRelativeBox.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "ui/UIVideoPlayer.h" +#include "ui/UIWebView.h" #endif #include "ui/UIDeprecated.h" #include "ui/GUIExport.h" diff --git a/cocos/ui/UIWebView-inl.h b/cocos/ui/UIWebView-inl.h new file mode 100644 index 0000000000..26e8eb369f --- /dev/null +++ b/cocos/ui/UIWebView-inl.h @@ -0,0 +1,141 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + + +#include "UIWebView.h" +#include "platform/CCGLView.h" +#include "base/CCDirector.h" +#include "platform/CCFileUtils.h" + + + +NS_CC_BEGIN +namespace experimental{ + namespace ui{ + + WebView::WebView() + : _impl(new WebViewImpl(this)) + { + } + + WebView::~WebView() + { + CC_SAFE_DELETE(_impl); + } + + WebView *WebView::create() + { + auto webView = new(std::nothrow) WebView(); + if (webView && webView->init()) + { + webView->autorelease(); + return webView; + } + CC_SAFE_DELETE(webView); + return nullptr; + } + + void WebView::setJavascriptInterfaceScheme(const std::string &scheme) + { + _impl->setJavascriptInterfaceScheme(scheme); + } + + void WebView::loadData(const cocos2d::Data &data, + const std::string &MIMEType, + const std::string &encoding, + const std::string &baseURL) + { + _impl->loadData(data, MIMEType, encoding, baseURL); + } + + void WebView::loadHTMLString(const std::string &string, const std::string &baseURL) + { + _impl->loadHTMLString(string, baseURL); + } + + void WebView::loadUrl(const std::string &url) + { + _impl->loadUrl(url); + } + + void WebView::loadFile(const std::string &fileName) + { + _impl->loadFile(fileName); + } + + void WebView::stopLoading() + { + _impl->stopLoading(); + } + + void WebView::reload() + { + _impl->reload(); + } + + bool WebView::canGoBack() + { + return _impl->canGoBack(); + } + + bool WebView::canGoForward() + { + return _impl->canGoForward(); + } + + void WebView::goBack() + { + _impl->goBack(); + } + + void WebView::goForward() + { + _impl->goForward(); + } + + void WebView::evaluateJS(const std::string &js) + { + _impl->evaluateJS(js); + } + + void WebView::setScalesPageToFit(bool const scalesPageToFit) + { + _impl->setScalesPageToFit(scalesPageToFit); + } + + void WebView::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) + { + cocos2d::ui::Widget::draw(renderer, transform, flags); + _impl->draw(renderer, transform, flags); + } + + void WebView::setVisible(bool visible) + { + Node::setVisible(visible); + _impl->setVisible(visible); + } + } // namespace ui +} // namespace experimental +} //namespace cocos2d + diff --git a/cocos/ui/UIWebView.cpp b/cocos/ui/UIWebView.cpp new file mode 100644 index 0000000000..07bb327b0f --- /dev/null +++ b/cocos/ui/UIWebView.cpp @@ -0,0 +1,30 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + +#include "UIWebViewImpl_android.h" +#include "UIWebView-inl.h" + + +#endif diff --git a/cocos/ui/UIWebView.h b/cocos/ui/UIWebView.h new file mode 100644 index 0000000000..37c67e3d91 --- /dev/null +++ b/cocos/ui/UIWebView.h @@ -0,0 +1,176 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __Cocos2d_Plugin_WebView_H_ +#define __Cocos2d_Plugin_WebView_H_ + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + + +#include "ui/UIWidget.h" +#include "base/CCData.h" + +NS_CC_BEGIN +namespace experimental{ + namespace ui{ + +class WebViewImpl; + +class WebView : public cocos2d::ui::Widget { +public: + /** + * Allocates and initializes a WebView. + */ + static WebView *create(); + + /** + * Default constructor + */ + WebView(); + + /** + * Default destructor + */ + virtual ~WebView(); + + /** + * Call before a web view begins loading. + * @param sender The web view that is about to load new content. + * @param url content URL. + * @return YES if the web view should begin loading content; otherwise, NO . + */ + std::function shouldStartLoading; + /** + * Call after a web view finishes loading. + * @param sender The web view that has finished loading. + * @param url content URL. + */ + std::function didFinishLoading; + /** + * Call if a web view failed to load content. + * @param sender The web view that has failed loading. + * @param url content URL. + */ + std::function didFailLoading; + + /** + * Set javascript interface scheme. + * @see #onJsCallback + */ + void setJavascriptInterfaceScheme(const std::string &scheme); + + /** + * This callback called when load URL that start with javascript interface scheme. + */ + std::function onJsCallback; + + /** + * Sets the main page contents, MIME type, content encoding, and base URL. + * @param data The content for the main page. + * @param MIMEType The MIME type of the data. + * @param encoding the encoding of the data. + * @param baseURL The base URL for the content. + */ + void loadData(const cocos2d::Data &data, + const std::string &MIMEType, + const std::string &encoding, + const std::string &baseURL); + + + /** + * Sets the main page content and base URL. + * @param string The content for the main page. + * @param baseURL The base URL for the content. + */ + void loadHTMLString(const std::string &string, const std::string &baseURL); + + /** + * Loads the given URL. + * @param url content URL + */ + void loadUrl(const std::string &url); + + /** + * Loads the given fileName. + * @param fileName content fileName + */ + void loadFile(const std::string &fileName); + + /** + * Stops the current load. + */ + void stopLoading(); + + /** + * Reloads the current URL. + */ + void reload(); + + /** + * Gets whether this WebView has a back history item. + * @return web view has a back history item. + */ + bool canGoBack(); + + /** + * Gets whether this WebView has a forward history item. + * @return web view has a forward history item. + */ + bool canGoForward(); + + /** + * Goes back in the history. + */ + void goBack(); + + /** + * Goes forward in the history. + */ + void goForward(); + + /** + * evaluates JavaScript in the context of the currently displayed page + */ + void evaluateJS(const std::string &js); + + /** + * Set WebView should support zooming. The default value is false. + */ + void setScalesPageToFit(const bool scalesPageToFit); + + virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) override; + + virtual void setVisible(bool visible) override; + +private: + WebViewImpl *_impl; +}; + + } // namespace ui + } // namespace experimental +}//namespace cocos2d + +#endif + +#endif //__Cocos2d_Plugin_WebView_H_ diff --git a/cocos/ui/UIWebView.mm b/cocos/ui/UIWebView.mm new file mode 100644 index 0000000000..455fbb43e5 --- /dev/null +++ b/cocos/ui/UIWebView.mm @@ -0,0 +1,30 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + +#include "UIWebViewImpl_iOS.h" +#include "UIWebView-inl.h" + + +#endif diff --git a/cocos/ui/UIWebViewImpl_android.cpp b/cocos/ui/UIWebViewImpl_android.cpp new file mode 100644 index 0000000000..53abeb2aaa --- /dev/null +++ b/cocos/ui/UIWebViewImpl_android.cpp @@ -0,0 +1,435 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "UIWebViewImpl_android.h" + +#include +#include +#include +#include "jni/JniHelper.h" +#include + +#include "UIWebView.h" +#include "platform/CCGLView.h" +#include "base/CCDirector.h" +#include "platform/CCFileUtils.h" + +#define CLASS_NAME "org/cocos2dx/lib/Cocos2dxWebViewHelper" + +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,"",__VA_ARGS__) + +extern "C" { + /* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: shouldStartLoading + * Signature: (ILjava/lang/String;)Z + */ + JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_shouldStartLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + auto charUrl = env->GetStringUTFChars(jurl, NULL); + std::string url = charUrl; + env->ReleaseStringUTFChars(jurl, charUrl); + return cocos2d::experimental::ui::WebViewImpl::shouldStartLoading(index, url); + } + + /* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: didFinishLoading + * Signature: (ILjava/lang/String;)V + */ + JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFinishLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + // LOGD("didFinishLoading"); + auto charUrl = env->GetStringUTFChars(jurl, NULL); + std::string url = charUrl; + env->ReleaseStringUTFChars(jurl, charUrl); + cocos2d::experimental::ui::WebViewImpl::didFinishLoading(index, url); + } + + /* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: didFailLoading + * Signature: (ILjava/lang/String;)V + */ + JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFailLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + // LOGD("didFailLoading"); + auto charUrl = env->GetStringUTFChars(jurl, NULL); + std::string url = charUrl; + env->ReleaseStringUTFChars(jurl, charUrl); + cocos2d::experimental::ui::WebViewImpl::didFailLoading(index, url); + } + + /* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: onJsCallback + * Signature: (ILjava/lang/String;)V + */ + JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_onJsCallback(JNIEnv *env, jclass, jint index, jstring jmessage) { + // LOGD("jsCallback"); + auto charMessage = env->GetStringUTFChars(jmessage, NULL); + std::string message = charMessage; + env->ReleaseStringUTFChars(jmessage, charMessage); + cocos2d::experimental::ui::WebViewImpl::onJsCallback(index, message); + } +} + +namespace { + +int createWebViewJNI() { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "createWebView", "()I")) { + // LOGD("error: %s,%d",__func__,__LINE__); + jint viewTag = t.env->CallStaticIntMethod(t.classID, t.methodID); + t.env->DeleteLocalRef(t.classID); + return viewTag; + } + return -1; +} + +void removeWebViewJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "removeWebView", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +void setWebViewRectJNI(const int index, const int left, const int top, const int width, const int height) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setWebViewRect", "(IIIII)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, left, top, width, height); + t.env->DeleteLocalRef(t.classID); + } +} + +void setJavascriptInterfaceSchemeJNI(const int index, const std::string &scheme) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setJavascriptInterfaceScheme", "(ILjava/lang/String;)V")) { + jstring jScheme = t.env->NewStringUTF(scheme.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jScheme); + + t.env->DeleteLocalRef(jScheme); + t.env->DeleteLocalRef(t.classID); + } +} + +void loadDataJNI(const int index, const std::string &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadData", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V")) { + jstring jData = t.env->NewStringUTF(data.c_str()); + jstring jMIMEType = t.env->NewStringUTF(MIMEType.c_str()); + jstring jEncoding = t.env->NewStringUTF(encoding.c_str()); + jstring jBaseURL = t.env->NewStringUTF(baseURL.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jData, jMIMEType, jEncoding, jBaseURL); + + t.env->DeleteLocalRef(jData); + t.env->DeleteLocalRef(jMIMEType); + t.env->DeleteLocalRef(jEncoding); + t.env->DeleteLocalRef(jBaseURL); + t.env->DeleteLocalRef(t.classID); + } +} + +void loadHTMLStringJNI(const int index, const std::string &string, const std::string &baseURL) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadHTMLString", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V")) { + jstring jString = t.env->NewStringUTF(string.c_str()); + jstring jBaseURL = t.env->NewStringUTF(baseURL.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jString, jBaseURL,nullptr); + + t.env->DeleteLocalRef(jString); + t.env->DeleteLocalRef(jBaseURL); + t.env->DeleteLocalRef(t.classID); + } +} + +void loadUrlJNI(const int index, const std::string &url) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadUrl", "(ILjava/lang/String;)V")) { + jstring jUrl = t.env->NewStringUTF(url.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jUrl); + + t.env->DeleteLocalRef(jUrl); + t.env->DeleteLocalRef(t.classID); + } +} + +void loadFileJNI(const int index, const std::string &filePath) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadFile", "(ILjava/lang/String;)V")) { + jstring jFilePath = t.env->NewStringUTF(filePath.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jFilePath); + + t.env->DeleteLocalRef(jFilePath); + t.env->DeleteLocalRef(t.classID); + } +} + +void stopLoadingJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "stopLoading", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +void reloadJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "reload", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +bool canGoBackJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "canGoBack", "(I)Z")) { + jboolean ret = t.env->CallStaticBooleanMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + return ret; + } + return false; +} + +bool canGoForwardJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "canGoForward", "(I)Z")) { + jboolean ret = t.env->CallStaticBooleanMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + return ret; + } + return false; +} + +void goBackJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "goBack", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +void goForwardJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "goForward", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +void evaluateJSJNI(const int index, const std::string &js) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "evaluateJS", "(ILjava/lang/String;)V")) { + jstring jjs = t.env->NewStringUTF(js.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jjs); + + t.env->DeleteLocalRef(jjs); + t.env->DeleteLocalRef(t.classID); + } +} + +void setScalesPageToFitJNI(const int index, const bool scalesPageToFit) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setScalesPageToFit", "(IZ)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, scalesPageToFit); + t.env->DeleteLocalRef(t.classID); + } +} + +void setWebViewVisibleJNI(const int index, const bool visible) { + // LOGD("error: %s,%d",__func__,__LINE__); + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setVisible", "(IZ)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, visible); + t.env->DeleteLocalRef(t.classID); + } +} + +std::string getUrlStringByFileName(const std::string &fileName) { + // LOGD("error: %s,%d",__func__,__LINE__); + const std::string basePath("file:///android_asset/"); + std::string fullPath = cocos2d::FileUtils::getInstance()->fullPathForFilename(fileName); + const std::string assetsPath("assets/"); + + std::string urlString; + if (fullPath.find(assetsPath) != std::string::npos) { + urlString = fullPath.replace(fullPath.find_first_of(assetsPath), assetsPath.length(), basePath); + } else { + urlString = fullPath; + } + + return urlString; +} +} // namespace + +namespace cocos2d { + namespace experimental { + namespace ui{ + + static std::unordered_map s_WebViewImpls; + + WebViewImpl::WebViewImpl(WebView *webView) : _viewTag(-1), _webView(webView) { + _viewTag = createWebViewJNI(); + s_WebViewImpls[_viewTag] = this; + } + + WebViewImpl::~WebViewImpl() { + removeWebViewJNI(_viewTag); + s_WebViewImpls.erase(_viewTag); + } + + void WebViewImpl::loadData(const Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + std::string dataString(reinterpret_cast(data.getBytes()), static_cast(data.getSize())); + loadDataJNI(_viewTag, dataString, MIMEType, encoding, baseURL); + } + + void WebViewImpl::loadHTMLString(const std::string &string, const std::string &baseURL) { + loadHTMLStringJNI(_viewTag, string, baseURL); + } + + void WebViewImpl::loadUrl(const std::string &url) { + loadUrlJNI(_viewTag, url); + } + + void WebViewImpl::loadFile(const std::string &fileName) { + auto fullPath = getUrlStringByFileName(fileName); + loadFileJNI(_viewTag, fullPath); + } + + void WebViewImpl::stopLoading() { + stopLoadingJNI(_viewTag); + } + + void WebViewImpl::reload() { + reloadJNI(_viewTag); + } + + bool WebViewImpl::canGoBack() { + return canGoBackJNI(_viewTag); + } + + bool WebViewImpl::canGoForward() { + return canGoForwardJNI(_viewTag); + } + + void WebViewImpl::goBack() { + goBackJNI(_viewTag); + } + + void WebViewImpl::goForward() { + goForwardJNI(_viewTag); + } + + void WebViewImpl::setJavascriptInterfaceScheme(const std::string &scheme) { + setJavascriptInterfaceSchemeJNI(_viewTag, scheme); + } + + void WebViewImpl::evaluateJS(const std::string &js) { + evaluateJSJNI(_viewTag, js); + } + + void WebViewImpl::setScalesPageToFit(const bool scalesPageToFit) { + setScalesPageToFitJNI(_viewTag, scalesPageToFit); + } + + bool WebViewImpl::shouldStartLoading(const int viewTag, const std::string &url) { + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->shouldStartLoading) { + return webView->shouldStartLoading(webView, url); + } + } + return true; + } + + void WebViewImpl::didFinishLoading(const int viewTag, const std::string &url){ + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->didFinishLoading) { + webView->didFinishLoading(webView, url); + } + } + } + + void WebViewImpl::didFailLoading(const int viewTag, const std::string &url){ + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->didFailLoading) { + webView->didFailLoading(webView, url); + } + } + } + + void WebViewImpl::onJsCallback(const int viewTag, const std::string &message){ + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->onJsCallback) { + webView->onJsCallback(webView, message); + } + } + } + + void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { + if (flags & cocos2d::Node::FLAGS_TRANSFORM_DIRTY) { + auto directorInstance = cocos2d::Director::getInstance(); + auto glView = directorInstance->getOpenGLView(); + auto frameSize = glView->getFrameSize(); + + auto winSize = directorInstance->getWinSize(); + + auto leftBottom = this->_webView->convertToWorldSpace(cocos2d::Point::ZERO); + auto rightTop = this->_webView->convertToWorldSpace(cocos2d::Point(this->_webView->getContentSize().width,this->_webView->getContentSize().height)); + + auto uiLeft = frameSize.width / 2 + (leftBottom.x - winSize.width / 2 ) * glView->getScaleX(); + auto uiTop = frameSize.height /2 - (rightTop.y - winSize.height / 2) * glView->getScaleY(); + + setWebViewRectJNI(_viewTag,uiLeft,uiTop, + (rightTop.x - leftBottom.x) * glView->getScaleX(), + (rightTop.y - leftBottom.y) * glView->getScaleY()); + } + } + + void WebViewImpl::setVisible(bool visible) { + setWebViewVisibleJNI(_viewTag, visible); + } + } // namespace ui + } // namespace experimental +} //namespace cocos2d + diff --git a/cocos/ui/UIWebViewImpl_android.h b/cocos/ui/UIWebViewImpl_android.h new file mode 100644 index 0000000000..01a3fd86ef --- /dev/null +++ b/cocos/ui/UIWebViewImpl_android.h @@ -0,0 +1,96 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __cocos2d_plugin_WebViewImpl_android_H_ +#define __cocos2d_plugin_WebViewImpl_android_H_ + +#include + +namespace cocos2d { + class Data; + class Renderer; + class Mat4; + + namespace experimental { + namespace ui{ + class WebView; + } + } +} + +namespace cocos2d { + namespace experimental { + namespace ui{ + + class WebViewImpl { + public: + WebViewImpl(cocos2d::experimental::ui::WebView *webView); + + virtual ~WebViewImpl(); + + void setJavascriptInterfaceScheme(const std::string &scheme); + + void loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL); + + void loadHTMLString(const std::string &string, const std::string &baseURL); + + void loadUrl(const std::string &url); + + void loadFile(const std::string &fileName); + + void stopLoading(); + + void reload(); + + bool canGoBack(); + + bool canGoForward(); + + void goBack(); + + void goForward(); + + void evaluateJS(const std::string &js); + + void setScalesPageToFit(const bool scalesPageToFit); + + virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags); + + virtual void setVisible(bool visible); + + static bool shouldStartLoading(const int viewTag, const std::string &url); + static void didFinishLoading(const int viewTag, const std::string &url); + static void didFailLoading(const int viewTag, const std::string &url); + static void onJsCallback(const int viewTag, const std::string &message); + + private: + int _viewTag; + WebView *_webView; + }; + + } // namespace ui + } // namespace experimental +} //cocos2d + +#endif //__cocos2d_plugin_WebViewImpl_android_H_ diff --git a/cocos/ui/UIWebViewImpl_iOS.h b/cocos/ui/UIWebViewImpl_iOS.h new file mode 100644 index 0000000000..277ca59a58 --- /dev/null +++ b/cocos/ui/UIWebViewImpl_iOS.h @@ -0,0 +1,91 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __cocos2d_plugin_WebViewImpl_IOS_H_ +#define __cocos2d_plugin_WebViewImpl_IOS_H_ + +#include + +@class UIWebViewWrapper; + +namespace cocos2d { + +class Data; +class Renderer; +class Mat4; + +namespace experimental { + namespace ui{ + +class WebView; + +class WebViewImpl { +public: + WebViewImpl(WebView *webView); + + virtual ~WebViewImpl(); + + void setJavascriptInterfaceScheme(const std::string &scheme); + + void loadData(const cocos2d::Data &data, + const std::string &MIMEType, + const std::string &encoding, + const std::string &baseURL); + + void loadHTMLString(const std::string &string, const std::string &baseURL); + + void loadUrl(const std::string &url); + + void loadFile(const std::string &fileName); + + void stopLoading(); + + void reload(); + + bool canGoBack(); + + bool canGoForward(); + + void goBack(); + + void goForward(); + + void evaluateJS(const std::string &js); + + void setScalesPageToFit(const bool scalesPageToFit); + + virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags); + + virtual void setVisible(bool visible); + +private: + UIWebViewWrapper *_uiWebViewWrapper; + WebView *_webView; +}; + + } // namespace ui + } // namespace experimental +}//namespace cocos2d + +#endif //__cocos2d_plugin_WebViewImpl_IOS_H_ diff --git a/cocos/ui/UIWebViewImpl_iOS.mm b/cocos/ui/UIWebViewImpl_iOS.mm new file mode 100644 index 0000000000..116b116975 --- /dev/null +++ b/cocos/ui/UIWebViewImpl_iOS.mm @@ -0,0 +1,353 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS + +#include "UIWebViewImpl_iOS.h" +#include "renderer/CCRenderer.h" +#include "CCDirector.h" +#include "CCGLView.h" +#include "CCEAGLView.h" +#include "platform/CCFileUtils.h" +#include "ui/UIWebView.h" + +@interface UIWebViewWrapper : NSObject +@property (nonatomic) std::function shouldStartLoading; +@property (nonatomic) std::function didFinishLoading; +@property (nonatomic) std::function didFailLoading; +@property (nonatomic) std::function onJsCallback; + +@property(nonatomic, readonly, getter=canGoBack) BOOL canGoBack; +@property(nonatomic, readonly, getter=canGoForward) BOOL canGoForward; + ++ (instancetype)webViewWrapper; + +- (void)setVisible:(bool)visible; + +- (void)setFrameWithX:(float)x y:(float)y width:(float)width height:(float)height; + +- (void)setJavascriptInterfaceScheme:(const std::string &)scheme; + +- (void)loadData:(const std::string &)data MIMEType:(const std::string &)MIMEType textEncodingName:(const std::string &)encodingName baseURL:(const std::string &)baseURL; + +- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL; + +- (void)loadUrl:(const std::string &)urlString; + +- (void)loadFile:(const std::string &)filePath; + +- (void)stopLoading; + +- (void)reload; + +- (void)evaluateJS:(const std::string &)js; + +- (void)goBack; + +- (void)goForward; + +- (void)setScalesPageToFit:(const bool)scalesPageToFit; +@end + + +@interface UIWebViewWrapper () +@property(nonatomic, retain) UIWebView *uiWebView; +@property(nonatomic, copy) NSString *jsScheme; +@end + +@implementation UIWebViewWrapper { + +} + ++ (instancetype)webViewWrapper { + return [[[self alloc] init] autorelease]; +} + +- (instancetype)init { + self = [super init]; + if (self) { + self.uiWebView = nil; + self.shouldStartLoading = nullptr; + self.didFinishLoading = nullptr; + self.didFailLoading = nullptr; + } + return self; +} + +- (void)dealloc { + self.uiWebView.delegate = nil; + [self.uiWebView removeFromSuperview]; + self.jsScheme = nil; + [super dealloc]; +} + +- (void)setupWebView { + if (!self.uiWebView) { + self.uiWebView = [[[UIWebView alloc] init] autorelease]; + self.uiWebView.delegate = self; + } + if (!self.uiWebView.superview) { + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + auto eaglview = (CCEAGLView *) view->getEAGLView(); + [eaglview addSubview:self.uiWebView]; + } +} + +- (void)setVisible:(bool)visible { + self.uiWebView.hidden = !visible; +} + +- (void)setFrameWithX:(float)x y:(float)y width:(float)width height:(float)height { + if (!self.uiWebView) {[self setupWebView];} + CGRect newFrame = CGRectMake(x, y, width, height); + if (!CGRectEqualToRect(self.uiWebView.frame, newFrame)) { + self.uiWebView.frame = CGRectMake(x, y, width, height); + } +} + +- (void)setJavascriptInterfaceScheme:(const std::string &)scheme { + self.jsScheme = @(scheme.c_str()); +} + +- (void)loadData:(const std::string &)data MIMEType:(const std::string &)MIMEType textEncodingName:(const std::string &)encodingName baseURL:(const std::string &)baseURL { + [self.uiWebView loadData:[NSData dataWithBytes:data.c_str() length:data.length()] + MIMEType:@(MIMEType.c_str()) + textEncodingName:@(encodingName.c_str()) + baseURL:[NSURL URLWithString:@(baseURL.c_str())]]; +} + +- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL { + [self.uiWebView loadHTMLString:@(string.c_str()) baseURL:[NSURL URLWithString:@(baseURL.c_str())]]; +} + +- (void)loadUrl:(const std::string &)urlString { + if (!self.uiWebView) {[self setupWebView];} + NSURL *url = [NSURL URLWithString:@(urlString.c_str())]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + [self.uiWebView loadRequest:request]; +} + +- (void)loadFile:(const std::string &)filePath { + if (!self.uiWebView) {[self setupWebView];} + NSURL *url = [NSURL fileURLWithPath:@(filePath.c_str())]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + [self.uiWebView loadRequest:request]; +} + +- (void)stopLoading { + [self.uiWebView stopLoading]; +} + +- (void)reload { + [self.uiWebView reload]; +} + +- (BOOL)canGoForward { + return self.uiWebView.canGoForward; +} + +- (BOOL)canGoBack { + return self.uiWebView.canGoBack; +} + +- (void)goBack { + [self.uiWebView goBack]; +} + +- (void)goForward { + [self.uiWebView goForward]; +} + +- (void)evaluateJS:(const std::string &)js { + if (!self.uiWebView) {[self setupWebView];} + [self.uiWebView stringByEvaluatingJavaScriptFromString:@(js.c_str())]; +} + +- (void)setScalesPageToFit:(const bool)scalesPageToFit { + self.uiWebView.scalesPageToFit = scalesPageToFit; +} + +#pragma mark - UIWebViewDelegate +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { + NSString *url = [[request URL] absoluteString]; + if ([[[request URL] scheme] isEqualToString:self.jsScheme]) { + self.onJsCallback([url UTF8String]); + return NO; + } + if (self.shouldStartLoading && url) { + return self.shouldStartLoading([url UTF8String]); + } + return YES; +} + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + if (self.didFinishLoading) { + NSString *url = [[webView.request URL] absoluteString]; + self.didFinishLoading([url UTF8String]); + } +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + if (self.didFailLoading) { + NSString *url = error.userInfo[NSURLErrorFailingURLStringErrorKey]; + if (url) { + self.didFailLoading([url UTF8String]); + } + } +} + +@end + + + +namespace cocos2d { +namespace experimental { + namespace ui{ + +WebViewImpl::WebViewImpl(WebView *webView) + : _uiWebViewWrapper([UIWebViewWrapper webViewWrapper]), + _webView(webView) { + [_uiWebViewWrapper retain]; + + _uiWebViewWrapper.shouldStartLoading = [this](std::string url) { + if (this->_webView->shouldStartLoading) { + return this->_webView->shouldStartLoading(this->_webView, url); + } + return true; + }; + _uiWebViewWrapper.didFinishLoading = [this](std::string url) { + if (this->_webView->didFinishLoading) { + this->_webView->didFinishLoading(this->_webView, url); + } + }; + _uiWebViewWrapper.didFailLoading = [this](std::string url) { + if (this->_webView->didFailLoading) { + this->_webView->didFailLoading(this->_webView, url); + } + }; + _uiWebViewWrapper.onJsCallback = [this](std::string url) { + if (this->_webView->onJsCallback) { + this->_webView->onJsCallback(this->_webView, url); + } + }; +} + +WebViewImpl::~WebViewImpl(){ + [_uiWebViewWrapper release]; + _uiWebViewWrapper = nullptr; +} + +void WebViewImpl::setJavascriptInterfaceScheme(const std::string &scheme) { + [_uiWebViewWrapper setJavascriptInterfaceScheme:scheme]; +} + +void WebViewImpl::loadData(const Data &data, + const std::string &MIMEType, + const std::string &encoding, + const std::string &baseURL) { + + std::string dataString(reinterpret_cast(data.getBytes()), static_cast(data.getSize())); + [_uiWebViewWrapper loadData:dataString MIMEType:MIMEType textEncodingName:encoding baseURL:baseURL]; +} + +void WebViewImpl::loadHTMLString(const std::string &string, const std::string &baseURL) { + [_uiWebViewWrapper loadHTMLString:string baseURL:baseURL]; +} + +void WebViewImpl::loadUrl(const std::string &url) { + [_uiWebViewWrapper loadUrl:url]; +} + +void WebViewImpl::loadFile(const std::string &fileName) { + auto fullPath = cocos2d::FileUtils::getInstance()->fullPathForFilename(fileName); + [_uiWebViewWrapper loadFile:fullPath]; +} + +void WebViewImpl::stopLoading() { + [_uiWebViewWrapper stopLoading]; +} + +void WebViewImpl::reload() { + [_uiWebViewWrapper reload]; +} + +bool WebViewImpl::canGoBack() { + return _uiWebViewWrapper.canGoBack; +} + +bool WebViewImpl::canGoForward() { + return _uiWebViewWrapper.canGoForward; +} + +void WebViewImpl::goBack() { + [_uiWebViewWrapper goBack]; +} + +void WebViewImpl::goForward() { + [_uiWebViewWrapper goForward]; +} + +void WebViewImpl::evaluateJS(const std::string &js) { + [_uiWebViewWrapper evaluateJS:js]; +} + +void WebViewImpl::setScalesPageToFit(const bool scalesPageToFit) { + [_uiWebViewWrapper setScalesPageToFit:scalesPageToFit]; +} + +void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { + if (flags & cocos2d::Node::FLAGS_TRANSFORM_DIRTY) { + + auto direcrot = cocos2d::Director::getInstance(); + auto glView = direcrot->getOpenGLView(); + auto frameSize = glView->getFrameSize(); + + auto scaleFactor = [static_cast(glView->getEAGLView()) contentScaleFactor]; + + auto winSize = direcrot->getWinSize(); + + auto leftBottom = this->_webView->convertToWorldSpace(cocos2d::Vec2::ZERO); + auto rightTop = this->_webView->convertToWorldSpace(cocos2d::Vec2(this->_webView->getContentSize().width, this->_webView->getContentSize().height)); + + auto x = (frameSize.width / 2 + (leftBottom.x - winSize.width / 2) * glView->getScaleX()) / scaleFactor; + auto y = (frameSize.height / 2 - (rightTop.y - winSize.height / 2) * glView->getScaleY()) / scaleFactor; + auto width = (rightTop.x - leftBottom.x) * glView->getScaleX() / scaleFactor; + auto height = (rightTop.y - leftBottom.y) * glView->getScaleY() / scaleFactor; + + [_uiWebViewWrapper setFrameWithX:x + y:y + width:width + height:height]; + } +} + +void WebViewImpl::setVisible(bool visible){ + [_uiWebViewWrapper setVisible:visible]; +} + + } // namespace ui +} // namespace experimental +} //namespace cocos2d + +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 0263e2997e..25d6d414cb 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -779,6 +779,8 @@ "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxTypefaces.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoHelper.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoView.java", + "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java", + "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebViewHelper.java", "cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerAdapter.java", "cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerDelegate.java", "cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerUtils.java", @@ -1036,6 +1038,14 @@ "cocos/ui/UIVideoPlayer.h", "cocos/ui/UIVideoPlayerAndroid.cpp", "cocos/ui/UIVideoPlayerIOS.mm", + "cocos/ui/UIWebView-inl.h", + "cocos/ui/UIWebView.cpp", + "cocos/ui/UIWebView.h", + "cocos/ui/UIWebView.mm", + "cocos/ui/UIWebViewImpl_android.cpp", + "cocos/ui/UIWebViewImpl_android.h", + "cocos/ui/UIWebViewImpl_iOS.h", + "cocos/ui/UIWebViewImpl_iOS.mm", "cocos/ui/UIWidget.cpp", "cocos/ui/UIWidget.h", "cocos/ui/proj.wp8/libGUI.vcxproj", diff --git a/templates/cpp-template-default/proj.android/jni/Application.mk b/templates/cpp-template-default/proj.android/jni/Application.mk index 93c859c1b0..59808706eb 100644 --- a/templates/cpp-template-default/proj.android/jni/Application.mk +++ b/templates/cpp-template-default/proj.android/jni/Application.mk @@ -5,11 +5,10 @@ APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-ch APP_LDFLAGS := -latomic -APP_DEBUG := $(strip $(NDK_DEBUG)) -ifeq ($(APP_DEBUG),1) +ifeq ($(NDK_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := debug else APP_CPPFLAGS += -DNDEBUG APP_OPTIM := release -endif \ No newline at end of file +endif diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.android/jni/Application.mk b/templates/lua-template-default/frameworks/runtime-src/proj.android/jni/Application.mk index 93c859c1b0..59808706eb 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.android/jni/Application.mk +++ b/templates/lua-template-default/frameworks/runtime-src/proj.android/jni/Application.mk @@ -5,11 +5,10 @@ APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-ch APP_LDFLAGS := -latomic -APP_DEBUG := $(strip $(NDK_DEBUG)) -ifeq ($(APP_DEBUG),1) +ifeq ($(NDK_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := debug else APP_CPPFLAGS += -DNDEBUG APP_OPTIM := release -endif \ No newline at end of file +endif diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Application.mk b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Application.mk index 93c859c1b0..59808706eb 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Application.mk +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Application.mk @@ -5,11 +5,10 @@ APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-ch APP_LDFLAGS := -latomic -APP_DEBUG := $(strip $(NDK_DEBUG)) -ifeq ($(APP_DEBUG),1) +ifeq ($(NDK_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := debug else APP_CPPFLAGS += -DNDEBUG APP_OPTIM := release -endif \ No newline at end of file +endif diff --git a/tests/cpp-empty-test/proj.android/jni/Application.mk b/tests/cpp-empty-test/proj.android/jni/Application.mk index 93c859c1b0..59808706eb 100644 --- a/tests/cpp-empty-test/proj.android/jni/Application.mk +++ b/tests/cpp-empty-test/proj.android/jni/Application.mk @@ -5,11 +5,10 @@ APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-ch APP_LDFLAGS := -latomic -APP_DEBUG := $(strip $(NDK_DEBUG)) -ifeq ($(APP_DEBUG),1) +ifeq ($(NDK_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := debug else APP_CPPFLAGS += -DNDEBUG APP_OPTIM := release -endif \ No newline at end of file +endif diff --git a/tests/cpp-tests/Android.mk b/tests/cpp-tests/Android.mk index a954ff93e1..71ff77954d 100644 --- a/tests/cpp-tests/Android.mk +++ b/tests/cpp-tests/Android.mk @@ -104,6 +104,7 @@ Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp \ Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp \ Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp \ Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp \ Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp \ Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp \ Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp \ diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp index 888c3e24c7..615f472d4d 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -29,6 +29,20 @@ g_guisTests[] = Director::getInstance()->replaceScene(scene); } }, +#endif +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + { + "WebViewTest", + [](Ref* sender) + { + UISceneManager* sceneManager = UISceneManager::sharedUISceneManager(); + sceneManager->setCurrentUISceneId(KWebViewTest); + sceneManager->setMinUISceneId(KWebViewTest); + sceneManager->setMaxUISceneId(KWebViewTest); + Scene* scene = sceneManager->currentUIScene(); + Director::getInstance()->replaceScene(scene); + } + }, #endif { "focus test", diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp index 39ac466605..535b85c4ad 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp @@ -20,6 +20,7 @@ #include "UIFocusTest/UIFocusTest.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "UIVideoPlayerTest/UIVideoPlayerTest.h" +#include "UIWebViewTest/UIWebViewTest.h" #endif #include "UIScale9SpriteTest.h" @@ -94,6 +95,7 @@ static const char* s_testArray[] = "UIFocusTest-ListView", #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) "UIVideoPlayerTest", + "UIWebViewTest", #endif "UIScale9SpriteTest", "UIScale9SpriteHierarchialTest", @@ -328,6 +330,8 @@ Scene *UISceneManager::currentUIScene() #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) case kUIVideoPlayerTest: return VideoPlayerTest::sceneWithTitle(s_testArray[_currentUISceneId]); + case KWebViewTest: + return WebViewTest::sceneWithTitle(s_testArray[_currentUISceneId]); #endif case kUIScale9SpriteTest: return UIScale9SpriteTest::sceneWithTitle(s_testArray[_currentUISceneId]); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h index 4361de611f..6bf7c2c2c9 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h @@ -92,6 +92,7 @@ enum kUIFocusTest_ListView, #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) kUIVideoPlayerTest, + KWebViewTest, #endif kUIScale9SpriteTest, kUIScale9SpriteHierarchialTest, diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp new file mode 100644 index 0000000000..4b643fbd45 --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp @@ -0,0 +1,168 @@ +/**************************************************************************** + 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 "UIWebViewTest.h" + +WebViewTest::WebViewTest() +{ + +} + +WebViewTest::~WebViewTest() +{ + +} + +bool WebViewTest::init() +{ + if (UIScene::init()) { + Size winSize = Director::getInstance()->getVisibleSize(); + + + _webView = cocos2d::experimental::ui::WebView::create(); + _webView->setPosition(winSize/2); + _webView->setContentSize(winSize * 0.5); + _webView->loadUrl("http://www.google.com"); + _webView->setScalesPageToFit(true); + + _webView->shouldStartLoading = CC_CALLBACK_2(WebViewTest::onWebViewShouldStartLoading, this); + _webView->didFinishLoading = CC_CALLBACK_2(WebViewTest::onWebViewDidFinishLoading, this); + _webView->didFailLoading = CC_CALLBACK_2(WebViewTest::onWebViewDidFailLoading, this); + + this->addChild(_webView); + + TextField *urlTextField = TextField::create("Input a URL here", "Arial", 20); + urlTextField->setPlaceHolderColor(Color3B::RED); + urlTextField->setPosition(Vec2(winSize/2) + Vec2(-80, _webView->getContentSize().height/2 + + urlTextField->getContentSize().height/2 + 10)); + this->addChild(urlTextField); + + Text *httpLabel = Text::create("http:// ", "Arial", 20); + httpLabel->setTextColor(Color4B::GREEN); + httpLabel->setAnchorPoint(Vec2(1.0,0.5)); + httpLabel->setPosition(urlTextField->getPosition() - Vec2(urlTextField->getContentSize().width/2,0)); + this->addChild(httpLabel); + + + Button *resetBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + resetBtn->setTitleText("Visit URL"); + resetBtn->setPosition(Vec2(winSize/2) + Vec2(50, _webView->getContentSize().height/2 + + resetBtn->getContentSize().height/2 + 10)); + resetBtn->addClickEventListener([=](Ref*){ + _webView->loadUrl(std::string("http://") + urlTextField->getStringValue()); + }); + this->addChild(resetBtn); + + + Button *reloadBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + reloadBtn->setTitleText("Reload"); + reloadBtn->setPosition(Vec2(winSize/2) + Vec2( _webView->getContentSize().width/2 + + reloadBtn->getContentSize().width/2 + 10,50 )); + reloadBtn->addClickEventListener([=](Ref*){ + _webView->reload(); + }); + this->addChild(reloadBtn); + + Button *forwardBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + forwardBtn->setTitleText("Forward"); + forwardBtn->setPosition(Vec2(winSize/2) + Vec2( _webView->getContentSize().width/2 + + forwardBtn->getContentSize().width/2 + 10,0 )); + forwardBtn->addClickEventListener([=](Ref*){ + _webView->goForward(); + }); + this->addChild(forwardBtn); + + + + Button *backBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + backBtn->setTitleText("Back"); + backBtn->setPosition(Vec2(winSize/2) + Vec2( _webView->getContentSize().width/2 + + backBtn->getContentSize().width/2 + 10,-50 )); + backBtn->addClickEventListener([=](Ref*){ + _webView->goBack(); + }); + this->addChild(backBtn); + + + Button *loadFileBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + loadFileBtn->setTitleText("Load FILE"); + loadFileBtn->setPosition(Vec2(winSize/2) - Vec2( _webView->getContentSize().width/2 + + loadFileBtn->getContentSize().width/2 + 10,50 )); + loadFileBtn->addClickEventListener([=](Ref*){ + _webView->loadFile("Test.html"); + }); + this->addChild(loadFileBtn); + + Button *loadHTMLBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + loadHTMLBtn->setTitleText("Load HTML"); + loadHTMLBtn->setPosition(Vec2(winSize/2) - Vec2( _webView->getContentSize().width/2 + + loadHTMLBtn->getContentSize().width/2 + 10,0 )); + loadHTMLBtn->addClickEventListener([=](Ref*){ + _webView->loadHTMLString("Hello World","text/html"); + }); + this->addChild(loadHTMLBtn); + + + + + Button *evalJsBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + evalJsBtn->setTitleText("Evaluate JS"); + evalJsBtn->setPosition(Vec2(winSize/2) - Vec2( _webView->getContentSize().width/2 + + evalJsBtn->getContentSize().width/2 + 10,-50 )); + evalJsBtn->addClickEventListener([=](Ref*){ + _webView->evaluateJS("alert(\"hello\")"); + }); + this->addChild(evalJsBtn); + + return true; + } + return false; +} + +bool WebViewTest::onWebViewShouldStartLoading(experimental::ui::WebView *sender, std::string url) +{ + CCLOG("onWebViewShouldStartLoading, url is %s", url.c_str()); + + return true; +} + +void WebViewTest::onWebViewDidFinishLoading(experimental::ui::WebView *sender, std::string url) +{ + CCLOG("onWebViewDidFinishLoading, url is %s", url.c_str()); + +} + +void WebViewTest::onWebViewDidFailLoading(experimental::ui::WebView *sender, std::string url) +{ + CCLOG("onWebViewDidFailLoading, url is %s", url.c_str()); + +} + diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h new file mode 100644 index 0000000000..a7ae59e075 --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h @@ -0,0 +1,50 @@ +/**************************************************************************** + 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 __cocos2d_tests__UIWebViewTest__ +#define __cocos2d_tests__UIWebViewTest__ + +#include "../UIScene.h" + +USING_NS_CC; + +class WebViewTest : public UIScene +{ +public: + WebViewTest(); + virtual ~WebViewTest(); + UI_SCENE_CREATE_FUNC(WebViewTest); + + virtual bool init(); + bool onWebViewShouldStartLoading(experimental::ui::WebView *sender, std::string url); + void onWebViewDidFinishLoading(experimental::ui::WebView *sender, std::string url); + void onWebViewDidFailLoading(experimental::ui::WebView *sender, std::string url); + + +private: + cocos2d::experimental::ui::WebView *_webView; + +}; + +#endif /* defined(__cocos2d_tests__UIWebViewTest__) */ diff --git a/tests/cpp-tests/Resources/Test.html b/tests/cpp-tests/Resources/Test.html new file mode 100644 index 0000000000..1e90fb526f --- /dev/null +++ b/tests/cpp-tests/Resources/Test.html @@ -0,0 +1,5 @@ + + + Hello World + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.android/jni/Application.mk b/tests/cpp-tests/proj.android/jni/Application.mk index 362124d303..59808706eb 100644 --- a/tests/cpp-tests/proj.android/jni/Application.mk +++ b/tests/cpp-tests/proj.android/jni/Application.mk @@ -5,8 +5,7 @@ APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-ch APP_LDFLAGS := -latomic -APP_DEBUG := $(strip $(NDK_DEBUG)) -ifeq ($(APP_DEBUG),1) +ifeq ($(NDK_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := debug else diff --git a/tests/game-controller-test/proj.android/jni/Application.mk b/tests/game-controller-test/proj.android/jni/Application.mk index 93c859c1b0..59808706eb 100644 --- a/tests/game-controller-test/proj.android/jni/Application.mk +++ b/tests/game-controller-test/proj.android/jni/Application.mk @@ -5,11 +5,10 @@ APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-ch APP_LDFLAGS := -latomic -APP_DEBUG := $(strip $(NDK_DEBUG)) -ifeq ($(APP_DEBUG),1) +ifeq ($(NDK_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := debug else APP_CPPFLAGS += -DNDEBUG APP_OPTIM := release -endif \ No newline at end of file +endif diff --git a/tests/lua-empty-test/project/proj.android/jni/Application.mk b/tests/lua-empty-test/project/proj.android/jni/Application.mk index 93c859c1b0..59808706eb 100644 --- a/tests/lua-empty-test/project/proj.android/jni/Application.mk +++ b/tests/lua-empty-test/project/proj.android/jni/Application.mk @@ -5,11 +5,10 @@ APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-ch APP_LDFLAGS := -latomic -APP_DEBUG := $(strip $(NDK_DEBUG)) -ifeq ($(APP_DEBUG),1) +ifeq ($(NDK_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := debug else APP_CPPFLAGS += -DNDEBUG APP_OPTIM := release -endif \ No newline at end of file +endif diff --git a/tests/lua-game-controller-test/project/proj.android/jni/Application.mk b/tests/lua-game-controller-test/project/proj.android/jni/Application.mk index 362124d303..59808706eb 100644 --- a/tests/lua-game-controller-test/project/proj.android/jni/Application.mk +++ b/tests/lua-game-controller-test/project/proj.android/jni/Application.mk @@ -5,8 +5,7 @@ APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-ch APP_LDFLAGS := -latomic -APP_DEBUG := $(strip $(NDK_DEBUG)) -ifeq ($(APP_DEBUG),1) +ifeq ($(NDK_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := debug else diff --git a/tests/lua-tests/project/proj.android/jni/Application.mk b/tests/lua-tests/project/proj.android/jni/Application.mk index 93c859c1b0..59808706eb 100644 --- a/tests/lua-tests/project/proj.android/jni/Application.mk +++ b/tests/lua-tests/project/proj.android/jni/Application.mk @@ -5,11 +5,10 @@ APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-ch APP_LDFLAGS := -latomic -APP_DEBUG := $(strip $(NDK_DEBUG)) -ifeq ($(APP_DEBUG),1) +ifeq ($(NDK_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := debug else APP_CPPFLAGS += -DNDEBUG APP_OPTIM := release -endif \ No newline at end of file +endif