From a6be5226012e724067d99253348f5acd4b870c46 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 28 Feb 2019 11:17:05 +0800 Subject: [PATCH] make hello lua work --- CMakeLists.txt | 2 +- build/cocos2d_libs.xcodeproj/project.pbxproj | 4 - build/cocos2d_tests.xcodeproj/project.pbxproj | 2 + .../cocostudio/ActionTimeline/CSLoader.cpp | 3 +- cocos/scripting/deprecated/CCArray.cpp | 773 +++ cocos/scripting/deprecated/CCArray.h | 563 ++ cocos/scripting/deprecated/CCBool.h | 75 + cocos/scripting/deprecated/CCDataVisitor.cpp | 227 + cocos/scripting/deprecated/CCDataVisitor.h | 113 + cocos/scripting/deprecated/CCDeprecated.cpp | 480 ++ cocos/scripting/deprecated/CCDeprecated.h | 1140 ++++ cocos/scripting/deprecated/CCDictionary.cpp | 617 ++ cocos/scripting/deprecated/CCDictionary.h | 462 ++ .../LuaOpengl.h => deprecated/CCDouble.h} | 75 +- .../CCFloat.h} | 64 +- cocos/scripting/deprecated/CCInteger.h | 84 + .../deprecated/CCNotificationCenter.cpp | 300 + .../deprecated/CCNotificationCenter.h | 214 + cocos/scripting/deprecated/CCSet.cpp | 168 + cocos/scripting/deprecated/CCSet.h | 123 + cocos/scripting/deprecated/CCString.cpp | 276 + cocos/scripting/deprecated/CCString.h | 220 + cocos/scripting/deprecated/CMakeLists.txt | 23 + cocos/scripting/lua-bindings/CMakeLists.txt | 28 +- .../auto/lua_cocos2dx_3d_auto.cpp | 56 +- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 5849 ----------------- .../auto/lua_cocos2dx_cocosbuilder_auto.cpp | 2962 --------- .../auto/lua_cocos2dx_cocosbuilder_auto.hpp | 74 - .../manual/3d/lua_cocos2dx_3d_manual.cpp | 5 +- .../lua-bindings/manual/CCLuaEngine.cpp | 1 - .../lua-bindings/manual/CCLuaEngine.h | 2 +- .../lua-bindings/manual/CCLuaStack.cpp | 12 +- .../lua-bindings/manual/CCLuaStack.h | 2 +- .../manual/LuaBasicConversions.cpp | 239 +- .../lua-bindings/manual/LuaBasicConversions.h | 52 +- .../lua-bindings/manual/cocos2d/LuaOpengl.cpp | 5307 --------------- .../manual/cocos2d/LuaScriptHandlerMgr.cpp | 1 - .../cocos2d/lua_cocos2dx_deprecated.cpp | 2458 +------ .../manual/cocos2d/lua_cocos2dx_manual.cpp | 862 +-- .../manual/cocosbuilder/CCBProxy.cpp | 162 - .../manual/cocosbuilder/CCBProxy.h | 129 - .../lua_cocos2dx_cocosbuilder_manual.cpp | 470 -- .../lua_cocos2dx_coco_studio_manual.cpp | 4 +- .../manual/lua_module_register.cpp | 9 +- .../manual/network/Lua_web_socket.cpp | 2 +- .../manual/network/lua_downloader.cpp | 4 +- .../spine/lua_cocos2dx_spine_manual.cpp | 5 +- .../project.pbxproj | 253 +- .../script/cocos2d/DeprecatedCocos2dEnum.lua | 295 - .../script/cocos2d/DeprecatedCocos2dFunc.lua | 18 - .../script/cocos2d/DeprecatedOpenglEnum.lua | 288 - .../lua-bindings/script/cocos2d/Opengl.lua | 297 - .../script/cocos2d/OpenglConstants.lua | 826 --- .../script/cocosbuilder/CCBReaderLoad.lua | 125 - .../DeprecatedCocosBuilderClass.lua | 35 - cocos/scripting/lua-bindings/script/init.lua | 52 +- 56 files changed, 6192 insertions(+), 20700 deletions(-) create mode 100644 cocos/scripting/deprecated/CCArray.cpp create mode 100644 cocos/scripting/deprecated/CCArray.h create mode 100644 cocos/scripting/deprecated/CCBool.h create mode 100644 cocos/scripting/deprecated/CCDataVisitor.cpp create mode 100644 cocos/scripting/deprecated/CCDataVisitor.h create mode 100644 cocos/scripting/deprecated/CCDeprecated.cpp create mode 100644 cocos/scripting/deprecated/CCDeprecated.h create mode 100644 cocos/scripting/deprecated/CCDictionary.cpp create mode 100644 cocos/scripting/deprecated/CCDictionary.h rename cocos/scripting/{lua-bindings/manual/cocos2d/LuaOpengl.h => deprecated/CCDouble.h} (59%) rename cocos/scripting/{lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.h => deprecated/CCFloat.h} (55%) create mode 100644 cocos/scripting/deprecated/CCInteger.h create mode 100644 cocos/scripting/deprecated/CCNotificationCenter.cpp create mode 100644 cocos/scripting/deprecated/CCNotificationCenter.h create mode 100644 cocos/scripting/deprecated/CCSet.cpp create mode 100644 cocos/scripting/deprecated/CCSet.h create mode 100644 cocos/scripting/deprecated/CCString.cpp create mode 100644 cocos/scripting/deprecated/CCString.h create mode 100644 cocos/scripting/deprecated/CMakeLists.txt delete mode 100644 cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.cpp delete mode 100644 cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.hpp delete mode 100644 cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.cpp delete mode 100644 cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.cpp delete mode 100644 cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h delete mode 100644 cocos/scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.cpp delete mode 100644 cocos/scripting/lua-bindings/script/cocos2d/DeprecatedOpenglEnum.lua delete mode 100644 cocos/scripting/lua-bindings/script/cocos2d/Opengl.lua delete mode 100644 cocos/scripting/lua-bindings/script/cocos2d/OpenglConstants.lua delete mode 100644 cocos/scripting/lua-bindings/script/cocosbuilder/CCBReaderLoad.lua delete mode 100644 cocos/scripting/lua-bindings/script/cocosbuilder/DeprecatedCocosBuilderClass.lua diff --git a/CMakeLists.txt b/CMakeLists.txt index 90bf705b7c..e149aa19d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ AssureOutOfSourceBuilds() include(CocosBuildSet) # for metal-support alpha release, we only test cpp -set(BUILD_LUA_LIBS OFF) +set(BUILD_LUA_LIBS ON) set(BUILD_JS_LIBS OFF) add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 216487e25b..3e5cbc0e87 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -2375,8 +2375,6 @@ EDC78CE921CA19FC00E1863C /* NodeReaderProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8521CA19FA00E1863C /* NodeReaderProtocol.cpp */; }; EDC78CEA21CA19FC00E1863C /* Particle3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8721CA19FA00E1863C /* Particle3DReader.h */; }; EDC78CEB21CA19FC00E1863C /* Particle3DReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8721CA19FA00E1863C /* Particle3DReader.h */; }; - EDC78CEC21CA19FC00E1863C /* Particle3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8821CA19FA00E1863C /* Particle3DReader.cpp */; }; - EDC78CED21CA19FC00E1863C /* Particle3DReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDC78A8821CA19FA00E1863C /* Particle3DReader.cpp */; }; EDC78CEE21CA19FC00E1863C /* CSBoneBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8A21CA19FA00E1863C /* CSBoneBinary_generated.h */; }; EDC78CEF21CA19FC00E1863C /* CSBoneBinary_generated.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8A21CA19FA00E1863C /* CSBoneBinary_generated.h */; }; EDC78CF021CA19FC00E1863C /* SkeletonNodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC78A8B21CA19FA00E1863C /* SkeletonNodeReader.h */; }; @@ -7560,7 +7558,6 @@ EDC78BEE21CA19FB00E1863C /* CocoStudio.cpp in Sources */, EDC78D0A21CA19FC00E1863C /* CCArmatureDefine.cpp in Sources */, 50ABBE411925AB6F00A911A9 /* CCDirector.cpp in Sources */, - EDC78CEC21CA19FC00E1863C /* Particle3DReader.cpp in Sources */, 1A570221180BCC1A0088DEC7 /* CCParticleBatchNode.cpp in Sources */, ED28C27F219E629C0078D854 /* CommandBuffer.cpp in Sources */, 1A570225180BCC1A0088DEC7 /* CCParticleExamples.cpp in Sources */, @@ -8093,7 +8090,6 @@ 50ABBEC01925AB6F00A911A9 /* CCValue.cpp in Sources */, 50ABBD591925AB0000A911A9 /* Vec2.cpp in Sources */, 50ABBE421925AB6F00A911A9 /* CCDirector.cpp in Sources */, - EDC78CED21CA19FC00E1863C /* Particle3DReader.cpp in Sources */, 1A57007E180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, 46AF3A8921F6B02400D5AFCD /* CCOBB.cpp in Sources */, 46AF3AC521F6B02400D5AFCD /* CCAABB.cpp in Sources */, diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index c26ea2156f..2a9a446da3 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -562,6 +562,7 @@ 463D7E7E1D227CA400EA6BD1 /* Bug-15776.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 463D7E7A1D227C3800EA6BD1 /* Bug-15776.cpp */; }; 463D7E7F1D227CAB00EA6BD1 /* Bug-15776.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 463D7E7A1D227C3800EA6BD1 /* Bug-15776.cpp */; }; 46535CDB21ABD689005B5370 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46535CDA21ABD689005B5370 /* Metal.framework */; }; + 4662466A222696810008FC75 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46535CDA21ABD689005B5370 /* Metal.framework */; }; 46AF3AE621F740FB00D5AFCD /* Sprite3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3AE421F740FB00D5AFCD /* Sprite3DTest.cpp */; }; 46AF3AE721F740FB00D5AFCD /* Sprite3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3AE421F740FB00D5AFCD /* Sprite3DTest.cpp */; }; 46AF3AE821F740FB00D5AFCD /* DrawNode3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46AF3AE521F740FB00D5AFCD /* DrawNode3D.cpp */; }; @@ -1994,6 +1995,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 4662466A222696810008FC75 /* Metal.framework in Frameworks */, 4B5C5BA91CA1147F00D55A14 /* Security.framework in Frameworks */, 15EFA270198B25B9000C57D3 /* libcocos2d Mac.a in Frameworks */, 15EFA25B198A4A47000C57D3 /* libluacocos2d Mac.a in Frameworks */, diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp index ac7a550a21..80a05d7fd3 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp @@ -223,7 +223,8 @@ CSLoader::CSLoader() CREATE_CLASS_NODE_READER_INFO(Node3DReader); CREATE_CLASS_NODE_READER_INFO(Sprite3DReader); CREATE_CLASS_NODE_READER_INFO(UserCameraReader); - CREATE_CLASS_NODE_READER_INFO(Particle3DReader); + //TODO minggo + // CREATE_CLASS_NODE_READER_INFO(Particle3DReader); CREATE_CLASS_NODE_READER_INFO(GameNode3DReader); CREATE_CLASS_NODE_READER_INFO(Light3DReader); CREATE_CLASS_NODE_READER_INFO(TabControlReader); diff --git a/cocos/scripting/deprecated/CCArray.cpp b/cocos/scripting/deprecated/CCArray.cpp new file mode 100644 index 0000000000..e8a12c7a5c --- /dev/null +++ b/cocos/scripting/deprecated/CCArray.cpp @@ -0,0 +1,773 @@ +/**************************************************************************** +Copyright (c) 2010 ForzeField Studios S.L. http://forzefield.com +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +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 "scripting/deprecated/CCArray.h" +#include "scripting/deprecated/CCString.h" +#include "base/ccUTF8.h" +#include "platform/CCFileUtils.h" + +NS_CC_BEGIN + +#if CC_USE_ARRAY_VECTOR + +// ---------------------------------------------------------------------------------- +// std::vector implementation +// ---------------------------------------------------------------------------------- + +__Array::__Array() +: data(nullptr) +{ + init(); +} + +__Array* __Array::create() +{ + __Array* array = new (std::nothrow) __Array(); + + if (array && array->initWithCapacity(7)) + { + array->autorelease(); + } + else + { + CC_SAFE_DELETE(array); + } + + return array; +} + +__Array* __Array::createWithObject(Ref* object) +{ + __Array* array = new (std::nothrow) __Array(); + + if (array && array->initWithObject(object)) + { + array->autorelease(); + } + else + { + CC_SAFE_DELETE(array); + } + + return array; +} + +__Array* __Array::create(Ref* object, ...) +{ + va_list args; + va_start(args,object); + + __Array* array = create(); + if (array && object) + { + array->addObject(object); + Ref* i = va_arg(args, Ref*); + while (i) + { + array->addObject(i); + i = va_arg(args, Ref*); + } + } + else + { + CC_SAFE_DELETE(array); + } + + va_end(args); + + return array; +} + +__Array* __Array::createWithArray(__Array* otherArray) +{ + return otherArray->clone(); +} + +__Array* __Array::createWithCapacity(int capacity) +{ + CCASSERT(capacity>=0, "Invalid capacity"); + + __Array* array = new (std::nothrow) __Array(); + + if (array && array->initWithCapacity(capacity)) + { + array->autorelease(); + } + else + { + CC_SAFE_DELETE(array); + } + + return array; +} + +__Array* __Array::createWithContentsOfFile(const std::string& fileName) +{ + __Array* ret = __Array::createWithContentsOfFileThreadSafe(fileName); + if (ret != nullptr) + { + ret->autorelease(); + } + return ret; +} + +__Array* __Array::createWithContentsOfFileThreadSafe(const std::string& fileName) +{ + return FileUtils::getInstance()->createArrayWithContentsOfFile(fileName); +} + +bool __Array::init() +{ + return initWithCapacity(7); +} + +bool __Array::initWithObject(Ref* object) +{ + bool ret = initWithCapacity(7); + if (ret) + { + addObject(object); + } + return ret; +} + +/** Initializes an array with some objects */ +bool __Array::initWithObjects(Ref* object, ...) +{ + bool ret = false; + do + { + CC_BREAK_IF(object == nullptr); + + va_list args; + va_start(args, object); + + if (object) + { + this->addObject(object); + Ref* i = va_arg(args, Ref*); + while (i) + { + this->addObject(i); + i = va_arg(args, Ref*); + } + ret = true; + } + va_end(args); + + } while (false); + + return ret; +} + +bool __Array::initWithCapacity(int capacity) +{ + CCASSERT(capacity>=0, "Invalid capacity"); + + data.reserve(capacity); + return true; +} + +bool __Array::initWithArray(__Array* otherArray) +{ + data = otherArray->data; + return true; +} + +ssize_t __Array::getIndexOfObject(Ref* object) const +{ + auto it = data.begin(); + + for (ssize_t i = 0; it != data.end(); ++it, ++i) + { + if (it->get() == object) + { + return i; + } + } + + return -1; +} + +Ref* __Array::getRandomObject() +{ + if (data.size()==0) + { + return nullptr; + } + + float r = CCRANDOM_0_1(); + + if (r == 1) // to prevent from accessing data-arr[data->num], out of range. + { + r = 0; + } + + r *= data.size(); + + return data[r].get(); +} + +bool __Array::containsObject(Ref* object) const +{ + ssize_t i = this->getIndexOfObject(object); + return (i >= 0); +} + +bool __Array::isEqualToArray(__Array* otherArray) +{ + for (ssize_t i = 0; i < this->count(); ++i) + { + if (!this->getObjectAtIndex(i)->isEqual(otherArray->getObjectAtIndex(i))) + { + return false; + } + } + return true; +} + +void __Array::addObject(Ref* object) +{ + data.push_back(RCPtr(object)); +} + +void __Array::addObjectsFromArray(__Array* otherArray) +{ + data.insert(data.end(), otherArray->data.begin(), otherArray->data.end()); +} + +void __Array::insertObject(Ref* object, int index) +{ + data.insert(std::begin(data) + index, RCPtr(object)); +} + +void __Array::setObject(Ref* object, int index) +{ + data[index] = RCPtr(object); +} + +void __Array::removeLastObject(bool releaseObj) +{ + CCASSERT(data.size(), "no objects added"); + data.pop_back(); +} + +void __Array::removeObject(Ref* object, bool releaseObj /* ignored */) +{ + data.erase(std::remove(data.begin(), data.end(), object)); +} + +void __Array::removeObjectAtIndex(ssize_t index, bool releaseObj /* ignored */) +{ + auto obj = data[index]; + data.erase(data.begin() + index); +} + +void __Array::removeObjectsInArray(__Array* otherArray) +{ + CCASSERT(false, "not implemented"); +} + +void __Array::removeAllObjects() +{ + data.erase(std::begin(data), std::end(data)); +} + +void __Array::fastRemoveObjectAtIndex(int index) +{ + removeObjectAtIndex(index); +} + +void __Array::fastRemoveObject(Ref* object) +{ + removeObject(object); +} + +void __Array::exchangeObject(Ref* object1, Ref* object2) +{ + ssize_t idx1 = getIndexOfObject(object1); + ssize_t idx2 = getIndexOfObject(object2); + + CCASSERT(idx1 >= 0 && idx2 >= 2, "invalid object index"); + + std::swap(data[idx1], data[idx2]); +} + +void __Array::exchangeObjectAtIndex(ssize_t index1, ssize_t index2) +{ + std::swap(data[index1], data[index2]); +} + +void __Array::replaceObjectAtIndex(int index, Ref* object, bool releaseObject /* ignored */) +{ + data[index] = object; +} + +void __Array::reverseObjects() +{ + std::reverse(std::begin(data), std::end(data)); +} + +void __Array::reduceMemoryFootprint() +{ + // N/A +} + +__Array::~Array() +{ + CCLOGINFO("deallocing Array: %p - len: %d", this, count() ); +} + +__Array* __Array::clone() const +{ + __Array* ret = new (std::nothrow) __Array(); + ret->autorelease(); + ret->initWithCapacity(this->data.size() > 0 ? this->data.size() : 1); + + Ref* obj = nullptr; + Ref* tmpObj = nullptr; + Clonable* clonable = nullptr; + const __Array* self( this ); + CCARRAY_FOREACH(self, obj) + { + clonable = dynamic_cast(obj); + if (clonable) + { + tmpObj = dynamic_cast(clonable->clone()); + if (tmpObj) + { + ret->addObject(tmpObj); + } + } + else + { + CCLOGWARN("%s isn't clonable.", typeid(*obj).name()); + } + } + return ret; +} + +void __Array::acceptVisitor(DataVisitor &visitor) +{ + visitor.visit(this); +} + +// ---------------------------------------------------------------------------------- +// ccArray implementation +// ---------------------------------------------------------------------------------- + +#else + +__Array::__Array() +: data(nullptr) +{ +// init(); +} + +__Array* __Array::create() +{ + __Array* array = new (std::nothrow) __Array(); + + if (array && array->initWithCapacity(7)) + { + array->autorelease(); + } + else + { + CC_SAFE_DELETE(array); + } + + return array; +} + +__Array* __Array::createWithObject(Ref* object) +{ + __Array* array = new (std::nothrow) __Array(); + + if (array && array->initWithObject(object)) + { + array->autorelease(); + } + else + { + CC_SAFE_DELETE(array); + } + + return array; +} + +__Array* __Array::create(Ref* object, ...) +{ + va_list args; + va_start(args,object); + + __Array* array = create(); + if (array && object) + { + array->addObject(object); + Ref *i = va_arg(args, Ref*); + while (i) + { + array->addObject(i); + i = va_arg(args, Ref*); + } + } + else + { + CC_SAFE_DELETE(array); + } + + va_end(args); + + return array; +} + +__Array* __Array::createWithArray(__Array* otherArray) +{ + return otherArray->clone(); +} + +__Array* __Array::createWithCapacity(ssize_t capacity) +{ + CCASSERT(capacity>=0, "Invalid capacity"); + + __Array* array = new (std::nothrow) __Array(); + + if (array && array->initWithCapacity(capacity)) + { + array->autorelease(); + } + else + { + CC_SAFE_DELETE(array); + } + + return array; +} + +__Array* __Array::createWithContentsOfFile(const std::string& fileName) +{ + __Array* ret = __Array::createWithContentsOfFileThreadSafe(fileName); + if (ret != nullptr) + { + ret->autorelease(); + } + return ret; +} + +__Array* __Array::createWithContentsOfFileThreadSafe(const std::string& fileName) +{ + ValueVector arr = FileUtils::getInstance()->getValueVectorFromFile(fileName); + + __Array* ret = __Array::createWithCapacity(static_cast(arr.size())); + + for(const auto &value : arr) { + ret->addObject(__String::create(value.asString())); + } + + return ret; +} + +bool __Array::init() +{ + CCASSERT(!data, "Array cannot be re-initialized"); + + return initWithCapacity(7); +} + +bool __Array::initWithObject(Ref* object) +{ + CCASSERT(!data, "Array cannot be re-initialized"); + + bool ret = initWithCapacity(7); + if (ret) + { + addObject(object); + } + return ret; +} + +/** Initializes an array with some objects */ +bool __Array::initWithObjects(Ref* object, ...) +{ + CCASSERT(!data, "Array cannot be re-initialized"); + + bool ret = false; + do + { + CC_BREAK_IF(object == nullptr); + CC_BREAK_IF(!initWithCapacity(1)); + + va_list args; + va_start(args, object); + + if (object) + { + this->addObject(object); + Ref* i = va_arg(args, Ref*); + while (i) + { + this->addObject(i); + i = va_arg(args, Ref*); + } + ret = true; + } + va_end(args); + + } while (false); + + return ret; +} + +bool __Array::initWithCapacity(ssize_t capacity) +{ + CCASSERT(capacity>=0 && !data, "Array cannot be re-initialized"); + + data = ccArrayNew(capacity); + return true; +} + +bool __Array::initWithArray(__Array* otherArray) +{ + CCASSERT(!data, "Array cannot be re-initialized"); + + bool ret = false; + do + { + CC_BREAK_IF(! initWithCapacity(otherArray->data->num)); + + addObjectsFromArray(otherArray); + ret = true; + } while (0); + + return ret; +} + +ssize_t __Array::getIndexOfObject(Ref* object) const +{ + return ccArrayGetIndexOfObject(data, object); +} + +Ref* __Array::getRandomObject() +{ + if (data->num == 0) + { + return nullptr; + } + + float r = CCRANDOM_0_1(); + + if (r == 1) // to prevent from accessing data-arr[data->num], out of range. + { + r = 0; + } + + return data->arr[static_cast(data->num * r)]; +} + +bool __Array::containsObject(Ref* object) const +{ + return ccArrayContainsObject(data, object); +} + +bool __Array::isEqualToArray(__Array* otherArray) +{ + for (int i = 0; i < this->count(); ++i) + { +//FIXME:james + if (this->getObjectAtIndex(i) != otherArray->getObjectAtIndex(i)) + { + return false; + } + } + return true; +} + +void __Array::addObject(Ref* object) +{ + CCASSERT(data, "Array not initialized"); + ccArrayAppendObjectWithResize(data, object); +} + +void __Array::addObjectsFromArray(__Array* otherArray) +{ + CCASSERT(data, "Array not initialized"); + ccArrayAppendArrayWithResize(data, otherArray->data); +} + +void __Array::insertObject(Ref* object, ssize_t index) +{ + CCASSERT(data, "Array not initialized"); + ccArrayInsertObjectAtIndex(data, object, index); +} + +void __Array::setObject(Ref* object, ssize_t index) +{ + CCASSERT(index >= 0 && index < count(), "Invalid index"); + + if (object != data->arr[index]) + { + data->arr[index]->release(); + data->arr[index] = object; + object->retain(); + } +} + +void __Array::removeLastObject(bool releaseObj) +{ + CCASSERT(data->num, "no objects added"); + ccArrayRemoveObjectAtIndex(data, data->num - 1, releaseObj); +} + +void __Array::removeObject(Ref* object, bool releaseObj/* = true*/) +{ + ccArrayRemoveObject(data, object, releaseObj); +} + +void __Array::removeObjectAtIndex(ssize_t index, bool releaseObj) +{ + ccArrayRemoveObjectAtIndex(data, index, releaseObj); +} + +void __Array::removeObjectsInArray(__Array* otherArray) +{ + ccArrayRemoveArray(data, otherArray->data); +} + +void __Array::removeAllObjects() +{ + ccArrayRemoveAllObjects(data); +} + +void __Array::fastRemoveObjectAtIndex(ssize_t index) +{ + ccArrayFastRemoveObjectAtIndex(data, index); +} + +void __Array::fastRemoveObject(Ref* object) +{ + ccArrayFastRemoveObject(data, object); +} + +void __Array::exchangeObject(Ref* object1, Ref* object2) +{ + auto index1 = ccArrayGetIndexOfObject(data, object1); + if (index1 == CC_INVALID_INDEX) + { + return; + } + + auto index2 = ccArrayGetIndexOfObject(data, object2); + if (index2 == CC_INVALID_INDEX) + { + return; + } + + ccArraySwapObjectsAtIndexes(data, index1, index2); +} + +void __Array::exchangeObjectAtIndex(ssize_t index1, ssize_t index2) +{ + ccArraySwapObjectsAtIndexes(data, index1, index2); +} + +void __Array::replaceObjectAtIndex(ssize_t index, Ref* object, bool releaseObject/* = true*/) +{ + ccArrayInsertObjectAtIndex(data, object, index); + ccArrayRemoveObjectAtIndex(data, index + 1, releaseObject); +} + +void __Array::reverseObjects() +{ + if (data->num > 1) + { + // floorf(), since in the case of an even number, the number of swaps stays the same + auto count = static_cast(floorf(data->num/2.f)); + ssize_t maxIndex = data->num - 1; + + for (ssize_t i = 0; i < count ; ++i) + { + ccArraySwapObjectsAtIndexes(data, i, maxIndex); + --maxIndex; + } + } +} + +void __Array::reduceMemoryFootprint() +{ + ccArrayShrink(data); +} + +__Array::~__Array() +{ + CCLOGINFO("deallocing Array: %p - len: %d", this, count() ); + + ccArrayFree(data); +} + +__Array* __Array::clone() const +{ + __Array* ret = new (std::nothrow) __Array(); + ret->autorelease(); + ret->initWithCapacity(this->data->num > 0 ? this->data->num : 1); + + if (data->num <= 0) { + return ret; + } + + Ref* obj = nullptr; + Ref* tmpObj = nullptr; + Clonable* clonable = nullptr; + CC_ASSERT(data->num > 0); + for (Ref** arr = data->arr, **end = data->arr + data->num - 1; + arr <= end && ((obj = *arr) != nullptr); arr++) + { + clonable = dynamic_cast(obj); + if (clonable) + { + tmpObj = dynamic_cast(clonable->clone()); + if (tmpObj) + { + ret->addObject(tmpObj); + } + } + else + { + CCLOGWARN("%s isn't clonable.", typeid(*obj).name()); + } + } + return ret; +} + +void __Array::acceptVisitor(DataVisitor &visitor) +{ + visitor.visit(this); +} + +#endif // uses ccArray + +NS_CC_END diff --git a/cocos/scripting/deprecated/CCArray.h b/cocos/scripting/deprecated/CCArray.h new file mode 100644 index 0000000000..c392cf77ec --- /dev/null +++ b/cocos/scripting/deprecated/CCArray.h @@ -0,0 +1,563 @@ +/**************************************************************************** +Copyright (c) 2010 ForzeField Studios S.L. http://forzefield.com +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +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 __CCARRAY_H__ +#define __CCARRAY_H__ +/// @cond DO_NOT_SHOW + +#define CC_USE_ARRAY_VECTOR 0 + +#if CC_USE_ARRAY_VECTOR +#include +#include +#include "base/CCRef.h" +#include "base/ccMacros.h" +#else +#include "base/ccCArray.h" +#endif + +#include "scripting/deprecated/CCDataVisitor.h" + +#if CC_USE_ARRAY_VECTOR +/** + * A reference counting-managed pointer for classes derived from RCBase which can + * be used as C pointer + * Original code: http://www.codeproject.com/Articles/64111/Building-a-Quick-and-Handy-Reference-Counting-Clas + * License: http://www.codeproject.com/info/cpol10.aspx + */ +template < class T > +class RCPtr +{ +public: + //Construct using a C pointer + //e.g. RCPtr< T > x = new (std::nothrow) T(); + RCPtr(T* ptr = nullptr) + : _ptr(ptr) + { + if(ptr != nullptr) {ptr->retain();} + } + + //Copy constructor + RCPtr(const RCPtr &ptr) + : _ptr(ptr._ptr) + { +// printf("Array: copy constructor: %p\n", this); + if(_ptr != NULL) {_ptr->retain();} + } + + //Move constructor + RCPtr(RCPtr &&ptr) + : _ptr(ptr._ptr) + { +// printf("Array: Move Constructor: %p\n", this); + ptr._ptr = nullptr; + } + + ~RCPtr() + { +// printf("Array: Destructor: %p\n", this); + if(_ptr != nullptr) {_ptr->release();} + } + + //Assign a pointer + //e.g. x = new (std::nothrow) T(); + RCPtr &operator=(T* ptr) + { +// printf("Array: operator= T*: %p\n", this); + + //The following grab and release operations have to be performed + //in that order to handle the case where ptr == _ptr + //(See comment below by David Garlisch) + if(ptr != nullptr) {ptr->retain();} + if(_ptr != nullptr) {_ptr->release();} + _ptr = ptr; + return (*this); + } + + //Assign another RCPtr + RCPtr &operator=(const RCPtr &ptr) + { +// printf("Array: operator= const&: %p\n", this); + return (*this) = ptr._ptr; + } + + //Retrieve actual pointer + T* get() const + { + return _ptr; + } + + //Some overloaded operators to facilitate dealing with an RCPtr + //as a conventional C pointer. + //Without these operators, one can still use the less transparent + //get() method to access the pointer. + T* operator->() const {return _ptr;} //x->member + T &operator*() const {return *_ptr;} //*x, (*x).member + explicit operator T*() const {return _ptr;} //T* y = x; + explicit operator bool() const {return _ptr != nullptr;} //if(x) {/*x is not NULL*/} + bool operator==(const RCPtr &ptr) {return _ptr == ptr._ptr;} + bool operator==(const T *ptr) {return _ptr == ptr;} + +private: + T *_ptr; //Actual pointer +}; +#endif // CC_USE_ARRAY_VECTOR + + +/** + * @addtogroup data_structures + * @{ + */ + +/** @def CCARRAY_FOREACH +A convenience macro to iterate over a Array using. It is faster than the "fast enumeration" interface. +@since v0.99.4 +*/ + +/* +In cocos2d-iphone 1.0.0, This macro have been update to like this: + +#define CCARRAY_FOREACH(__array__, __object__) \ +if (__array__ && __array__->data->num > 0) \ +for(id *__arr__ = __array__->data->arr, *end = __array__->data->arr + __array__->data->num-1; \ +__arr__ <= end && ((__object__ = *__arr__) != nil || true); \ +__arr__++) + +I found that it's not work in C++. So it keep what it's look like in version 1.0.0-rc3. ---By Bin +*/ + +#if CC_USE_ARRAY_VECTOR +#define CCARRAY_FOREACH(__array__, __object__) \ + if (__array__) \ + for( auto __it__ = (__array__)->data.begin(); \ + __it__ != (__array__)->data.end() && ((__object__) = __it__->get()) != nullptr; \ + ++__it__) + + +#define CCARRAY_FOREACH_REVERSE(__array__, __object__) \ + if (__array__) \ + for( auto __it__ = (__array__)->data.rbegin(); \ + __it__ != (__array__)->data.rend() && ((__object__) = __it__->get()) != nullptr; \ + ++__it__ ) + + +#define CCARRAY_VERIFY_TYPE(__array__, __type__) void(0) + +#else // ! CC_USE_ARRAY_VECTOR -------------------------- + +#define CCARRAY_FOREACH(__array__, __object__) \ + if ((__array__) && (__array__)->data->num > 0) \ + for(Ref** __arr__ = (__array__)->data->arr, **__end__ = (__array__)->data->arr + (__array__)->data->num-1; \ + __arr__ <= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \ + __arr__++) + +#define CCARRAY_FOREACH_REVERSE(__array__, __object__) \ + if ((__array__) && (__array__)->data->num > 0) \ + for(Ref** __arr__ = (__array__)->data->arr + (__array__)->data->num-1, **__end__ = (__array__)->data->arr; \ + __arr__ >= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \ + __arr__--) + +#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0) +#define CCARRAY_VERIFY_TYPE(__array__, __type__) \ + do { \ + if ((__array__) && (__array__)->data->num > 0) \ + for(Ref** __arr__ = (__array__)->data->arr, \ + **__end__ = (__array__)->data->arr + (__array__)->data->num-1; __arr__ <= __end__; __arr__++) \ + CCASSERT(dynamic_cast<__type__>(*__arr__), "element type is wrong!"); \ + } while(false) +#else +#define CCARRAY_VERIFY_TYPE(__array__, __type__) void(0) +#endif + +#endif // ! CC_USE_ARRAY_VECTOR + + +// Common defines ----------------------------------------------------------------------------------------------- + +#define arrayMakeObjectsPerformSelector(pArray, func, elementType) \ +do { \ + if(pArray && pArray->count() > 0) \ + { \ + Ref* child; \ + CCARRAY_FOREACH(pArray, child) \ + { \ + elementType pNode = static_cast(child); \ + if(pNode) \ + { \ + pNode->func(); \ + } \ + } \ + } \ +} \ +while(false) + +#define arrayMakeObjectsPerformSelectorWithObject(pArray, func, object, elementType) \ +do { \ + if(pArray && pArray->count() > 0) \ + { \ + Ref* child; \ + CCARRAY_FOREACH(pArray, child) \ + { \ + elementType pNode = static_cast(child); \ + if(pNode) \ + { \ + pNode->func(object); \ + } \ + } \ + } \ +} \ +while(false) + + +NS_CC_BEGIN + +class CC_DLL __Array : public Ref, public Clonable +{ +public: + + /** Creates an empty array. Default capacity is 10 + * @js NA + * @lua NA + */ + static __Array* create(); + /** Create an array with objects + * @js NA + */ + static __Array* create(Ref* object, ...) CC_REQUIRES_NULL_TERMINATION; + /** Create an array with one object + * @js NA + */ + static __Array* createWithObject(Ref* object); + /** Create an array with a default capacity + * @js NA + */ + static __Array* createWithCapacity(ssize_t capacity); + /** Create an array with from an existing array + * @js NA + */ + static __Array* createWithArray(__Array* otherArray); + /** + @brief Generate a Array pointer by file + @param pFileName The file name of *.plist file + @return The Array pointer generated from the file + * @js NA + */ + static __Array* createWithContentsOfFile(const std::string& pFileName); + + /* + @brief The same meaning as arrayWithContentsOfFile(), but it doesn't call autorelease, so the + invoker should call release(). + * @js NA + * @lua NA + */ + static __Array* createWithContentsOfFileThreadSafe(const std::string& pFileName); + /** + * @js NA + * @lua NA + */ + ~__Array(); + + /** Initializes an array + * @js NA + * @lua NA + */ + bool init(); + /** Initializes an array with one object + * @js NA + * @lua NA + */ + bool initWithObject(Ref* object); + /** Initializes an array with some objects + * @js NA + * @lua NA + */ + bool initWithObjects(Ref* object, ...) CC_REQUIRES_NULL_TERMINATION; + /** Initializes an array with capacity + * @js NA + * @lua NA + */ + bool initWithCapacity(ssize_t capacity); + /** Initializes an array with an existing array + * @js NA + * @lua NA + */ + bool initWithArray(__Array* otherArray); + + // Querying an Array + + /** Returns element count of the array + * @js NA + */ + ssize_t count() const + { +#if CC_USE_ARRAY_VECTOR + return data.size(); +#else + return data->num; +#endif + } + /** Returns capacity of the array + * @js NA + */ + ssize_t capacity() const + { +#if CC_USE_ARRAY_VECTOR + return data.capacity(); +#else + return data->max; +#endif + } + /** Returns index of a certain object, return UINT_MAX if doesn't contain the object + * @js NA + * @lua NA + */ + ssize_t getIndexOfObject(Ref* object) const; + /** + * @js NA + */ + CC_DEPRECATED_ATTRIBUTE ssize_t indexOfObject(Ref* object) const { return getIndexOfObject(object); } + + /** Returns an element with a certain index + * @js NA + * @lua NA + */ + Ref* getObjectAtIndex(ssize_t index) + { + CCASSERT(index>=0 && index < count(), "index out of range in getObjectAtIndex()"); +#if CC_USE_ARRAY_VECTOR + return data[index].get(); +#else + return data->arr[index]; +#endif + } + CC_DEPRECATED_ATTRIBUTE Ref* objectAtIndex(ssize_t index) { return getObjectAtIndex(index); } + /** Returns the last element of the array + * @js NA + */ + Ref* getLastObject() + { +#if CC_USE_ARRAY_VECTOR + return data.back().get(); +#else + if(data->num > 0) + return data->arr[data->num-1]; + + return nullptr; +#endif + } + /** + * @js NA + */ + CC_DEPRECATED_ATTRIBUTE Ref* lastObject() { return getLastObject(); } + /** Returns a random element + * @js NA + * @lua NA + */ + Ref* getRandomObject(); + /** + * @js NA + */ + CC_DEPRECATED_ATTRIBUTE Ref* randomObject() { return getRandomObject(); } + /** Returns a Boolean value that indicates whether object is present in array. + * @js NA + */ + bool containsObject(Ref* object) const; + /** @since 1.1 + * @js NA + */ + bool isEqualToArray(__Array* otherArray); + // Adding Objects + + /** Add a certain object + * @js NA + */ + void addObject(Ref* object); + /** + * @js NA + */ + /** Add all elements of an existing array + * @js NA + */ + void addObjectsFromArray(__Array* otherArray); + /** Insert a certain object at a certain index + * @js NA + */ + void insertObject(Ref* object, ssize_t index); + /** sets a certain object at a certain index + * @js NA + * @lua NA + */ + void setObject(Ref* object, ssize_t index); + /** sets a certain object at a certain index without retaining. Use it with caution + * @js NA + * @lua NA + */ + void fastSetObject(Ref* object, ssize_t index) + { +#if CC_USE_ARRAY_VECTOR + setObject(object, index); +#else + // no retain + data->arr[index] = object; +#endif + } + /** + * @js NA + * @lua NA + */ + void swap( ssize_t indexOne, ssize_t indexTwo ) + { + CCASSERT(indexOne >=0 && indexOne < count() && indexTwo >= 0 && indexTwo < count(), "Invalid indices"); +#if CC_USE_ARRAY_VECTOR + std::swap(data[indexOne], data[indexTwo]); +#else + std::swap(data->arr[indexOne], data->arr[indexTwo]); +#endif + } + + // Removing Objects + + /** Remove last object + * @js NA + */ + void removeLastObject(bool releaseObj = true); + /** Remove a certain object + * @js NA + */ + void removeObject(Ref* object, bool releaseObj = true); + /** Remove an element with a certain index + * @js NA + */ + void removeObjectAtIndex(ssize_t index, bool releaseObj = true); + /** Remove all elements + * @js NA + */ + void removeObjectsInArray(__Array* otherArray); + /** Remove all objects + * @js NA + */ + void removeAllObjects(); + /** Fast way to remove a certain object + * @js NA + */ + void fastRemoveObject(Ref* object); + /** Fast way to remove an element with a certain index + * @js NA + */ + void fastRemoveObjectAtIndex(ssize_t index); + + // Rearranging Content + + /** Swap two elements + * @js NA + */ + void exchangeObject(Ref* object1, Ref* object2); + /** Swap two elements with certain indexes + * @js NA + */ + void exchangeObjectAtIndex(ssize_t index1, ssize_t index2); + + /** Replace object at index with another object. + * @js NA + */ + void replaceObjectAtIndex(ssize_t index, Ref* object, bool releaseObject = true); + + /** Revers the array + * @js NA + */ + void reverseObjects(); + /* Shrinks the array so the memory footprint corresponds with the number of items + * @js NA + */ + void reduceMemoryFootprint(); + + /* override functions + * @js NA + */ + virtual void acceptVisitor(DataVisitor &visitor); + /** + * @js NA + * @lua NA + */ + virtual __Array* clone() const override; + + // ------------------------------------------ + // Iterators + // ------------------------------------------ +#if CC_USE_ARRAY_VECTOR + typedef std::vector>::iterator iterator; + typedef std::vector>::const_iterator const_iterator; + /** + * @js NA + * @lua NA + */ + iterator begin() { return data.begin(); } + /** + * @js NA + * @lua NA + */ + iterator end() { return data.end(); } + const_iterator cbegin() { return data.cbegin(); } + /** + * @js NA + * @lua NA + */ + const_iterator cend() { return data.cend(); } + + std::vector> data; + +#else + /** + * @js NA + * @lua NA + */ + Ref** begin() { return &data->arr[0]; } + /** + * @js NA + * @lua NA + */ + Ref** end() { return &data->arr[data->num]; } + + ccArray* data; + +#endif + +//protected: + /** + * @js NA + * @lua NA + */ + __Array(); +}; + +// end of data_structure group +/// @} + +NS_CC_END + +/// @endcond +#endif // __CCARRAY_H__ diff --git a/cocos/scripting/deprecated/CCBool.h b/cocos/scripting/deprecated/CCBool.h new file mode 100644 index 0000000000..9b48b79d8d --- /dev/null +++ b/cocos/scripting/deprecated/CCBool.h @@ -0,0 +1,75 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + 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 __CCBOOL_H__ +#define __CCBOOL_H__ +/// @cond DO_NOT_SHOW + +#include "base/CCRef.h" +#include "scripting/deprecated/CCDataVisitor.h" + +NS_CC_BEGIN + +/** + * @addtogroup data_structures + * @{ + */ + +class CC_DLL __Bool : public Ref, public Clonable +{ +public: + __Bool(bool v) + : _value(v) {} + bool getValue() const {return _value;} + + static __Bool* create(bool v) + { + __Bool* pRet = new (std::nothrow) __Bool(v); + if (pRet) + { + pRet->autorelease(); + } + return pRet; + } + + /* override functions */ + virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); } + + virtual __Bool* clone() const override + { + return __Bool::create(_value); + } +private: + bool _value; +}; + +// end of data_structure group +/// @} + +NS_CC_END + +/// @endcond +#endif /* __CCBOOL_H__ */ diff --git a/cocos/scripting/deprecated/CCDataVisitor.cpp b/cocos/scripting/deprecated/CCDataVisitor.cpp new file mode 100644 index 0000000000..dfd143a453 --- /dev/null +++ b/cocos/scripting/deprecated/CCDataVisitor.cpp @@ -0,0 +1,227 @@ +/**************************************************************************** + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "base/CCRef.h" +#include "scripting/deprecated/CCBool.h" +#include "scripting/deprecated/CCInteger.h" +#include "scripting/deprecated/CCFloat.h" +#include "scripting/deprecated/CCDouble.h" +#include "scripting/deprecated/CCString.h" +#include "scripting/deprecated/CCArray.h" +#include "scripting/deprecated/CCDictionary.h" +#include "scripting/deprecated/CCSet.h" + +NS_CC_BEGIN + +void DataVisitor::visit(const __Bool *value) +{ + visitObject(value); +} + +void DataVisitor::visit(const __Integer *value) +{ + visitObject(value); +} + +void DataVisitor::visit(const __Float *value) +{ + visitObject(value); +} + +void DataVisitor::visit(const __Double *value) +{ + visitObject(value); +} + +void DataVisitor::visit(const __String *value) +{ + visitObject(value); +} + +void DataVisitor::visit(const __Array *value) +{ + visitObject(value); +} + +void DataVisitor::visit(const __Dictionary *value) +{ + visitObject(value); +} + +void DataVisitor::visit(const __Set *value) +{ + visitObject(value); +} + +// PrettyPrinter +PrettyPrinter::PrettyPrinter(int indentLevel/* = 0 */) +{ + setIndentLevel(indentLevel); +} + +void PrettyPrinter::clear() +{ + _result.clear(); +} + +std::string PrettyPrinter::getResult() +{ + return _result; +} + +void PrettyPrinter::visitObject(const Ref *p) +{ + char buf[50] = {0}; + sprintf(buf, "%p", p); + _result += buf; +} + +void PrettyPrinter::visit(const __Bool * p) +{ + char buf[50] = {0}; + sprintf(buf, "%s", p->getValue() ? "true" : "false"); + _result += buf; +} + +void PrettyPrinter::visit(const __Integer *p) +{ + char buf[50] = {0}; + sprintf(buf, "%d", p->getValue()); + _result += buf; +} + +void PrettyPrinter::visit(const __Float *p) +{ + char buf[50] = {0}; + sprintf(buf, "%f", p->getValue()); + _result += buf; +} + +void PrettyPrinter::visit(const __Double *p) +{ + char buf[50] = {0}; + sprintf(buf, "%lf", p->getValue()); + _result += buf; +} + +void PrettyPrinter::visit(const __String *p) +{ + _result += p->getCString(); +} + +void PrettyPrinter::visit(const __Array *p) +{ + _result += "\n"; + _result += _indentStr; + _result += "\n"; + + setIndentLevel(_indentLevel+1); + Ref* obj; + int i = 0; + char buf[50] = {0}; + CCARRAY_FOREACH(p, obj) + { + if (i > 0) { + _result += "\n"; + } + sprintf(buf, "%s%02d: ", _indentStr.c_str(), i); + _result += buf; + PrettyPrinter v(_indentLevel); +//FIXME:james obj->acceptVisitor(v); + _result += v.getResult(); + i++; + } + setIndentLevel(_indentLevel-1); + + _result += "\n"; + _result += _indentStr; + _result += ""; +} + +void PrettyPrinter::visit(const __Dictionary *p) +{ + _result += "\n"; + _result += _indentStr; + _result += "\n"; + + setIndentLevel(_indentLevel+1); + DictElement* element; + bool bFirstElement = true; + char buf[1000] = {0}; + CCDICT_FOREACH(p, element) + { + if (!bFirstElement) { + _result += "\n"; + } + sprintf(buf, "%s%s: ", _indentStr.c_str(),element->getStrKey()); + _result += buf; + PrettyPrinter v(_indentLevel); +//FIXME:james element->getObject()->acceptVisitor(v); + _result += v.getResult(); + bFirstElement = false; + } + setIndentLevel(_indentLevel-1); + + _result += "\n"; + _result += _indentStr; + _result += ""; +} + +void PrettyPrinter::visit(const __Set *p) +{ + _result += "\n"; + _result += _indentStr; + _result += "\n"; + + setIndentLevel(_indentLevel+1); + + __Set* tmp = const_cast<__Set*>(p); + + for (int i = 0, tmp_size = tmp->count(); i < tmp_size; ++i) { + if (i > 0) { + _result += "\n"; + } + _result += _indentStr.c_str(); + PrettyPrinter v(_indentLevel); +//FIXME:james (*it)->acceptVisitor(v); + _result += v.getResult(); + } + setIndentLevel(_indentLevel-1); + + _result += "\n"; + _result += _indentStr; + _result += "\n"; +} + +void PrettyPrinter::setIndentLevel(int indentLevel) +{ + _indentLevel = indentLevel; + _indentStr.clear(); + for (int i = 0; i < _indentLevel; ++i) { + _indentStr += "\t"; + } +} + +NS_CC_END diff --git a/cocos/scripting/deprecated/CCDataVisitor.h b/cocos/scripting/deprecated/CCDataVisitor.h new file mode 100644 index 0000000000..b6ae49a716 --- /dev/null +++ b/cocos/scripting/deprecated/CCDataVisitor.h @@ -0,0 +1,113 @@ +/**************************************************************************** + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + 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 __CCDATAVISITOR_H__ +#define __CCDATAVISITOR_H__ +/// @cond DO_NOT_SHOW + +#include "platform/CCPlatformMacros.h" +#include + +NS_CC_BEGIN + +class Ref; +class __Bool; +class __Integer; +class __Float; +class __Double; +class __String; +class __Array; +class __Dictionary; +class __Set; + +/** + * Visitor that helps to perform action that depends on polymorphic object type + * + * Use cases: + * - data serialization, + * - pretty printing of Ref* + * - safe value reading from Array, __Dictionary, Set + * + * Usage: + * 1. subclass DataVisitor + * 2. overload visit() methods for object that you need to handle + * 3. handle other objects in visitObject() + * 4. pass your visitor to Object::acceptVisitor() + */ +class CC_DLL DataVisitor +{ +public: + /** + * @js NA + * @lua NA + */ + virtual ~DataVisitor() {} + + /** default method, called from non-overloaded methods and for unrecognized objects */ + virtual void visitObject(const Ref *p) = 0; + + virtual void visit(const __Bool *p); + virtual void visit(const __Integer *p); + virtual void visit(const __Float *p); + virtual void visit(const __Double *p); + virtual void visit(const __String *p); + virtual void visit(const __Array *p); + virtual void visit(const __Dictionary *p); + virtual void visit(const __Set *p); +}; + + +class CC_DLL PrettyPrinter : public DataVisitor +{ +public: + PrettyPrinter(int indentLevel = 0); + + virtual void clear(); + virtual std::string getResult(); + + virtual void visitObject(const Ref *p); + virtual void visit(const __Bool * p); + virtual void visit(const __Integer *p); + virtual void visit(const __Float *p); + virtual void visit(const __Double *p); + virtual void visit(const __String *p); + virtual void visit(const __Array *p); + virtual void visit(const __Dictionary *p); + virtual void visit(const __Set *p); +private: + void setIndentLevel(int indentLevel); + int _indentLevel; + std::string _indentStr; + std::string _result; +}; + +/** + * @endcond + */ + +NS_CC_END + +/// @endcond +#endif // __CCDATAVISITOR_H__ diff --git a/cocos/scripting/deprecated/CCDeprecated.cpp b/cocos/scripting/deprecated/CCDeprecated.cpp new file mode 100644 index 0000000000..56047efc4c --- /dev/null +++ b/cocos/scripting/deprecated/CCDeprecated.cpp @@ -0,0 +1,480 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + 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 "scripting/deprecated/CCDeprecated.h" + +#include "platform/CCPlatformMacros.h" +#include "math/Vec2.h" +#include "math/CCGeometry.h" +#include "base/ccTypes.h" +#include "base/CCDirector.h" + + +#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#elif _MSC_VER >= 1400 //vs 2005 or higher +#pragma warning (push) +#pragma warning (disable: 4996) +#endif + +NS_CC_BEGIN + +const Vec2 CCPointZero; + +/* The "zero" size -- equivalent to Size(0, 0). */ +const Size CCSizeZero = Size::ZERO; + +/* The "zero" rectangle -- equivalent to Rect(0, 0, 0, 0). */ +const Rect CCRectZero = Rect::ZERO; + + +const Color3B ccWHITE = Color3B::WHITE; +const Color3B ccYELLOW = Color3B::YELLOW; +const Color3B ccGREEN = Color3B::GREEN; +const Color3B ccBLUE = Color3B::BLUE; +const Color3B ccRED = Color3B::RED; +const Color3B ccMAGENTA = Color3B::MAGENTA; +const Color3B ccBLACK = Color3B::BLACK; +const Color3B ccORANGE = Color3B::ORANGE; +const Color3B ccGRAY = Color3B::GRAY; + +const BlendFunc kCCBlendFuncDisable = BlendFunc::DISABLE; + +MATRIX_STACK_TYPE currentActiveStackType = MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW; + +void CC_DLL kmGLFreeAll(void) +{ + Director::getInstance()->resetMatrixStack(); +} + +void CC_DLL kmGLPushMatrix(void) +{ + Director::getInstance()->pushMatrix(currentActiveStackType); +} + +void CC_DLL kmGLPopMatrix(void) +{ + Director::getInstance()->popMatrix(currentActiveStackType); +} + +void CC_DLL kmGLMatrixMode(unsigned int mode) +{ + if(KM_GL_MODELVIEW == mode) + currentActiveStackType = MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW; + else if(KM_GL_PROJECTION == mode) + currentActiveStackType = MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION; + else if(KM_GL_TEXTURE == mode) + currentActiveStackType = MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE; + else + { + CC_ASSERT(false); + } +} + +void CC_DLL kmGLLoadIdentity(void) +{ + Director::getInstance()->loadIdentityMatrix(currentActiveStackType); +} + +void CC_DLL kmGLLoadMatrix(const Mat4* pIn) +{ + Director::getInstance()->loadMatrix(currentActiveStackType, *pIn); +} + +void CC_DLL kmGLMultMatrix(const Mat4* pIn) +{ + Director::getInstance()->multiplyMatrix(currentActiveStackType, *pIn); +} + +void CC_DLL kmGLTranslatef(float x, float y, float z) +{ + Mat4 mat; + Mat4::createTranslation(Vec3(x, y, z), &mat); + Director::getInstance()->multiplyMatrix(currentActiveStackType, mat); +} + +void CC_DLL kmGLRotatef(float angle, float x, float y, float z) +{ + Mat4 mat; + Mat4::createRotation(Vec3(x, y, z), angle, &mat); + Director::getInstance()->multiplyMatrix(currentActiveStackType, mat); +} + +void CC_DLL kmGLScalef(float x, float y, float z) +{ + Mat4 mat; + Mat4::createScale(x, y, z, &mat); + Director::getInstance()->multiplyMatrix(currentActiveStackType, mat); +} + +void CC_DLL kmGLGetMatrix(unsigned int mode, Mat4* pOut) +{ + if(KM_GL_MODELVIEW == mode) + *pOut = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); + else if(KM_GL_PROJECTION == mode) + *pOut = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION); + else if(KM_GL_TEXTURE == mode) + *pOut = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_TEXTURE); + else + { + CC_ASSERT(false); + } +} + +Mat4* kmMat4Fill(Mat4* pOut, const float* pMat) +{ + pOut->set(pMat); + return pOut; +} + +Mat4* kmMat4Assign(Mat4* pOut, const Mat4* pIn) +{ + pOut->set(pIn->m); + return pOut; +} + +Mat4* kmMat4Identity(Mat4* pOut) +{ + *pOut = Mat4::IDENTITY; + return pOut; +} + +Mat4* kmMat4Inverse(Mat4* pOut, const Mat4* pM) +{ + *pOut = pM->getInversed(); + return pOut; +} + +Mat4* kmMat4Transpose(Mat4* pOut, const Mat4* pIn) +{ + *pOut = pIn->getTransposed(); + return pOut; +} + +Mat4* kmMat4Multiply(Mat4* pOut, const Mat4* pM1, const Mat4* pM2) +{ + *pOut = (*pM1) * (*pM2); + return pOut; +} + +Mat4* kmMat4Translation(Mat4* pOut, const float x, const float y, const float z) +{ + Mat4::createTranslation(x, y, z, pOut); + return pOut; +} + +Mat4* kmMat4RotationX(Mat4* pOut, const float radians) +{ + Mat4::createRotationX(radians, pOut); + return pOut; +} + +Mat4* kmMat4RotationY(Mat4* pOut, const float radians) +{ + Mat4::createRotationY(radians, pOut); + return pOut; +} + +Mat4* kmMat4RotationZ(Mat4* pOut, const float radians) +{ + Mat4::createRotationZ(radians, pOut); + return pOut; +} + +Mat4* kmMat4RotationAxisAngle(Mat4* pOut, const Vec3* axis, float radians) +{ + Mat4::createRotation(*axis, radians, pOut); + return pOut; +} + +Mat4* kmMat4Scaling(Mat4* pOut, const float x, const float y, const float z) +{ + Mat4::createScale(x, y, z, pOut); + return pOut; +} + +Mat4* kmMat4PerspectiveProjection(Mat4* pOut, float fovY, float aspect, float zNear, float zFar) +{ + Mat4::createPerspective(fovY, aspect, zNear, zFar, pOut); + return pOut; +} + +Mat4* kmMat4OrthographicProjection(Mat4* pOut, float left, float right, float bottom, float top, float nearVal, float farVal) +{ + Mat4::createOrthographicOffCenter(left, right, bottom, top, nearVal, farVal, pOut); + return pOut; +} + +Mat4* kmMat4LookAt(Mat4* pOut, const Vec3* pEye, const Vec3* pCenter, const Vec3* pUp) +{ + Mat4::createLookAt(*pEye, *pCenter, *pUp, pOut); + return pOut; +} + +Vec3* kmVec3Fill(Vec3* pOut, float x, float y, float z) +{ + pOut->x = x; + pOut->y = y; + pOut->z = z; + return pOut; +} + +float kmVec3Length(const Vec3* pIn) +{ + return pIn->length(); +} + +float kmVec3LengthSq(const Vec3* pIn) +{ + return pIn->lengthSquared(); +} + +CC_DLL Vec3* kmVec3Lerp(Vec3* pOut, const Vec3* pV1, const Vec3* pV2, float t) +{ + pOut->x = pV1->x + t * ( pV2->x - pV1->x ); + pOut->y = pV1->y + t * ( pV2->y - pV1->y ); + pOut->z = pV1->z + t * ( pV2->z - pV1->z ); + return pOut; +} + +Vec3* kmVec3Normalize(Vec3* pOut, const Vec3* pIn) +{ + *pOut = pIn->getNormalized(); + return pOut; +} + +Vec3* kmVec3Cross(Vec3* pOut, const Vec3* pV1, const Vec3* pV2) +{ + Vec3::cross(*pV1, *pV2, pOut); + return pOut; +} + +float kmVec3Dot(const Vec3* pV1, const Vec3* pV2) +{ + return Vec3::dot(*pV1, *pV2); +} + +Vec3* kmVec3Add(Vec3* pOut, const Vec3* pV1, const Vec3* pV2) +{ + Vec3::add(*pV1, *pV2, pOut); + return pOut; +} + +Vec3* kmVec3Subtract(Vec3* pOut, const Vec3* pV1, const Vec3* pV2) +{ + Vec3::subtract(*pV1, *pV2, pOut); + return pOut; +} + +Vec3* kmVec3Transform(Vec3* pOut, const Vec3* pV1, const Mat4* pM) +{ + pM->transformPoint(*pV1, pOut); + return pOut; +} + +Vec3* kmVec3TransformNormal(Vec3* pOut, const Vec3* pV, const Mat4* pM) +{ + pM->transformVector(*pV, pOut); + return pOut; +} + +Vec3* kmVec3TransformCoord(Vec3* pOut, const Vec3* pV, const Mat4* pM) +{ + Vec4 v(pV->x, pV->y, pV->z, 1); + pM->transformVector(&v); + v = v * (1/v.w); + pOut->set(v.x, v.y, v.z); + return pOut; +} + +Vec3* kmVec3Scale(Vec3* pOut, const Vec3* pIn, const float s) +{ + *pOut = *pIn * s; + return pOut; +} + +Vec3* kmVec3Assign(Vec3* pOut, const Vec3* pIn) +{ + *pOut = *pIn; + return pOut; +} + +Vec3* kmVec3Zero(Vec3* pOut) +{ + pOut->set(0, 0, 0); + return pOut; +} + +Vec2* kmVec2Fill(Vec2* pOut, float x, float y) +{ + pOut->set(x, y); + return pOut; +} + +float kmVec2Length(const Vec2* pIn) +{ + return pIn->length(); +} + +float kmVec2LengthSq(const Vec2* pIn) +{ + return pIn->lengthSquared(); +} + +Vec2* kmVec2Normalize(Vec2* pOut, const Vec2* pIn) +{ + *pOut = pIn->getNormalized(); + return pOut; +} + +Vec2* kmVec2Lerp(Vec2* pOut, const Vec2* pV1, const Vec2* pV2, float t) +{ + pOut->x = pV1->x + t * ( pV2->x - pV1->x ); + pOut->y = pV1->y + t * ( pV2->y - pV1->y ); + return pOut; +} + +Vec2* kmVec2Add(Vec2* pOut, const Vec2* pV1, const Vec2* pV2) +{ + Vec2::add(*pV1, *pV2, pOut); + return pOut; +} + +float kmVec2Dot(const Vec2* pV1, const Vec2* pV2) +{ + return Vec2::dot(*pV1, *pV2); +} + +Vec2* kmVec2Subtract(Vec2* pOut, const Vec2* pV1, const Vec2* pV2) +{ + Vec2::subtract(*pV1, *pV2, pOut); + return pOut; +} + +Vec2* kmVec2Scale(Vec2* pOut, const Vec2* pIn, const float s) +{ + *pOut = *pIn * s; + return pOut; +} + +Vec2* kmVec2Assign(Vec2* pOut, const Vec2* pIn) +{ + *pOut = *pIn; + return pOut; +} + +Vec4* kmVec4Fill(Vec4* pOut, float x, float y, float z, float w) +{ + pOut->set(x, y, z, w); + return pOut; +} + +Vec4* kmVec4Add(Vec4* pOut, const Vec4* pV1, const Vec4* pV2) +{ + Vec4::add(*pV1, *pV2, pOut); + return pOut; +} + +float kmVec4Dot(const Vec4* pV1, const Vec4* pV2) +{ + return Vec4::dot(*pV1, *pV2); +} + +float kmVec4Length(const Vec4* pIn) +{ + return pIn->length(); +} + +float kmVec4LengthSq(const Vec4* pIn) +{ + return pIn->lengthSquared(); +} + +Vec4* kmVec4Lerp(Vec4* pOut, const Vec4* pV1, const Vec4* pV2, float t) +{ + pOut->x = pV1->x + t * ( pV2->x - pV1->x ); + pOut->y = pV1->y + t * ( pV2->y - pV1->y ); + pOut->z = pV1->z + t * ( pV2->z - pV1->z ); + pOut->w = pV1->w + t * ( pV2->w - pV1->w ); + return pOut; +} + +Vec4* kmVec4Normalize(Vec4* pOut, const Vec4* pIn) +{ + *pOut = pIn->getNormalized(); + return pOut; +} + +Vec4* kmVec4Scale(Vec4* pOut, const Vec4* pIn, const float s) +{ + *pOut = *pIn * s; + return pOut; +} + +Vec4* kmVec4Subtract(Vec4* pOut, const Vec4* pV1, const Vec4* pV2) +{ + Vec4::subtract(*pV1, *pV2, pOut); + return pOut; +} + +Vec4* kmVec4Assign(Vec4* pOut, const Vec4* pIn) +{ + *pOut = *pIn; + return pOut; +} + +Vec4* kmVec4MultiplyMat4(Vec4* pOut, const Vec4* pV, const Mat4* pM) +{ + pM->transformVector(*pV, pOut); + return pOut; +} + +Vec4* kmVec4Transform(Vec4* pOut, const Vec4* pV, const Mat4* pM) +{ + pM->transformVector(*pV, pOut); + return pOut; +} + +const Vec3 KM_VEC3_NEG_Z(0, 0, -1); +const Vec3 KM_VEC3_POS_Z(0, 0, 1); +const Vec3 KM_VEC3_POS_Y(0, 1, 0); +const Vec3 KM_VEC3_NEG_Y(0, -1, 0); +const Vec3 KM_VEC3_NEG_X(-1, 0, 0); +const Vec3 KM_VEC3_POS_X(1, 0, 0); +const Vec3 KM_VEC3_ZERO(0, 0, 0); + +const Vec2 KM_VEC2_POS_Y(0, 1); +const Vec2 KM_VEC2_NEG_Y(0, -1); +const Vec2 KM_VEC2_NEG_X(-1, 0); +const Vec2 KM_VEC2_POS_X(1, 0); +const Vec2 KM_VEC2_ZERO(0, 0); + +NS_CC_END + +#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) +#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#elif _MSC_VER >= 1400 //vs 2005 or higher +#pragma warning (pop) +#endif diff --git a/cocos/scripting/deprecated/CCDeprecated.h b/cocos/scripting/deprecated/CCDeprecated.h new file mode 100644 index 0000000000..ae78f3c37c --- /dev/null +++ b/cocos/scripting/deprecated/CCDeprecated.h @@ -0,0 +1,1140 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + 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. + ****************************************************************************/ + +/// @cond DO_NOT_SHOW + +/** Add deprecated global functions and variables here + */ + +#ifndef __COCOS2D_CCDEPRECATED_H__ +#define __COCOS2D_CCDEPRECATED_H__ + +#include + +#include "2d/CCActionCamera.h" +#include "2d/CCActionCatmullRom.h" +#include "2d/CCActionEase.h" +#include "2d/CCActionGrid.h" +#include "2d/CCActionGrid3D.h" +#include "2d/CCActionInstant.h" +#include "2d/CCActionPageTurn3D.h" +#include "2d/CCActionProgressTimer.h" +#include "2d/CCActionTiledGrid.h" +#include "2d/CCActionTween.h" +#include "2d/CCAnimationCache.h" +#include "2d/CCAtlasNode.h" +#include "2d/CCClippingNode.h" +#include "2d/CCGrid.h" +#include "2d/CCLayer.h" +#include "2d/CCMenu.h" +#include "2d/CCMenuItem.h" +#include "2d/CCMotionStreak.h" +#include "2d/CCParallaxNode.h" +#include "2d/CCParticleBatchNode.h" +#include "2d/CCParticleExamples.h" +#include "2d/CCParticleSystemQuad.h" +#include "2d/CCProgressTimer.h" +#include "2d/CCSpriteFrameCache.h" +#include "2d/CCTMXLayer.h" +#include "2d/CCTMXObjectGroup.h" +#include "2d/CCTMXTiledMap.h" +#include "2d/CCTMXXMLParser.h" +#include "2d/CCTextFieldTTF.h" +#include "2d/CCTileMapAtlas.h" +#include "2d/CCTransition.h" +#include "2d/CCTransitionPageTurn.h" +#include "2d/CCTransitionProgress.h" +#include "base/CCConfiguration.h" +#include "scripting/deprecated/CCDataVisitor.h" +#include "base/CCEvent.h" +#include "base/CCIMEDelegate.h" +#include "base/CCScheduler.h" +#include "base/CCUserDefault.h" +#include "base/ccTypes.h" +#include "scripting/deprecated/CCArray.h" +#include "scripting/deprecated/CCBool.h" +#include "scripting/deprecated/CCDictionary.h" +#include "scripting/deprecated/CCDouble.h" +#include "scripting/deprecated/CCFloat.h" +#include "scripting/deprecated/CCInteger.h" +#include "scripting/deprecated/CCNotificationCenter.h" +#include "scripting/deprecated/CCSet.h" +#include "math/CCAffineTransform.h" +#include "math/CCGeometry.h" +#include "platform/CCApplication.h" +#include "platform/CCFileUtils.h" +#include "renderer/CCTextureAtlas.h" + +NS_CC_BEGIN + +/** + * @addtogroup data_structures + * @{ + */ + +/** Helper macro that creates a Vec2 + @return Vec2 + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE inline Vec2 ccp(float x, float y) +{ + return Vec2(x, y); +} + +/** Returns opposite of point. + @return Vec2 + @since v0.7.2 + @deprecated please use Vec2::-, for example: -v1 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpNeg(const Vec2& v) +{ + return -v; +} + +/** Calculates sum of two points. + @return Vec2 + @since v0.7.2 + @deprecated please use Vec2::+, for example: v1 + v2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpAdd(const Vec2& v1, const Vec2& v2) +{ + return v1 + v2; +} + +/** Calculates difference of two points. + @return Vec2 + @since v0.7.2 + @deprecated please use Vec2::-, for example: v1 - v2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpSub(const Vec2& v1, const Vec2& v2) +{ + return v1 - v2; +} + +/** Returns point multiplied by given factor. + @return Vec2 + @since v0.7.2 + @deprecated please use Vec2::*, for example: v1 * v2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpMult(const Vec2& v, const float s) +{ + return v * s; +} + +/** Calculates midpoint between two points. + @return Vec2 + @since v0.7.2 + @deprecated please use it like (v1 + v2) / 2.0f + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpMidpoint(const Vec2& v1, const Vec2& v2) +{ + return v1.getMidpoint(v2); +} + +/** Calculates dot product of two points. + @return float + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline float +ccpDot(const Vec2& v1, const Vec2& v2) +{ + return v1.dot(v2); +} + +/** Calculates cross product of two points. + @return float + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline float +ccpCross(const Vec2& v1, const Vec2& v2) +{ + return v1.cross(v2); +} + +/** Calculates perpendicular of v, rotated 90 degrees counter-clockwise -- cross(v, perp(v)) >= 0 + @return Vec2 + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpPerp(const Vec2& v) +{ + return v.getPerp(); +} + +/** Calculates perpendicular of v, rotated 90 degrees clockwise -- cross(v, rperp(v)) <= 0 + @return Vec2 + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpRPerp(const Vec2& v) +{ + return v.getRPerp(); +} + +/** Calculates the projection of v1 over v2. + @return Vec2 + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpProject(const Vec2& v1, const Vec2& v2) +{ + return v1.project(v2); +} + +/** Rotates two points. + @return Vec2 + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpRotate(const Vec2& v1, const Vec2& v2) +{ + return v1.rotate(v2); +} + +/** Unrotates two points. + @return Vec2 + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 +ccpUnrotate(const Vec2& v1, const Vec2& v2) +{ + return v1.unrotate(v2); +} + +/** Calculates the square length of a Vec2 (not calling sqrt() ) + @return float + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline float +ccpLengthSQ(const Vec2& v) +{ + return v.getLengthSq(); +} + + +/** Calculates the square distance between two points (not calling sqrt() ) + @return float + @since v1.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline float +ccpDistanceSQ(const Vec2 p1, const Vec2 p2) +{ + return (p1 - p2).getLengthSq(); +} + + +/** Calculates distance between point an origin + @return float + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline float ccpLength(const Vec2& v) +{ + return v.getLength(); +} + +/** Calculates the distance between two points + @return float + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline float ccpDistance(const Vec2& v1, const Vec2& v2) +{ + return v1.getDistance(v2); +} + +/** Returns point multiplied to a length of 1. + @return Vec2 + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpNormalize(const Vec2& v) +{ + return v.getNormalized(); +} + +/** Converts radians to a normalized vector. + @return Vec2 + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpForAngle(const float a) +{ + return Vec2::forAngle(a); +} + +/** Converts a vector to radians. + @return float + @since v0.7.2 + */ +CC_DEPRECATED_ATTRIBUTE static inline float ccpToAngle(const Vec2& v) +{ + return v.getAngle(); +} + + +/** Clamp a point between from and to. + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpClamp(const Vec2& p, const Vec2& from, const Vec2& to) +{ + return p.getClampPoint(from, to); +} + +/** Quickly convert Size to a Vec2 + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpFromSize(const Size& s) +{ + return Vec2(s); +} + +/** Run a math operation function on each point component + * absf, floorf, ceilf, roundf + * any function that has the signature: float func(float); + * For example: let's try to take the floor of x,y + * ccpCompOp(p,floorf); + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpCompOp(const Vec2& p, float (*opFunc)(float)) +{ + return p.compOp(opFunc); +} + +/** Linear Interpolation between two points a and b + @returns + alpha == 0 ? a + alpha == 1 ? b + otherwise a value between a..b + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpLerp(const Vec2& a, const Vec2& b, float alpha) +{ + return a.lerp(b, alpha); +} + + +/** @returns if points have fuzzy equality which means equal with some degree of variance. + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline bool ccpFuzzyEqual(const Vec2& a, const Vec2& b, float variance) +{ + return a.fuzzyEquals(b, variance); +} + + +/** Multiplies a and b components, a.x*b.x, a.y*b.y + @returns a component-wise multiplication + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpCompMult(const Vec2& a, const Vec2& b) +{ + return Vec2(a.x * b.x, a.y * b.y); +} + +/** @returns the signed angle in radians between two vector directions + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline float ccpAngleSigned(const Vec2& a, const Vec2& b) +{ + return a.getAngle(b); +} + +/** @returns the angle in radians between two vector directions + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline float ccpAngle(const Vec2& a, const Vec2& b) +{ + return a.getAngle(b); +} + +/** Rotates a point counter clockwise by the angle around a pivot + @param v is the point to rotate + @param pivot is the pivot, naturally + @param angle is the angle of rotation cw in radians + @returns the rotated point + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpRotateByAngle(const Vec2& v, const Vec2& pivot, float angle) +{ + return v.rotateByAngle(pivot, angle); +} + +/** A general line-line intersection test + @param p1 + is the startpoint for the first line P1 = (p1 - p2) + @param p2 + is the endpoint for the first line P1 = (p1 - p2) + @param p3 + is the startpoint for the second line P2 = (p3 - p4) + @param p4 + is the endpoint for the second line P2 = (p3 - p4) + @param s + is the range for a hitpoint in P1 (pa = p1 + s*(p2 - p1)) + @param t + is the range for a hitpoint in P3 (pa = p2 + t*(p4 - p3)) + @return bool + indicating successful intersection of a line + note that to truly test intersection for segments we have to make + sure that s & t lie within [0..1] and for rays, make sure s & t > 0 + the hit point is p3 + t * (p4 - p3); + the hit point also is p1 + s * (p2 - p1); + @since v0.99.1 + */ +CC_DEPRECATED_ATTRIBUTE static inline bool ccpLineIntersect(const Vec2& p1, const Vec2& p2, + const Vec2& p3, const Vec2& p4, + float *s, float *t) +{ + return Vec2::isLineIntersect(p1, p2, p3, p4, s, t); +} + +/* + ccpSegmentIntersect returns true if Segment A-B intersects with segment C-D + @since v1.0.0 + */ +CC_DEPRECATED_ATTRIBUTE static inline bool ccpSegmentIntersect(const Vec2& A, const Vec2& B, const Vec2& C, const Vec2& D) +{ + return Vec2::isSegmentIntersect(A, B, C, D); +} + +/* + ccpIntersectPoint returns the intersection point of line A-B, C-D + @since v1.0.0 + */ +CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpIntersectPoint(const Vec2& A, const Vec2& B, const Vec2& C, const Vec2& D) +{ + return Vec2::getIntersectPoint(A, B, C, D); +} + +CC_DEPRECATED_ATTRIBUTE inline Vec2 CCPointMake(float x, float y) +{ + return Vec2(x, y); +} + +CC_DEPRECATED_ATTRIBUTE inline Size CCSizeMake(float width, float height) +{ + return Size(width, height); +} + +CC_DEPRECATED_ATTRIBUTE inline Rect CCRectMake(float x, float y, float width, float height) +{ + return Rect(x, y, width, height); +} + + +CC_DEPRECATED_ATTRIBUTE extern const Vec2 CCPointZero; + +/* The "zero" size -- equivalent to Size(0, 0). */ +CC_DEPRECATED_ATTRIBUTE extern const Size CCSizeZero; + +/* The "zero" rectangle -- equivalent to Rect(0, 0, 0, 0). */ +CC_DEPRECATED_ATTRIBUTE extern const Rect CCRectZero; + + +CC_DEPRECATED_ATTRIBUTE extern const Color3B ccWHITE; +CC_DEPRECATED_ATTRIBUTE extern const Color3B ccYELLOW; +CC_DEPRECATED_ATTRIBUTE extern const Color3B ccGREEN; +CC_DEPRECATED_ATTRIBUTE extern const Color3B ccBLUE; +CC_DEPRECATED_ATTRIBUTE extern const Color3B ccRED; +CC_DEPRECATED_ATTRIBUTE extern const Color3B ccMAGENTA; +CC_DEPRECATED_ATTRIBUTE extern const Color3B ccBLACK; +CC_DEPRECATED_ATTRIBUTE extern const Color3B ccORANGE; +CC_DEPRECATED_ATTRIBUTE extern const Color3B ccGRAY; + +CC_DEPRECATED_ATTRIBUTE extern const BlendFunc kCCBlendFuncDisable; + +CC_DEPRECATED_ATTRIBUTE static inline Color3B ccc3(GLubyte r, GLubyte g, GLubyte b) +{ + return Color3B(r, g, b); +} + +CC_DEPRECATED_ATTRIBUTE static inline bool ccc3BEqual(const Color3B &col1, const Color3B &col2) +{ + return col1.r == col2.r && col1.g == col2.g && col1.b == col2.b; +} + +CC_DEPRECATED_ATTRIBUTE static inline Color4B +ccc4(const GLubyte r, const GLubyte g, const GLubyte b, const GLubyte o) +{ + return Color4B(r, g, b, o); +} + +CC_DEPRECATED_ATTRIBUTE static inline Color4F ccc4FFromccc3B(Color3B c) +{ + return Color4F(c.r/255.f, c.g/255.f, c.b/255.f, 1.f); +} + +CC_DEPRECATED_ATTRIBUTE static inline Color4F +ccc4f(const GLfloat r, const GLfloat g, const GLfloat b, const GLfloat a) +{ + return Color4F(r, g, b, a); +} + +CC_DEPRECATED_ATTRIBUTE static inline Color4F ccc4FFromccc4B(Color4B c) +{ + return Color4F(c.r/255.f, c.g/255.f, c.b/255.f, c.a/255.f); +} + +CC_DEPRECATED_ATTRIBUTE static inline Color4B ccc4BFromccc4F(Color4F c) +{ + return Color4B((GLubyte)(c.r*255), (GLubyte)(c.g*255), (GLubyte)(c.b*255), (GLubyte)(c.a*255)); +} + +CC_DEPRECATED_ATTRIBUTE static inline bool ccc4FEqual(Color4F a, Color4F b) +{ + return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a; +} + +CC_DEPRECATED_ATTRIBUTE static inline Vec2 vertex2(const float x, const float y) +{ + Vec2 c(x, y); + return c; +} + +CC_DEPRECATED_ATTRIBUTE static inline Vec3 vertex3(const float x, const float y, const float z) +{ + Vec3 c(x, y, z); + return c; +} + +CC_DEPRECATED_ATTRIBUTE static inline Tex2F tex2(const float u, const float v) +{ + Tex2F t(u , v); + return t; +} + +CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformMake(float a, float b, float c, float d, float tx, float ty) +{ + return AffineTransformMake(a, b, c, d, tx, ty); +} + +CC_DEPRECATED_ATTRIBUTE static inline Vec2 CCPointApplyAffineTransform(const Vec2& point, const AffineTransform& t) +{ + return PointApplyAffineTransform(point, t); +} + +CC_DEPRECATED_ATTRIBUTE static inline Size CCSizeApplyAffineTransform(const Size& size, const AffineTransform& t) +{ + return SizeApplyAffineTransform(size, t); +} + +CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformMakeIdentity() +{ + return AffineTransformMakeIdentity(); +} + +CC_DEPRECATED_ATTRIBUTE static inline Rect CCRectApplyAffineTransform(const Rect& rect, const AffineTransform& anAffineTransform) +{ + return RectApplyAffineTransform(rect, anAffineTransform); +} + +CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformTranslate(const AffineTransform& t, float tx, float ty) +{ + return AffineTransformTranslate(t, tx, ty); +} + +CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformRotate(const AffineTransform& aTransform, float anAngle) +{ + return AffineTransformRotate(aTransform, anAngle); +} + +CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformScale(const AffineTransform& t, float sx, float sy) +{ + return AffineTransformScale(t, sx, sy); +} + +CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformConcat(const AffineTransform& t1, const AffineTransform& t2) +{ + return AffineTransformConcat(t1, t2); +} + +CC_DEPRECATED_ATTRIBUTE static inline bool CCAffineTransformEqualToTransform(const AffineTransform& t1, const AffineTransform& t2) +{ + return AffineTransformEqualToTransform(t1, t2); +} + +CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformInvert(const AffineTransform& t) +{ + return AffineTransformInvert(t); +} + +CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformIdentity() +{ + return AffineTransformMakeIdentity(); +} + +// CC prefix compatibility +CC_DEPRECATED_ATTRIBUTE typedef Ref CCObject; +CC_DEPRECATED_ATTRIBUTE typedef Ref Object; +CC_DEPRECATED_ATTRIBUTE typedef Event CCEvent; +CC_DEPRECATED_ATTRIBUTE typedef DataVisitor CCDataVisitor; +CC_DEPRECATED_ATTRIBUTE typedef PrettyPrinter CCPrettyPrinter; +CC_DEPRECATED_ATTRIBUTE typedef Acceleration CCAcceleration; +CC_DEPRECATED_ATTRIBUTE typedef TextureAtlas CCTextureAtlas; +CC_DEPRECATED_ATTRIBUTE typedef Configuration CCConfiguration; +CC_DEPRECATED_ATTRIBUTE typedef PointArray CCPointArray; +CC_DEPRECATED_ATTRIBUTE typedef RemoveSelf CCRemoveSelf; +CC_DEPRECATED_ATTRIBUTE typedef IMEDelegate CCIMEDelegate; +CC_DEPRECATED_ATTRIBUTE typedef IMEKeyboardNotificationInfo CCIMEKeyboardNotificationInfo; +CC_DEPRECATED_ATTRIBUTE typedef TextFieldDelegate CCTextFieldDelegate; +CC_DEPRECATED_ATTRIBUTE typedef TextFieldTTF CCTextFieldTTF; +CC_DEPRECATED_ATTRIBUTE typedef __NotificationCenter CCNotificationCenter; +CC_DEPRECATED_ATTRIBUTE typedef __NotificationCenter NotificationCenter; +//CC_DEPRECATED_ATTRIBUTE typedef TargetedTouchDelegate CCTargetedTouchDelegate; +//CC_DEPRECATED_ATTRIBUTE typedef StandardTouchDelegate CCStandardTouchDelegate; +//CC_DEPRECATED_ATTRIBUTE typedef TouchDelegate CCTouchDelegate; +CC_DEPRECATED_ATTRIBUTE typedef Image CCImage; +CC_DEPRECATED_ATTRIBUTE typedef UserDefault CCUserDefault; + +CC_DEPRECATED_ATTRIBUTE typedef Action CCAction; +CC_DEPRECATED_ATTRIBUTE typedef FiniteTimeAction CCFiniteTimeAction; +CC_DEPRECATED_ATTRIBUTE typedef Speed CCSpeed; +CC_DEPRECATED_ATTRIBUTE typedef Follow CCFollow; +CC_DEPRECATED_ATTRIBUTE typedef GLProgram CCGLProgram; +CC_DEPRECATED_ATTRIBUTE typedef Touch CCTouch; +CC_DEPRECATED_ATTRIBUTE typedef Texture2D CCTexture2D; +CC_DEPRECATED_ATTRIBUTE typedef Node CCNode; +CC_DEPRECATED_ATTRIBUTE typedef Node CCNodeRGBA; +CC_DEPRECATED_ATTRIBUTE typedef Node CCRGBAProtocol; +CC_DEPRECATED_ATTRIBUTE typedef SpriteFrame CCSpriteFrame; +CC_DEPRECATED_ATTRIBUTE typedef AnimationFrame CCAnimationFrame; +CC_DEPRECATED_ATTRIBUTE typedef Animation CCAnimation; +CC_DEPRECATED_ATTRIBUTE typedef ActionInterval CCActionInterval; +CC_DEPRECATED_ATTRIBUTE typedef Sequence CCSequence; +CC_DEPRECATED_ATTRIBUTE typedef Repeat CCRepeat; +CC_DEPRECATED_ATTRIBUTE typedef RepeatForever CCRepeatForever; +CC_DEPRECATED_ATTRIBUTE typedef Spawn CCSpawn; +CC_DEPRECATED_ATTRIBUTE typedef RotateTo CCRotateTo; +CC_DEPRECATED_ATTRIBUTE typedef RotateBy CCRotateBy; +CC_DEPRECATED_ATTRIBUTE typedef MoveBy CCMoveBy; +CC_DEPRECATED_ATTRIBUTE typedef MoveTo CCMoveTo; +CC_DEPRECATED_ATTRIBUTE typedef SkewTo CCSkewTo; +CC_DEPRECATED_ATTRIBUTE typedef SkewBy CCSkewBy; +CC_DEPRECATED_ATTRIBUTE typedef JumpBy CCJumpBy; +CC_DEPRECATED_ATTRIBUTE typedef JumpTo CCJumpTo; +CC_DEPRECATED_ATTRIBUTE typedef BezierBy CCBezierBy; +CC_DEPRECATED_ATTRIBUTE typedef BezierTo CCBezierTo; +CC_DEPRECATED_ATTRIBUTE typedef ScaleTo CCScaleTo; +CC_DEPRECATED_ATTRIBUTE typedef ScaleBy CCScaleBy; +CC_DEPRECATED_ATTRIBUTE typedef Blink CCBlink; +CC_DEPRECATED_ATTRIBUTE typedef FadeIn CCFadeIn; +CC_DEPRECATED_ATTRIBUTE typedef FadeOut CCFadeOut; +CC_DEPRECATED_ATTRIBUTE typedef FadeTo CCFadeTo; +CC_DEPRECATED_ATTRIBUTE typedef TintTo CCTintTo; +CC_DEPRECATED_ATTRIBUTE typedef TintBy CCTintBy; +CC_DEPRECATED_ATTRIBUTE typedef DelayTime CCDelayTime; +CC_DEPRECATED_ATTRIBUTE typedef Animate CCAnimate; +CC_DEPRECATED_ATTRIBUTE typedef TargetedAction CCTargetedAction; +CC_DEPRECATED_ATTRIBUTE typedef ActionCamera CCActionCamera; +CC_DEPRECATED_ATTRIBUTE typedef OrbitCamera CCOrbitCamera; +CC_DEPRECATED_ATTRIBUTE typedef ActionManager CCActionManager; +CC_DEPRECATED_ATTRIBUTE typedef ActionEase CCActionEase; +CC_DEPRECATED_ATTRIBUTE typedef EaseRateAction CCEaseRateAction; +CC_DEPRECATED_ATTRIBUTE typedef EaseIn CCEaseIn; +CC_DEPRECATED_ATTRIBUTE typedef EaseOut CCEaseOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseInOut CCEaseInOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseExponentialIn CCEaseExponentialIn; +CC_DEPRECATED_ATTRIBUTE typedef EaseExponentialOut CCEaseExponentialOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseExponentialInOut CCEaseExponentialInOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseSineIn CCEaseSineIn; +CC_DEPRECATED_ATTRIBUTE typedef EaseSineOut CCEaseSineOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseSineInOut CCEaseSineInOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseElastic CCEaseElastic; +CC_DEPRECATED_ATTRIBUTE typedef EaseElasticIn CCEaseElasticIn; +CC_DEPRECATED_ATTRIBUTE typedef EaseElasticOut CCEaseElasticOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseElasticInOut CCEaseElasticInOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseBounce CCEaseBounce; +CC_DEPRECATED_ATTRIBUTE typedef EaseBounceIn CCEaseBounceIn; +CC_DEPRECATED_ATTRIBUTE typedef EaseBounceOut CCEaseBounceOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseBounceInOut CCEaseBounceInOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseBackIn CCEaseBackIn; +CC_DEPRECATED_ATTRIBUTE typedef EaseBackOut CCEaseBackOut; +CC_DEPRECATED_ATTRIBUTE typedef EaseBackInOut CCEaseBackInOut; +CC_DEPRECATED_ATTRIBUTE typedef ActionInstant CCActionInstant; +CC_DEPRECATED_ATTRIBUTE typedef Show CCShow; +CC_DEPRECATED_ATTRIBUTE typedef Hide CCHide; +CC_DEPRECATED_ATTRIBUTE typedef ToggleVisibility CCToggleVisibility; +CC_DEPRECATED_ATTRIBUTE typedef FlipX CCFlipX; +CC_DEPRECATED_ATTRIBUTE typedef FlipY CCFlipY; +CC_DEPRECATED_ATTRIBUTE typedef Place CCPlace; +CC_DEPRECATED_ATTRIBUTE typedef CallFunc CCCallFunc; +CC_DEPRECATED_ATTRIBUTE typedef CallFuncN CCCallFuncN; +CC_DEPRECATED_ATTRIBUTE typedef GridAction CCGridAction; +CC_DEPRECATED_ATTRIBUTE typedef Grid3DAction CCGrid3DAction; +CC_DEPRECATED_ATTRIBUTE typedef TiledGrid3DAction CCTiledGrid3DAction; +CC_DEPRECATED_ATTRIBUTE typedef StopGrid CCStopGrid; +CC_DEPRECATED_ATTRIBUTE typedef ReuseGrid CCReuseGrid; +CC_DEPRECATED_ATTRIBUTE typedef Waves3D CCWaves3D; +CC_DEPRECATED_ATTRIBUTE typedef FlipX3D CCFlipX3D; +CC_DEPRECATED_ATTRIBUTE typedef FlipY3D CCFlipY3D; +CC_DEPRECATED_ATTRIBUTE typedef Lens3D CCLens3D; +CC_DEPRECATED_ATTRIBUTE typedef Ripple3D CCRipple3D; +CC_DEPRECATED_ATTRIBUTE typedef Shaky3D CCShaky3D; +CC_DEPRECATED_ATTRIBUTE typedef Liquid CCLiquid; +CC_DEPRECATED_ATTRIBUTE typedef Waves CCWaves; +CC_DEPRECATED_ATTRIBUTE typedef Twirl CCTwirl; +CC_DEPRECATED_ATTRIBUTE typedef PageTurn3D CCPageTurn3D; +CC_DEPRECATED_ATTRIBUTE typedef ProgressTo CCProgressTo; +CC_DEPRECATED_ATTRIBUTE typedef ProgressFromTo CCProgressFromTo; +CC_DEPRECATED_ATTRIBUTE typedef ShakyTiles3D CCShakyTiles3D; +CC_DEPRECATED_ATTRIBUTE typedef ShatteredTiles3D CCShatteredTiles3D; +CC_DEPRECATED_ATTRIBUTE typedef ShuffleTiles CCShuffleTiles; +CC_DEPRECATED_ATTRIBUTE typedef FadeOutTRTiles CCFadeOutTRTiles; +CC_DEPRECATED_ATTRIBUTE typedef FadeOutBLTiles CCFadeOutBLTiles; +CC_DEPRECATED_ATTRIBUTE typedef FadeOutUpTiles CCFadeOutUpTiles; +CC_DEPRECATED_ATTRIBUTE typedef FadeOutDownTiles CCFadeOutDownTiles; +CC_DEPRECATED_ATTRIBUTE typedef TurnOffTiles CCTurnOffTiles; +CC_DEPRECATED_ATTRIBUTE typedef WavesTiles3D CCWavesTiles3D; +CC_DEPRECATED_ATTRIBUTE typedef JumpTiles3D CCJumpTiles3D; +CC_DEPRECATED_ATTRIBUTE typedef SplitRows CCSplitRows; +CC_DEPRECATED_ATTRIBUTE typedef SplitCols CCSplitCols; +CC_DEPRECATED_ATTRIBUTE typedef ActionTween CCActionTween; +CC_DEPRECATED_ATTRIBUTE typedef CardinalSplineTo CCCardinalSplineTo; +CC_DEPRECATED_ATTRIBUTE typedef CardinalSplineBy CCCardinalSplineBy; +CC_DEPRECATED_ATTRIBUTE typedef CatmullRomTo CCCatmullRomTo; +CC_DEPRECATED_ATTRIBUTE typedef CatmullRomBy CCCatmullRomBy; +CC_DEPRECATED_ATTRIBUTE typedef AtlasNode CCAtlasNode; +CC_DEPRECATED_ATTRIBUTE typedef TextureProtocol CCTextureProtocol; +CC_DEPRECATED_ATTRIBUTE typedef BlendProtocol CCBlendProtocol; +CC_DEPRECATED_ATTRIBUTE typedef DrawNode CCDrawNode; +CC_DEPRECATED_ATTRIBUTE typedef Camera CCCamera; +CC_DEPRECATED_ATTRIBUTE typedef LabelAtlas CCLabelAtlas; +CC_DEPRECATED_ATTRIBUTE typedef LabelProtocol CCLabelProtocol; +CC_DEPRECATED_ATTRIBUTE typedef Director CCDirector; +CC_DEPRECATED_ATTRIBUTE typedef GridBase CCGridBase; +CC_DEPRECATED_ATTRIBUTE typedef Grid3D CCGrid3D; +CC_DEPRECATED_ATTRIBUTE typedef TiledGrid3D CCTiledGrid3D; +CC_DEPRECATED_ATTRIBUTE typedef Sprite CCSprite; +#define CCLabelTTF LabelTTF +CC_DEPRECATED_ATTRIBUTE typedef SpriteBatchNode CCSpriteBatchNode; +#define CCLabelBMFont LabelBMFont +CC_DEPRECATED_ATTRIBUTE typedef Layer CCLayer; +//CC_DEPRECATED_ATTRIBUTE typedef KeypadDelegate CCKeypadDelegate; +CC_DEPRECATED_ATTRIBUTE typedef Layer CCLayerRGBA; +CC_DEPRECATED_ATTRIBUTE typedef LayerColor CCLayerColor; +CC_DEPRECATED_ATTRIBUTE typedef LayerGradient CCLayerGradient; +CC_DEPRECATED_ATTRIBUTE typedef LayerMultiplex CCLayerMultiplex; +CC_DEPRECATED_ATTRIBUTE typedef Scene CCScene; +CC_DEPRECATED_ATTRIBUTE typedef TransitionEaseScene CCTransitionEaseScene; +CC_DEPRECATED_ATTRIBUTE typedef TransitionScene CCTransitionScene; +CC_DEPRECATED_ATTRIBUTE typedef TransitionSceneOriented CCTransitionSceneOriented; +CC_DEPRECATED_ATTRIBUTE typedef TransitionRotoZoom CCTransitionRotoZoom; +CC_DEPRECATED_ATTRIBUTE typedef TransitionJumpZoom CCTransitionJumpZoom; +CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInL CCTransitionMoveInL; +CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInR CCTransitionMoveInR; +CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInT CCTransitionMoveInT; +CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInB CCTransitionMoveInB; +CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInL CCTransitionSlideInL; +CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInR CCTransitionSlideInR; +CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInB CCTransitionSlideInB; +CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInT CCTransitionSlideInT; +CC_DEPRECATED_ATTRIBUTE typedef TransitionShrinkGrow CCTransitionShrinkGrow; +CC_DEPRECATED_ATTRIBUTE typedef TransitionFlipX CCTransitionFlipX; +CC_DEPRECATED_ATTRIBUTE typedef TransitionFlipY CCTransitionFlipY; +CC_DEPRECATED_ATTRIBUTE typedef TransitionFlipAngular CCTransitionFlipAngular; +CC_DEPRECATED_ATTRIBUTE typedef TransitionZoomFlipX CCTransitionZoomFlipX; +CC_DEPRECATED_ATTRIBUTE typedef TransitionZoomFlipY CCTransitionZoomFlipY; +CC_DEPRECATED_ATTRIBUTE typedef TransitionZoomFlipAngular CCTransitionZoomFlipAngular; +CC_DEPRECATED_ATTRIBUTE typedef TransitionFade CCTransitionFade; +CC_DEPRECATED_ATTRIBUTE typedef TransitionCrossFade CCTransitionCrossFade; +CC_DEPRECATED_ATTRIBUTE typedef TransitionTurnOffTiles CCTransitionTurnOffTiles; +CC_DEPRECATED_ATTRIBUTE typedef TransitionSplitCols CCTransitionSplitCols; +CC_DEPRECATED_ATTRIBUTE typedef TransitionSplitRows CCTransitionSplitRows; +CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeTR CCTransitionFadeTR; +CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeBL CCTransitionFadeBL; +CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeUp CCTransitionFadeUp; +CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeDown CCTransitionFadeDown; +CC_DEPRECATED_ATTRIBUTE typedef TransitionPageTurn CCTransitionPageTurn; +CC_DEPRECATED_ATTRIBUTE typedef TransitionProgress CCTransitionProgress; +CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressRadialCCW CCTransitionProgressRadialCCW; +CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressRadialCW CCTransitionProgressRadialCW; +CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressHorizontal CCTransitionProgressHorizontal; +CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressVertical CCTransitionProgressVertical; +CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressInOut CCTransitionProgressInOut; +CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressOutIn CCTransitionProgressOutIn; +CC_DEPRECATED_ATTRIBUTE typedef MenuItem CCMenuItem; +CC_DEPRECATED_ATTRIBUTE typedef MenuItemLabel CCMenuItemLabel; +CC_DEPRECATED_ATTRIBUTE typedef MenuItemAtlasFont CCMenuItemAtlasFont; +CC_DEPRECATED_ATTRIBUTE typedef MenuItemFont CCMenuItemFont; +CC_DEPRECATED_ATTRIBUTE typedef MenuItemSprite CCMenuItemSprite; +CC_DEPRECATED_ATTRIBUTE typedef MenuItemImage CCMenuItemImage; +CC_DEPRECATED_ATTRIBUTE typedef MenuItemToggle CCMenuItemToggle; +CC_DEPRECATED_ATTRIBUTE typedef Menu CCMenu; +CC_DEPRECATED_ATTRIBUTE typedef ClippingNode CCClippingNode; +CC_DEPRECATED_ATTRIBUTE typedef MotionStreak CCMotionStreak; +CC_DEPRECATED_ATTRIBUTE typedef ProgressTimer CCProgressTimer; +CC_DEPRECATED_ATTRIBUTE typedef RenderTexture CCRenderTexture; +CC_DEPRECATED_ATTRIBUTE typedef ParticleBatchNode CCParticleBatchNode; +CC_DEPRECATED_ATTRIBUTE typedef ParticleSystem CCParticleSystem; +CC_DEPRECATED_ATTRIBUTE typedef ParticleSystemQuad CCParticleSystemQuad; +CC_DEPRECATED_ATTRIBUTE typedef ParticleFire CCParticleFire; +CC_DEPRECATED_ATTRIBUTE typedef ParticleFireworks CCParticleFireworks; +CC_DEPRECATED_ATTRIBUTE typedef ParticleSun CCParticleSun; +CC_DEPRECATED_ATTRIBUTE typedef ParticleGalaxy CCParticleGalaxy; +CC_DEPRECATED_ATTRIBUTE typedef ParticleFlower CCParticleFlower; +CC_DEPRECATED_ATTRIBUTE typedef ParticleMeteor CCParticleMeteor; +CC_DEPRECATED_ATTRIBUTE typedef ParticleSpiral CCParticleSpiral; +CC_DEPRECATED_ATTRIBUTE typedef ParticleExplosion CCParticleExplosion; +CC_DEPRECATED_ATTRIBUTE typedef ParticleSmoke CCParticleSmoke; +CC_DEPRECATED_ATTRIBUTE typedef ParticleSnow CCParticleSnow; +CC_DEPRECATED_ATTRIBUTE typedef ParticleRain CCParticleRain; +CC_DEPRECATED_ATTRIBUTE typedef FileUtils CCFileUtils; +CC_DEPRECATED_ATTRIBUTE typedef Application CCApplication; +CC_DEPRECATED_ATTRIBUTE typedef AnimationCache CCAnimationCache; +CC_DEPRECATED_ATTRIBUTE typedef SpriteFrameCache CCSpriteFrameCache; +CC_DEPRECATED_ATTRIBUTE typedef TextureCache CCTextureCache; +CC_DEPRECATED_ATTRIBUTE typedef ParallaxNode CCParallaxNode; +CC_DEPRECATED_ATTRIBUTE typedef TMXObjectGroup CCTMXObjectGroup; +CC_DEPRECATED_ATTRIBUTE typedef TMXLayerInfo CCTMXLayerInfo; +CC_DEPRECATED_ATTRIBUTE typedef TMXTilesetInfo CCTMXTilesetInfo; +CC_DEPRECATED_ATTRIBUTE typedef TMXMapInfo CCTMXMapInfo; +CC_DEPRECATED_ATTRIBUTE typedef TMXLayer CCTMXLayer; +CC_DEPRECATED_ATTRIBUTE typedef TMXTiledMap CCTMXTiledMap; +CC_DEPRECATED_ATTRIBUTE typedef TileMapAtlas CCTileMapAtlas; +CC_DEPRECATED_ATTRIBUTE typedef Timer CCTimer; +CC_DEPRECATED_ATTRIBUTE typedef Scheduler CCScheduler; +CC_DEPRECATED_ATTRIBUTE typedef GLView CCEGLView; + +CC_DEPRECATED_ATTRIBUTE typedef Component CCComponent; +CC_DEPRECATED_ATTRIBUTE typedef AffineTransform CCAffineTransform; +CC_DEPRECATED_ATTRIBUTE typedef Vec2 CCPoint; +CC_DEPRECATED_ATTRIBUTE typedef Size CCSize; +CC_DEPRECATED_ATTRIBUTE typedef Rect CCRect; +CC_DEPRECATED_ATTRIBUTE typedef Color3B ccColor3B; +CC_DEPRECATED_ATTRIBUTE typedef Color4F ccColor4F; +CC_DEPRECATED_ATTRIBUTE typedef Color4B ccColor4B; +CC_DEPRECATED_ATTRIBUTE typedef Vec2 ccVertex2F; +CC_DEPRECATED_ATTRIBUTE typedef Vec2 Vertex2F; +CC_DEPRECATED_ATTRIBUTE typedef Vec3 ccVertex3F; +CC_DEPRECATED_ATTRIBUTE typedef Vec3 Vertex3F; +CC_DEPRECATED_ATTRIBUTE typedef Tex2F ccTex2F; +CC_DEPRECATED_ATTRIBUTE typedef PointSprite ccPointSprite; +CC_DEPRECATED_ATTRIBUTE typedef Quad2 ccQuad2; +CC_DEPRECATED_ATTRIBUTE typedef Quad3 ccQuad3; +CC_DEPRECATED_ATTRIBUTE typedef V2F_C4B_T2F ccV2F_C4B_T2F; +CC_DEPRECATED_ATTRIBUTE typedef V2F_C4F_T2F ccV2F_C4F_T2F; +CC_DEPRECATED_ATTRIBUTE typedef V3F_C4B_T2F ccV3F_C4B_T2F; +CC_DEPRECATED_ATTRIBUTE typedef V2F_C4B_T2F_Triangle ccV2F_C4B_T2F_Triangle; +CC_DEPRECATED_ATTRIBUTE typedef V2F_C4B_T2F_Quad ccV2F_C4B_T2F_Quad; +CC_DEPRECATED_ATTRIBUTE typedef V3F_C4B_T2F_Quad ccV3F_C4B_T2F_Quad; +CC_DEPRECATED_ATTRIBUTE typedef V2F_C4F_T2F_Quad ccV2F_C4F_T2F_Quad; +CC_DEPRECATED_ATTRIBUTE typedef BlendFunc ccBlendFunc; +CC_DEPRECATED_ATTRIBUTE typedef T2F_Quad ccT2F_Quad; +CC_DEPRECATED_ATTRIBUTE typedef AnimationFrameData ccAnimationFrameData; +CC_DEPRECATED_ATTRIBUTE typedef FontShadow ccFontShadow; +CC_DEPRECATED_ATTRIBUTE typedef FontStroke ccFontStroke; +CC_DEPRECATED_ATTRIBUTE typedef FontDefinition ccFontDefinition; + +CC_DEPRECATED_ATTRIBUTE typedef TextVAlignment CCVerticalTextAlignment; +CC_DEPRECATED_ATTRIBUTE typedef TextHAlignment CCTextAlignment; +CC_DEPRECATED_ATTRIBUTE typedef ProgressTimer::Type CCProgressTimerType; + +CC_DEPRECATED_ATTRIBUTE typedef void* CCZone; + +CC_DEPRECATED_ATTRIBUTE const ProgressTimer::Type kCCProgressTimerTypeRadial = ProgressTimer::Type::RADIAL; +CC_DEPRECATED_ATTRIBUTE const ProgressTimer::Type kCCProgressTimerTypeBar = ProgressTimer::Type::BAR; +CC_DEPRECATED_ATTRIBUTE typedef ProgressTimer::Type ProgressTimerType; + +CC_DEPRECATED_ATTRIBUTE const Director::Projection kCCDirectorProjection2D = Director::Projection::_2D; +CC_DEPRECATED_ATTRIBUTE const Director::Projection kCCDirectorProjection3D = Director::Projection::_3D; +CC_DEPRECATED_ATTRIBUTE const Director::Projection kCCDirectorProjectionCustom = Director::Projection::CUSTOM; +CC_DEPRECATED_ATTRIBUTE const Director::Projection kCCDirectorProjectionDefault = Director::Projection::DEFAULT; +CC_DEPRECATED_ATTRIBUTE typedef Director::Projection ccDirectorProjection; + +CC_DEPRECATED_ATTRIBUTE const TextVAlignment kCCVerticalTextAlignmentTop = TextVAlignment::TOP; +CC_DEPRECATED_ATTRIBUTE const TextVAlignment kCCVerticalTextAlignmentCenter = TextVAlignment::CENTER; +CC_DEPRECATED_ATTRIBUTE const TextVAlignment kCCVerticalTextAlignmentBottom = TextVAlignment::BOTTOM; + +CC_DEPRECATED_ATTRIBUTE const TextHAlignment kCCTextAlignmentLeft = TextHAlignment::LEFT; +CC_DEPRECATED_ATTRIBUTE const TextHAlignment kCCTextAlignmentCenter = TextHAlignment::CENTER; +CC_DEPRECATED_ATTRIBUTE const TextHAlignment kCCTextAlignmentRight = TextHAlignment::RIGHT; + +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGBA8888 = Texture2D::PixelFormat::RGBA8888; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGB888 = Texture2D::PixelFormat::RGB888; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGB565 = Texture2D::PixelFormat::RGB565; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_A8 = Texture2D::PixelFormat::A8; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_I8 = Texture2D::PixelFormat::I8; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_AI88 = Texture2D::PixelFormat::AI88; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGBA4444 = Texture2D::PixelFormat::RGBA4444; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_RGB5A1 = Texture2D::PixelFormat::RGB5A1; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_PVRTC4 = Texture2D::PixelFormat::PVRTC4; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_PVRTC2 = Texture2D::PixelFormat::PVRTC2; +CC_DEPRECATED_ATTRIBUTE const Texture2D::PixelFormat kCCTexture2DPixelFormat_Default = Texture2D::PixelFormat::DEFAULT; + +CC_DEPRECATED_ATTRIBUTE typedef Texture2D::PixelFormat CCTexture2DPixelFormat; + + +CC_DEPRECATED_ATTRIBUTE const int kCCParticleDurationInfinity = ParticleSystem::DURATION_INFINITY; +CC_DEPRECATED_ATTRIBUTE const int kCCParticleStartSizeEqualToEndSize = ParticleSystem::START_SIZE_EQUAL_TO_END_SIZE; +CC_DEPRECATED_ATTRIBUTE const int kCCParticleStartRadiusEqualToEndRadius = ParticleSystem::START_RADIUS_EQUAL_TO_END_RADIUS; + +CC_DEPRECATED_ATTRIBUTE const int kParticleDurationInfinity = ParticleSystem::DURATION_INFINITY; +CC_DEPRECATED_ATTRIBUTE const int kParticleStartSizeEqualToEndSize = ParticleSystem::START_SIZE_EQUAL_TO_END_SIZE; +CC_DEPRECATED_ATTRIBUTE const int kParticleStartRadiusEqualToEndRadius = ParticleSystem::START_RADIUS_EQUAL_TO_END_RADIUS; + +CC_DEPRECATED_ATTRIBUTE const ParticleSystem::Mode kCCParticleModeGravity = ParticleSystem::Mode::GRAVITY; +CC_DEPRECATED_ATTRIBUTE const ParticleSystem::Mode kCCParticleModeRadius = ParticleSystem::Mode::RADIUS; +CC_DEPRECATED_ATTRIBUTE const int kCCParticleDefaultCapacity = kParticleDefaultCapacity; + +CC_DEPRECATED_ATTRIBUTE const ParticleSystem::PositionType kCCPositionTypeFree = ParticleSystem::PositionType::FREE; +CC_DEPRECATED_ATTRIBUTE const ParticleSystem::PositionType kCCPositionTypeRelative = ParticleSystem::PositionType::RELATIVE; +CC_DEPRECATED_ATTRIBUTE const ParticleSystem::PositionType kCCPositionTypeGrouped = ParticleSystem::PositionType::GROUPED; + +CC_DEPRECATED_ATTRIBUTE typedef ParticleSystem::PositionType tPositionType; + +#define kCCLabelAutomaticWidth kLabelAutomaticWidth + + +CC_DEPRECATED_ATTRIBUTE const Menu::State kCCMenuStateWaiting = Menu::State::WAITING; +CC_DEPRECATED_ATTRIBUTE const Menu::State kCCMenuStateTrackingTouch = Menu::State::TRACKING_TOUCH; + +CC_DEPRECATED_ATTRIBUTE typedef Menu::State tMenuState; + +CC_DEPRECATED_ATTRIBUTE const Touch::DispatchMode kCCTouchesOneByOne = Touch::DispatchMode::ONE_BY_ONE; +CC_DEPRECATED_ATTRIBUTE const Touch::DispatchMode kCCTouchesAllAtOnce = Touch::DispatchMode::ALL_AT_ONCE; + +CC_DEPRECATED_ATTRIBUTE typedef Touch::DispatchMode ccTouchesMode; + +CC_DEPRECATED_ATTRIBUTE const Image::Format kCCImageFormatPNG = Image::Format::PNG; +CC_DEPRECATED_ATTRIBUTE const Image::Format kCCImageFormatJPEG = Image::Format::JPG; + +CC_DEPRECATED_ATTRIBUTE typedef Image::Format tImageFormat; + +CC_DEPRECATED_ATTRIBUTE const TransitionScene::Orientation kCCTransitionOrientationLeftOver = TransitionScene::Orientation::LEFT_OVER; +CC_DEPRECATED_ATTRIBUTE const TransitionScene::Orientation kCCTransitionOrientationRightOver = TransitionScene::Orientation::RIGHT_OVER; +CC_DEPRECATED_ATTRIBUTE const TransitionScene::Orientation kCCTransitionOrientationUpOver = TransitionScene::Orientation::UP_OVER; +CC_DEPRECATED_ATTRIBUTE const TransitionScene::Orientation kCCTransitionOrientationDownOver = TransitionScene::Orientation::DOWN_OVER; + +CC_DEPRECATED_ATTRIBUTE typedef TransitionScene::Orientation tOrientation; + +CC_DEPRECATED_ATTRIBUTE const int kCCPrioritySystem = Scheduler::PRIORITY_SYSTEM; +CC_DEPRECATED_ATTRIBUTE const int kCCPriorityNonSystemMin = Scheduler::PRIORITY_NON_SYSTEM_MIN; + +CC_DEPRECATED_ATTRIBUTE const int kCCActionTagInvalid = Action::INVALID_TAG; +CC_DEPRECATED_ATTRIBUTE const int kCCNodeTagInvalid = Node::INVALID_TAG; + +CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnEnter = kNodeOnEnter; +CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnExit = kNodeOnExit; +CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnEnterTransitionDidFinish = kNodeOnEnterTransitionDidFinish; +CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnExitTransitionDidStart = kNodeOnExitTransitionDidStart; +CC_DEPRECATED_ATTRIBUTE const int kCCNodeOnCleanup = kNodeOnCleanup; + + +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageEnglish = LanguageType::ENGLISH; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageChinese = LanguageType::CHINESE; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageFrench = LanguageType::FRENCH; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageItalian = LanguageType::ITALIAN; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageGerman = LanguageType::GERMAN; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageSpanish = LanguageType::SPANISH; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageRussian = LanguageType::RUSSIAN; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageKorean = LanguageType::KOREAN; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageJapanese = LanguageType::JAPANESE; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageHungarian = LanguageType::HUNGARIAN; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguagePortuguese = LanguageType::PORTUGUESE; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageArabic = LanguageType::ARABIC; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguageNorwegian = LanguageType::NORWEGIAN; +CC_DEPRECATED_ATTRIBUTE const LanguageType kLanguagePolish = LanguageType::POLISH; +CC_DEPRECATED_ATTRIBUTE typedef LanguageType ccLanguageType; + + +CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetWindows = Application::Platform::OS_WINDOWS; +CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetLinux = Application::Platform::OS_LINUX; +CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetMacOS = Application::Platform::OS_MAC; +CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetAndroid = Application::Platform::OS_ANDROID; +CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetIphone = Application::Platform::OS_IPHONE; +CC_DEPRECATED_ATTRIBUTE const Application::Platform kTargetIpad = Application::Platform::OS_IPAD; +CC_DEPRECATED_ATTRIBUTE typedef Application::Platform TargetPlatform; + +CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionExactFit = ResolutionPolicy::EXACT_FIT; +CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionNoBorder = ResolutionPolicy::NO_BORDER; +CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionShowAll = ResolutionPolicy::SHOW_ALL; +CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionFixedHeight = ResolutionPolicy::FIXED_HEIGHT; +CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionFixedWidth = ResolutionPolicy::FIXED_WIDTH; +CC_DEPRECATED_ATTRIBUTE const ResolutionPolicy kResolutionUnKnown = ResolutionPolicy::UNKNOWN; + + +#define kCCTMXTileHorizontalFlag kTMXTileHorizontalFlag +#define kCCTMXTileVerticalFlag kTMXTileVerticalFlag +#define kCCTMXTileDiagonalFlag kTMXTileDiagonalFlag +#define kCCFlipedAll kFlipedAll +#define kCCFlippedMask kTMXFlippedMask + + +/** use log() instead */ +CC_DEPRECATED_ATTRIBUTE void CC_DLL CCLog(const char * pszFormat, ...) CC_FORMAT_PRINTF(1, 2); + +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawInit(); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawFree(); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawPoint( const Vec2& point ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawPoints( const Vec2 *points, unsigned int numberOfPoints ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawLine( const Vec2& origin, const Vec2& destination ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawRect( Vec2 origin, Vec2 destination ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawSolidRect( Vec2 origin, Vec2 destination, Color4F color ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawPoly( const Vec2 *vertices, unsigned int numOfVertices, bool closePolygon ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawSolidPoly( const Vec2 *poli, unsigned int numberOfPoints, Color4F color ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destination, unsigned int segments); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& control2, const Vec2& destination, unsigned int segments); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCatmullRom( PointArray *arrayOfControlPoints, unsigned int segments ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawCardinalSpline( PointArray *config, float tension, unsigned int segments ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawColor4B( GLubyte r, GLubyte g, GLubyte b, GLubyte a ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccDrawColor4F( GLfloat r, GLfloat g, GLfloat b, GLfloat a ); +CC_DEPRECATED_ATTRIBUTE void CC_DLL ccPointSize( GLfloat pointSize ); + +CC_DEPRECATED_ATTRIBUTE typedef Data CCData; +CC_DEPRECATED_ATTRIBUTE typedef __Set CCSet; +CC_DEPRECATED_ATTRIBUTE typedef __SetIterator CCSetIterator; +CC_DEPRECATED_ATTRIBUTE typedef __Set Set; +CC_DEPRECATED_ATTRIBUTE typedef __SetIterator SetIterator; + +CC_DEPRECATED_ATTRIBUTE typedef __Array CCArray; +CC_DEPRECATED_ATTRIBUTE typedef __Array Array; + +CC_DEPRECATED_ATTRIBUTE typedef __Dictionary Dictionary; +CC_DEPRECATED_ATTRIBUTE typedef __Dictionary CCDictionary; + +CC_DEPRECATED_ATTRIBUTE typedef __Double Double; +CC_DEPRECATED_ATTRIBUTE typedef __Double CCDouble; +CC_DEPRECATED_ATTRIBUTE typedef __Float Float; +CC_DEPRECATED_ATTRIBUTE typedef __Float CCFloat; +CC_DEPRECATED_ATTRIBUTE typedef __Integer Integer; +CC_DEPRECATED_ATTRIBUTE typedef __Integer CCInteger; +CC_DEPRECATED_ATTRIBUTE typedef __Bool Bool; +CC_DEPRECATED_ATTRIBUTE typedef __Bool CCBool; +CC_DEPRECATED_ATTRIBUTE typedef __String CCString; +CC_DEPRECATED_ATTRIBUTE typedef __String String; + +CC_DEPRECATED_ATTRIBUTE typedef __RGBAProtocol RGBAProtocol; + +//deprecated attributes and methods for kazMath +CC_DEPRECATED_ATTRIBUTE typedef float kmScalar; + +//kmMat4 and kmMat4 stack +CC_DEPRECATED_ATTRIBUTE typedef Mat4 kmMat4; +CC_DEPRECATED_ATTRIBUTE const unsigned int KM_GL_MODELVIEW = 0x1700; +CC_DEPRECATED_ATTRIBUTE const unsigned int KM_GL_PROJECTION = 0x1701; +CC_DEPRECATED_ATTRIBUTE const unsigned int KM_GL_TEXTURE = 0x1702; + +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLFreeAll(void); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLPushMatrix(void); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLPopMatrix(void); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLMatrixMode(unsigned int mode); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLLoadIdentity(void); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLLoadMatrix(const Mat4* pIn); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLMultMatrix(const Mat4* pIn); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLTranslatef(float x, float y, float z); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLRotatef(float angle, float x, float y, float z); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLScalef(float x, float y, float z); +CC_DEPRECATED_ATTRIBUTE void CC_DLL kmGLGetMatrix(unsigned int mode, Mat4* pOut); + +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Fill(Mat4* pOut, const float* pMat); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Assign(Mat4* pOut, const Mat4* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Identity(Mat4* pOut); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Inverse(Mat4* pOut, const Mat4* pM); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Transpose(Mat4* pOut, const Mat4* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Multiply(Mat4* pOut, const Mat4* pM1, const Mat4* pM2); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Translation(Mat4* pOut, const float x, const float y, const float z); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4RotationX(Mat4* pOut, const float radians); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4RotationY(Mat4* pOut, const float radians); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4RotationZ(Mat4* pOut, const float radians); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4RotationAxisAngle(Mat4* pOut, const Vec3* axis, float radians); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4Scaling(Mat4* pOut, const float x, const float y, const float z); + +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4PerspectiveProjection(Mat4* pOut, float fovY, float aspect, float zNear, float zFar); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4OrthographicProjection(Mat4* pOut, float left, float right, float bottom, float top, float nearVal, float farVal); +CC_DEPRECATED_ATTRIBUTE CC_DLL Mat4* kmMat4LookAt(Mat4* pOut, const Vec3* pEye, const Vec3* pCenter, const Vec3* pUp); + +//kmVec3 +CC_DEPRECATED_ATTRIBUTE typedef Vec3 kmVec3; +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Fill(Vec3* pOut, float x, float y, float z); +CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec3Length(const Vec3* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec3LengthSq(const Vec3* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Lerp(Vec3* pOut, const Vec3* pV1, const Vec3* pV2, float t); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Normalize(Vec3* pOut, const Vec3* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Cross(Vec3* pOut, const Vec3* pV1, const Vec3* pV2); +CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec3Dot(const Vec3* pV1, const Vec3* pV2); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Add(Vec3* pOut, const Vec3* pV1, const Vec3* pV2); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Subtract(Vec3* pOut, const Vec3* pV1, const Vec3* pV2); + +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Transform(Vec3* pOut, const Vec3* pV1, const Mat4* pM); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3TransformNormal(Vec3* pOut, const Vec3* pV, const Mat4* pM); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3TransformCoord(Vec3* pOut, const Vec3* pV, const Mat4* pM); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Scale(Vec3* pOut, const Vec3* pIn, const float s); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Assign(Vec3* pOut, const Vec3* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec3* kmVec3Zero(Vec3* pOut); + +CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_NEG_Z; +CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_POS_Z; +CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_POS_Y; +CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_NEG_Y; +CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_NEG_X; +CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_POS_X; +CC_DEPRECATED_ATTRIBUTE extern const Vec3 KM_VEC3_ZERO; + +//kmVec2 +CC_DEPRECATED_ATTRIBUTE typedef Vec2 kmVec2; +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Fill(Vec2* pOut, float x, float y); +CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec2Length(const Vec2* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec2LengthSq(const Vec2* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Normalize(Vec2* pOut, const Vec2* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Lerp(Vec2* pOut, const Vec2* pV1, const Vec2* pV2, float t); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Add(Vec2* pOut, const Vec2* pV1, const Vec2* pV2); +CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec2Dot(const Vec2* pV1, const Vec2* pV2); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Subtract(Vec2* pOut, const Vec2* pV1, const Vec2* pV2); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Scale(Vec2* pOut, const Vec2* pIn, const float s); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec2* kmVec2Assign(Vec2* pOut, const Vec2* pIn); + +CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_POS_Y; +CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_NEG_Y; +CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_NEG_X; +CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_POS_X; +CC_DEPRECATED_ATTRIBUTE extern const Vec2 KM_VEC2_ZERO; + +//kmVec4 +CC_DEPRECATED_ATTRIBUTE typedef Vec4 kmVec4; +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Fill(Vec4* pOut, float x, float y, float z, float w); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Add(Vec4* pOut, const Vec4* pV1, const Vec4* pV2); +CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec4Dot(const Vec4* pV1, const Vec4* pV2); +CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec4Length(const Vec4* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL float kmVec4LengthSq(const Vec4* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Lerp(Vec4* pOut, const Vec4* pV1, const Vec4* pV2, float t); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Normalize(Vec4* pOut, const Vec4* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Scale(Vec4* pOut, const Vec4* pIn, const float s); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Subtract(Vec4* pOut, const Vec4* pV1, const Vec4* pV2); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Assign(Vec4* pOut, const Vec4* pIn); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4MultiplyMat4(Vec4* pOut, const Vec4* pV, const Mat4* pM); +CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Transform(Vec4* pOut, const Vec4* pV, const Mat4* pM); + +//end of deprecated attributes and methods for kazMath + +NS_CC_END + +/// @endcond +#endif // __COCOS2D_CCDEPRECATED_H__ diff --git a/cocos/scripting/deprecated/CCDictionary.cpp b/cocos/scripting/deprecated/CCDictionary.cpp new file mode 100644 index 0000000000..37dc7498cc --- /dev/null +++ b/cocos/scripting/deprecated/CCDictionary.cpp @@ -0,0 +1,617 @@ +/**************************************************************************** + Copyright (c) 2012 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + 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 "scripting/deprecated/CCDictionary.h" +#include +#include "base/ccUTF8.h" +#include "platform/CCFileUtils.h" +#include "scripting/deprecated/CCString.h" +#include "scripting/deprecated/CCBool.h" +#include "scripting/deprecated/CCInteger.h" +#include "scripting/deprecated/CCFloat.h" +#include "scripting/deprecated/CCDouble.h" +#include "scripting/deprecated/CCArray.h" + +using namespace std; + +NS_CC_BEGIN + +// ----------------------------------------------------------------------- +// DictElement + +DictElement::DictElement(const char* pszKey, Ref* pObject) +{ + CCASSERT(pszKey && strlen(pszKey) > 0, "Invalid key value."); + _intKey = 0; + const char* pStart = pszKey; + + size_t len = strlen(pszKey); + if (len > MAX_KEY_LEN ) + { + char* pEnd = (char*)&pszKey[len-1]; + pStart = pEnd - (MAX_KEY_LEN-1); + } + + strcpy(_strKey, pStart); + + _object = pObject; + memset(&hh, 0, sizeof(hh)); +} + +DictElement::DictElement(intptr_t iKey, Ref* pObject) +{ + _strKey[0] = '\0'; + _intKey = iKey; + _object = pObject; + memset(&hh, 0, sizeof(hh)); +} + +DictElement::~DictElement() +{ + CCLOGINFO("deallocing DictElement: %p", this); +} + +// ----------------------------------------------------------------------- +// __Dictionary + +__Dictionary::__Dictionary() +: _elements(nullptr) +, _dictType(kDictUnknown) +{ + +} + +__Dictionary::~__Dictionary() +{ + CCLOGINFO("deallocing __Dictionary: %p", this); + removeAllObjects(); +} + +unsigned int __Dictionary::count() +{ + return HASH_COUNT(_elements); +} + +__Array* __Dictionary::allKeys() +{ + int iKeyCount = this->count(); + if (iKeyCount <= 0) return nullptr; + + __Array* array = __Array::createWithCapacity(iKeyCount); + + DictElement *pElement, *tmp; + if (_dictType == kDictStr) + { + HASH_ITER(hh, _elements, pElement, tmp) + { + __String* pOneKey = new (std::nothrow) __String(pElement->_strKey); + array->addObject(pOneKey); + CC_SAFE_RELEASE(pOneKey); + } + } + else if (_dictType == kDictInt) + { + HASH_ITER(hh, _elements, pElement, tmp) + { + __Integer* pOneKey = new (std::nothrow) __Integer(static_cast(pElement->_intKey)); + array->addObject(pOneKey); + CC_SAFE_RELEASE(pOneKey); + } + } + + return array; +} + +__Array* __Dictionary::allKeysForObject(Ref* object) +{ + int iKeyCount = this->count(); + if (iKeyCount <= 0) return nullptr; + __Array* array = __Array::create(); + + DictElement *pElement, *tmp; + + if (_dictType == kDictStr) + { + HASH_ITER(hh, _elements, pElement, tmp) + { + if (object == pElement->_object) + { + __String* pOneKey = new (std::nothrow) __String(pElement->_strKey); + array->addObject(pOneKey); + CC_SAFE_RELEASE(pOneKey); + } + } + } + else if (_dictType == kDictInt) + { + HASH_ITER(hh, _elements, pElement, tmp) + { + if (object == pElement->_object) + { + __Integer* pOneKey = new (std::nothrow) __Integer(static_cast(pElement->_intKey)); + array->addObject(pOneKey); + CC_SAFE_RELEASE(pOneKey); + } + } + } + return array; +} + +Ref* __Dictionary::objectForKey(const std::string& key) +{ + // if dictionary wasn't initialized, return nullptr directly. + if (_dictType == kDictUnknown) return nullptr; + // __Dictionary only supports one kind of key, string or integer. + // This method uses string as key, therefore we should make sure that the key type of this __Dictionary is string. + CCASSERT(_dictType == kDictStr, "this dictionary does not use string as key."); + + Ref* pRetObject = nullptr; + DictElement *pElement = nullptr; + HASH_FIND_STR(_elements, key.c_str(), pElement); + if (pElement != nullptr) + { + pRetObject = pElement->_object; + } + return pRetObject; +} + +Ref* __Dictionary::objectForKey(intptr_t key) +{ + // if dictionary wasn't initialized, return nullptr directly. + if (_dictType == kDictUnknown) return nullptr; + // __Dictionary only supports one kind of key, string or integer. + // This method uses integer as key, therefore we should make sure that the key type of this __Dictionary is integer. + CCASSERT(_dictType == kDictInt, "this dictionary does not use integer as key."); + + Ref* pRetObject = nullptr; + DictElement *pElement = nullptr; + HASH_FIND_PTR(_elements, &key, pElement); + if (pElement != nullptr) + { + pRetObject = pElement->_object; + } + return pRetObject; +} + +const __String* __Dictionary::valueForKey(const std::string& key) +{ + __String* pStr = dynamic_cast<__String*>(objectForKey(key)); + if (pStr == nullptr) + { + pStr = __String::create(""); + } + return pStr; +} + +const __String* __Dictionary::valueForKey(intptr_t key) +{ + __String* pStr = dynamic_cast<__String*>(objectForKey(key)); + if (pStr == nullptr) + { + pStr = __String::create(""); + } + return pStr; +} + +void __Dictionary::setObject(Ref* pObject, const std::string& key) +{ + CCASSERT(!key.empty() && pObject != nullptr, "Invalid Argument!"); + if (_dictType == kDictUnknown) + { + _dictType = kDictStr; + } + + CCASSERT(_dictType == kDictStr, "this dictionary doesn't use string as key."); + + DictElement *pElement = nullptr; + HASH_FIND_STR(_elements, key.c_str(), pElement); + if (pElement == nullptr) + { + setObjectUnSafe(pObject, key); + } + else if (pElement->_object != pObject) + { + Ref* pTmpObj = pElement->_object; + pTmpObj->retain(); + removeObjectForElememt(pElement); + setObjectUnSafe(pObject, key); + pTmpObj->release(); + } +} + +void __Dictionary::setObject(Ref* pObject, intptr_t key) +{ + CCASSERT(pObject != nullptr, "Invalid Argument!"); + if (_dictType == kDictUnknown) + { + _dictType = kDictInt; + } + + CCASSERT(_dictType == kDictInt, "this dictionary doesn't use integer as key."); + + DictElement *pElement = nullptr; + HASH_FIND_PTR(_elements, &key, pElement); + if (pElement == nullptr) + { + setObjectUnSafe(pObject, key); + } + else if (pElement->_object != pObject) + { + Ref* pTmpObj = pElement->_object; + pTmpObj->retain(); + removeObjectForElememt(pElement); + setObjectUnSafe(pObject, key); + pTmpObj->release(); + } + +} + +void __Dictionary::removeObjectForKey(const std::string& key) +{ + if (_dictType == kDictUnknown) + { + return; + } + + CCASSERT(_dictType == kDictStr, "this dictionary doesn't use string as its key"); + CCASSERT(!key.empty(), "Invalid Argument!"); + DictElement *pElement = nullptr; + HASH_FIND_STR(_elements, key.c_str(), pElement); + removeObjectForElememt(pElement); +} + +void __Dictionary::removeObjectForKey(intptr_t key) +{ + if (_dictType == kDictUnknown) + { + return; + } + + CCASSERT(_dictType == kDictInt, "this dictionary doesn't use integer as its key"); + DictElement *pElement = nullptr; + HASH_FIND_PTR(_elements, &key, pElement); + removeObjectForElememt(pElement); +} + +void __Dictionary::setObjectUnSafe(Ref* pObject, const std::string& key) +{ + pObject->retain(); + DictElement* pElement = new (std::nothrow) DictElement(key.c_str(), pObject); + HASH_ADD_STR(_elements, _strKey, pElement); +} + +void __Dictionary::setObjectUnSafe(Ref* pObject, const intptr_t key) +{ + pObject->retain(); + DictElement* pElement = new (std::nothrow) DictElement(key, pObject); + HASH_ADD_PTR(_elements, _intKey, pElement); +} + +void __Dictionary::removeObjectsForKeys(__Array* pKey__Array) +{ + Ref* pObj = nullptr; + CCARRAY_FOREACH(pKey__Array, pObj) + { + __String* pStr = static_cast<__String*>(pObj); + removeObjectForKey(pStr->getCString()); + } +} + +void __Dictionary::removeObjectForElememt(DictElement* pElement) +{ + if (pElement != nullptr) + { + HASH_DEL(_elements, pElement); + pElement->_object->release(); + CC_SAFE_DELETE(pElement); + } +} + +void __Dictionary::removeAllObjects() +{ + DictElement *pElement, *tmp; + HASH_ITER(hh, _elements, pElement, tmp) + { + HASH_DEL(_elements, pElement); + pElement->_object->release(); + CC_SAFE_DELETE(pElement); + + } +} + +Ref* __Dictionary::randomObject() +{ + if (_dictType == kDictUnknown) + { + return nullptr; + } + + Ref* key = allKeys()->getRandomObject(); + + if (_dictType == kDictInt) + { + return objectForKey( static_cast<__Integer*>(key)->getValue()); + } + else if (_dictType == kDictStr) + { + return objectForKey( static_cast<__String*>(key)->getCString()); + } + else + { + return nullptr; + } +} + +__Dictionary* __Dictionary::create() +{ + __Dictionary* ret = new (std::nothrow) __Dictionary(); + if (ret && ret->init() ) + { + ret->autorelease(); + } + return ret; +} + +bool __Dictionary::init() +{ + return true; +} + +__Dictionary* __Dictionary::createWithDictionary(__Dictionary* srcDict) +{ + return srcDict->clone(); +} + +static __Array* visitArray(const ValueVector& array); + +static __Dictionary* visitDict(const ValueMap& dict) +{ + __Dictionary* ret = new (std::nothrow) __Dictionary(); + ret->init(); + + for (auto iter = dict.begin(); iter != dict.end(); ++iter) + { + if (iter->second.getType() == Value::Type::MAP) + { + const ValueMap& subDict = iter->second.asValueMap(); + auto sub = visitDict(subDict); + ret->setObject(sub, iter->first); + sub->release(); + } + else if (iter->second.getType() == Value::Type::VECTOR) + { + const ValueVector& arr = iter->second.asValueVector(); + auto sub = visitArray(arr); + ret->setObject(sub, iter->first); + sub->release(); + } + else + { + auto str = new (std::nothrow) __String(iter->second.asString()); + ret->setObject(str, iter->first); + str->release(); + } + } + return ret; +} + +static __Array* visitArray(const ValueVector& array) +{ + __Array* ret = new (std::nothrow) __Array(); + ret->init(); + + for(const auto &value : array) { + if (value.getType() == Value::Type::MAP) + { + const ValueMap& subDict = value.asValueMap(); + auto sub = visitDict(subDict); + ret->addObject(sub); + sub->release(); + } + else if (value.getType() == Value::Type::VECTOR) + { + const ValueVector& arr = value.asValueVector(); + auto sub = visitArray(arr); + ret->addObject(sub); + sub->release(); + } + else + { + auto str = new (std::nothrow) __String(value.asString()); + ret->addObject(str); + str->release(); + } + } + + return ret; +} + +__Dictionary* __Dictionary::createWithContentsOfFileThreadSafe(const char *pFileName) +{ + return visitDict(FileUtils::getInstance()->getValueMapFromFile(pFileName)); +} + +void __Dictionary::acceptVisitor(DataVisitor &visitor) +{ + return visitor.visit(this); +} + +__Dictionary* __Dictionary::createWithContentsOfFile(const char *pFileName) +{ + auto ret = createWithContentsOfFileThreadSafe(pFileName); + if (ret != nullptr) + { + ret->autorelease(); + } + return ret; +} + +static ValueMap ccdictionary_to_valuemap(__Dictionary* dict); + +static ValueVector ccarray_to_valuevector(__Array* arr) +{ + ValueVector ret; + + Ref* obj; + CCARRAY_FOREACH(arr, obj) + { + Value arrElement; + + __String* strVal = nullptr; + __Dictionary* dictVal = nullptr; + __Array* arrVal = nullptr; + __Double* doubleVal = nullptr; + __Bool* boolVal = nullptr; + __Float* floatVal = nullptr; + __Integer* intVal = nullptr; + + if ((strVal = dynamic_cast<__String *>(obj))) { + arrElement = Value(strVal->getCString()); + } else if ((dictVal = dynamic_cast<__Dictionary*>(obj))) { + arrElement = ccdictionary_to_valuemap(dictVal); + } else if ((arrVal = dynamic_cast<__Array*>(obj))) { + arrElement = ccarray_to_valuevector(arrVal); + } else if ((doubleVal = dynamic_cast<__Double*>(obj))) { + arrElement = Value(doubleVal->getValue()); + } else if ((floatVal = dynamic_cast<__Float*>(obj))) { + arrElement = Value(floatVal->getValue()); + } else if ((intVal = dynamic_cast<__Integer*>(obj))) { + arrElement = Value(intVal->getValue()); + } else if ((boolVal = dynamic_cast<__Bool*>(obj))) { + arrElement = boolVal->getValue() ? Value(true) : Value(false); + } else { + CCASSERT(false, "the type isn't supported."); + } + + ret.push_back(arrElement); + } + return ret; +} + +static ValueMap ccdictionary_to_valuemap(__Dictionary* dict) +{ + ValueMap ret; + DictElement* pElement = nullptr; + CCDICT_FOREACH(dict, pElement) + { + Ref* obj = pElement->getObject(); + + __String* strVal = nullptr; + __Dictionary* dictVal = nullptr; + __Array* arrVal = nullptr; + __Double* doubleVal = nullptr; + __Bool* boolVal = nullptr; + __Float* floatVal = nullptr; + __Integer* intVal = nullptr; + + Value dictElement; + + if ((strVal = dynamic_cast<__String *>(obj))) { + dictElement = Value(strVal->getCString()); + } else if ((dictVal = dynamic_cast<__Dictionary*>(obj))) { + dictElement = ccdictionary_to_valuemap(dictVal); + } else if ((arrVal = dynamic_cast<__Array*>(obj))) { + dictElement = ccarray_to_valuevector(arrVal); + } else if ((doubleVal = dynamic_cast<__Double*>(obj))) { + dictElement = Value(doubleVal->getValue()); + } else if ((floatVal = dynamic_cast<__Float*>(obj))) { + dictElement = Value(floatVal->getValue()); + } else if ((intVal = dynamic_cast<__Integer*>(obj))) { + dictElement = Value(intVal->getValue()); + } else if ((boolVal = dynamic_cast<__Bool*>(obj))) { + dictElement = boolVal->getValue() ? Value(true) : Value(false); + } else { + CCASSERT(false, "the type isn't supported."); + } + + const char* key = pElement->getStrKey(); + if (key && strlen(key) > 0) + { + ret[key] = dictElement; + } + } + return ret; +} + + +bool __Dictionary::writeToFile(const char *fullPath) +{ + ValueMap dict = ccdictionary_to_valuemap(this); + return FileUtils::getInstance()->writeToFile(dict, fullPath); +} + +__Dictionary* __Dictionary::clone() const +{ + __Dictionary* newDict = __Dictionary::create(); + + DictElement* element = nullptr; + Ref* tmpObj = nullptr; + Clonable* obj = nullptr; + if (_dictType == kDictInt) + { + DictElement* tmp = nullptr; + HASH_ITER(hh, _elements, element, tmp) + { + obj = dynamic_cast(element->getObject()); + if (obj) + { + tmpObj = dynamic_cast(obj->clone()); + if (tmpObj) + { + newDict->setObject(tmpObj, element->getIntKey()); + } + } + else + { + CCLOGWARN("%s isn't clonable.", typeid(std::remove_pointergetObject())>::type).name()); + } + } + } + else if (_dictType == kDictStr) + { + DictElement* tmp = nullptr; + HASH_ITER(hh, _elements, element, tmp) + { + obj = dynamic_cast(element->getObject()); + if (obj) + { + tmpObj = dynamic_cast(obj->clone()); + if (tmpObj) + { + newDict->setObject(tmpObj, element->getStrKey()); + } + } + else + { + CCLOGWARN("%s isn't clonable.", typeid(std::remove_pointergetObject())>::type).name()); + } + } + } + + return newDict; +} + +NS_CC_END diff --git a/cocos/scripting/deprecated/CCDictionary.h b/cocos/scripting/deprecated/CCDictionary.h new file mode 100644 index 0000000000..0bece82c75 --- /dev/null +++ b/cocos/scripting/deprecated/CCDictionary.h @@ -0,0 +1,462 @@ +/**************************************************************************** +Copyright (c) 2012 cocos2d-x.org +Copyright (c) 2013-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +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 __CCDICTIONARY_H__ +#define __CCDICTIONARY_H__ +/// @cond DO_NOT_SHOW + +#include "base/uthash.h" +#include "base/CCRef.h" +#include "scripting/deprecated/CCArray.h" +#include "scripting/deprecated/CCString.h" + +NS_CC_BEGIN + +class __Dictionary; + +/** + * @addtogroup data_structures + * @{ + */ + + +/** + * DictElement is used for traversing Dictionary. + * + * A DictElement is one element of Dictionary, it contains two properties, key and object. + * Its key has two different type (integer and string). + * + * @note The key type is unique, all the elements in Dictionary has the same key type(integer or string). + * @code + * DictElement* pElement; + * CCDICT_FOREACH(dict, pElement) + * { + * const char*key = pElement->getStrKey(); + * // You certainly know the type of value, so we assume that it's a Sprite. + * Sprite* pSprite = static_cast(pElement->getObject()); + * // ...... + * } + * @endcode + * + */ +class CC_DLL DictElement +{ +private: + /** + * Constructor of DictElement. It's only for internal usage. Dictionary is its friend class. + * + * @param pszKey The string key of this element. + * @param pObject The object of this element. + */ + DictElement(const char* pszKey, Ref* pObject); + + /** + * Constructor of DictElement. It's only for internal usage. Dictionary is its friend class. + * + * @param iKey The integer key of this element. + * @param pObject The object of this element. + */ + DictElement(intptr_t iKey, Ref* pObject); + +public: + /** + * The destructor of DictElement. + * @js NA + * @lua NA + */ + ~DictElement(); + + // Inline functions need to be implemented in header file on Android. + + /** + * Get the string key of this element. + * @note This method assumes you know the key type in the element. + * If the element's key type is integer, invoking this method will cause an assert. + * + * @return The string key of this element. + */ + const char* getStrKey() const + { + CCASSERT(_strKey[0] != '\0', "Should not call this function for integer dictionary"); + return _strKey; + } + + /** + * Get the integer key of this element. + * @note This method assumes you know the key type in the element. + * If the element's key type is string, invoking this method will cause an assert. + * + * @return The integer key of this element. + */ + intptr_t getIntKey() const + { + CCASSERT(_strKey[0] == '\0', "Should not call this function for string dictionary"); + return _intKey; + } + + /** + * Get the object of this element. + * + * @return The object of this element. + */ + Ref* getObject() const { return _object; } + +private: + // The max length of string key. + #define MAX_KEY_LEN 256 + // char array is needed for HASH_ADD_STR in UT_HASH. + // So it's a pain that all elements will allocate 256 bytes for this array. + char _strKey[MAX_KEY_LEN]; // hash key of string type + intptr_t _intKey; // hash key of integer type + Ref* _object; // hash value +public: + UT_hash_handle hh; // makes this class hashable + friend class __Dictionary; // declare Dictionary as friend class +}; + +/** The macro for traversing dictionary + * + * @note It's faster than getting all keys and traversing keys to get objects by objectForKey. + * It's also safe to remove elements while traversing. + */ +#define CCDICT_FOREACH(__dict__, __el__) \ + DictElement* pTmp##__dict__##__el__ = nullptr; \ + if (__dict__) \ + HASH_ITER(hh, (__dict__)->_elements, __el__, pTmp##__dict__##__el__) + + + +/** + * Dictionary is a class like NSDictionary in Obj-C . + * + * @note Only the pointer of Object or its subclass can be inserted to Dictionary. + * @code + * // Create a dictionary, return an autorelease object. + * Dictionary* pDict = Dictionary::create(); + * + * // Insert objects to dictionary + * String* pValue1 = String::create("100"); + * String* pValue2 = String::create("120"); + * Integer* pValue3 = Integer::create(200); + * pDict->setObject(pValue1, "key1"); + * pDict->setObject(pValue2, "key2"); + * pDict->setObject(pValue3, "key3"); + * + * // Get the object for key + * String* pStr1 = static_cast(pDict->objectForKey("key1")); + * log("{ key1: %s }", pStr1->getCString()); + * Integer* pInteger = static_cast(pDict->objectForKey("key3")); + * log("{ key3: %d }", pInteger->getValue()); + * @endcode + * + */ + +class CC_DLL __Dictionary : public Ref, public Clonable +{ +public: + /** + * The constructor of Dictionary. + * @js NA + * @lua NA + */ + __Dictionary(); + + /** + * The destructor of Dictionary + * @js NA + * @lua NA + */ + ~__Dictionary(); + + /** Initializes the dictionary. It returns true if the initializations was successful. + * @js NA + * @lua NA + */ + bool init(); + /** + * Get the count of elements in Dictionary. + * + * @return The count of elements. + * @js NA + */ + unsigned int count(); + + /** + * Return all keys of elements. + * + * @return The array contains all keys of elements. It's an autorelease object yet. + * @js NA + */ + __Array* allKeys(); + + /** + * Get all keys according to the specified object. + * @warning We use '==' to compare two objects + * @return The array contains all keys for the specified object. It's an autorelease object yet. + * @js NA + */ + __Array* allKeysForObject(Ref* object); + + /** + * Get the object according to the specified string key. + * + * @note The dictionary needs to use string as key. If integer is passed, an assert will appear. + * @param key The string key for searching. + * @return The object matches the key. You need to force convert it to the type you know. + * @code + * // Assume that the elements are String* pointers. Convert it by following code. + * String* pStr = static_cast(pDict->objectForKey("key1")); + * // Do something about pStr. + * // If you don't know the object type, properly you need to use dynamic_cast to check it. + * String* pStr2 = dynamic_cast(pDict->objectForKey("key1")); + * if (pStr2 != NULL) { + * // Do something about pStr2 + * } + * @endcode + * @see objectForKey(intptr_t) + * @js NA + */ + Ref* objectForKey(const std::string& key); + + /** + * Get the object according to the specified integer key. + * + * @note The dictionary needs to use integer as key. If string is passed, an assert will appear. + * @param key The integer key for searching. + * @return The object matches the key. + * @see objectForKey(const std::string&) + * @js NA + */ + Ref* objectForKey(intptr_t key); + + /** Get the value according to the specified string key. + * + * @note Be careful to use this function since it assumes the objects in the dictionary are __String pointer. + * @param key The string key for searching + * @return An instance of String. + * It will return an empty string if the objects aren't __String pointer or the key wasn't found. + * @see valueForKey(intptr_t) + * @js NA + */ + const __String* valueForKey(const std::string& key); + + /** Get the value according to the specified integer key. + * + * @note Be careful to use this function since it assumes the objects in the dictionary are __String pointer. + * @param key The string key for searching. + * @return An instance of String. + * It will return an empty string if the objects aren't __String pointer or the key wasn't found. + * @see valueForKey(intptr_t) + * @js NA + */ + const __String* valueForKey(intptr_t key); + + /** Insert an object to dictionary, and match it with the specified string key. + * + * @note When the first time this method is invoked, the key type will be set to string. + * After that you can't setObject with an integer key. + * If the dictionary contains the key you passed, the object matching the key will be released and removed from dictionary. + * Then the new object will be inserted after that. + * + * @param pObject The Object to be inserted. + * @param key The string key for searching. + * @see setObject(Ref*, intptr_t) + * @js NA + */ + void setObject(Ref* pObject, const std::string& key); + + /** Insert an object to dictionary, and match it with the specified string key. + * + * @note Then the first time this method is invoked, the key type will be set to string. + * After that you can't setObject with an integer key. + * If the dictionary contains the key you passed, the object matching the key will be released and removed from dictionary. + * Then the new object will be inserted after that. + * @param pObject The Object to be inserted. + * @param key The string key for searching. + * @see setObject(Ref*, const std::string&) + * @js NA + */ + void setObject(Ref* pObject, intptr_t key); + + /** + * Remove an object by the specified string key. + * + * @param key The string key for searching. + * @see removeObjectForKey(intptr_t), removeObjectsForKeys(__Array*), + * removeObjectForElememt(DictElement*), removeAllObjects(). + * @js NA + */ + void removeObjectForKey(const std::string& key); + + /** + * Remove an object by the specified integer key. + * + * @param key The integer key for searching. + * @see removeObjectForKey(const std::string&), removeObjectsForKeys(__Array*), + * removeObjectForElememt(DictElement*), removeAllObjects(). + * @js NA + */ + void removeObjectForKey(intptr_t key); + + /** + * Remove objects by an array of keys. + * + * @param pKeyArray The array contains keys to be removed. + * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t), + * removeObjectForElememt(DictElement*), removeAllObjects(). + * @js NA + */ + void removeObjectsForKeys(__Array* pKey__Array); + + /** + * Remove an object by an element. + * + * @param pElement The element need to be removed. + * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t), + * removeObjectsForKeys(__Array*), removeAllObjects(). + * @js NA + * @lua NA + */ + void removeObjectForElememt(DictElement* pElement); + + /** + * Remove all objects in the dictionary. + * + * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t), + * removeObjectsForKeys(__Array*), removeObjectForElememt(DictElement*). + * @js NA + */ + void removeAllObjects(); + + /** + * Return a random object in the dictionary. + * + * @return The random object. + * @see objectForKey(intptr_t), objectForKey(const std::string&) + * @js NA + * @lua NA + */ + Ref* randomObject(); + + /** + * Create a dictionary. + * @return A dictionary which is an autorelease object. + * @see createWithDictionary(Dictionary*), createWithContentsOfFile(const char*), createWithContentsOfFileThreadSafe(const char*). + * @js NA + */ + static __Dictionary* create(); + + /** + * Create a dictionary with an existing dictionary. + * + * @param srcDict The exist dictionary. + * @return A dictionary which is an autorelease object. + * @see create(), createWithContentsOfFile(const char*), createWithContentsOfFileThreadSafe(const char*). + * @js NA + */ + static __Dictionary* createWithDictionary(__Dictionary* srcDict); + + /** + * Create a dictionary with a plist file. + * @param pFileName The name of the plist file. + * @return A dictionary which is an autorelease object. + * @see create(), createWithDictionary(Dictionary*), createWithContentsOfFileThreadSafe(const char*). + * @js NA + */ + static __Dictionary* createWithContentsOfFile(const char *pFileName); + + /** + * Write a dictionary to a plist file. + * @param fullPath The full path of the plist file. You can get writable path by getWritablePath() + * @return true if succeeded, false if failed + * @js NA + * @lua NA + */ + bool writeToFile(const char *fullPath); + + /** + * Create a dictionary with a plist file. + * + * @note the return object isn't an autorelease object. + * This can make sure not using autorelease pool in a new thread. + * Therefore, you need to manage the lifecycle of the return object. + * It means that when you don't need it, CC_SAFE_RELEASE needs to be invoked. + * + * @param pFileName The name of the plist file. + * @return A dictionary which isn't an autorelease object. + * @js NA + * @lua NA + */ + static __Dictionary* createWithContentsOfFileThreadSafe(const char *pFileName); + + /* override functions + * @js NA + * @lua NA + */ + virtual void acceptVisitor(DataVisitor &visitor); + /** + * @js NA + * @lua NA + */ + virtual __Dictionary* clone() const override; + +private: + /** + * For internal usage, invoked by setObject. + */ + void setObjectUnSafe(Ref* pObject, const std::string& key); + void setObjectUnSafe(Ref* pObject, const intptr_t key); + +public: + /** + * All the elements in dictionary. + * + * @note For internal usage, we need to declare this member variable as public since it's used in UT_HASH. + */ + DictElement* _elements; +private: + + /** The support type of dictionary, it's confirmed when setObject is invoked. */ + enum DictType + { + kDictUnknown = 0, + kDictStr, + kDictInt + }; + + /** + * The type of dictionary, it's assigned to kDictUnknown by default. + */ + DictType _dictType; +}; + +// end of data_structure group +/// @} + +NS_CC_END + +/// @endcond +#endif /* __CCDICTIONARY_H__ */ diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.h b/cocos/scripting/deprecated/CCDouble.h similarity index 59% rename from cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.h rename to cocos/scripting/deprecated/CCDouble.h index 6df35ad0d7..bf7596e4a5 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.h +++ b/cocos/scripting/deprecated/CCDouble.h @@ -1,5 +1,5 @@ /**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2013-2017 Chukong Technologies Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org @@ -22,52 +22,53 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __LUA_OPENGL_H__ -#define __LUA_OPENGL_H__ -#ifdef __cplusplus -extern "C" { -#endif -#include "tolua++.h" -#ifdef __cplusplus -} -#endif +#ifndef __CCDOUBLE_H__ +#define __CCDOUBLE_H__ +/// @cond DO_NOT_SHOW -#include "2d/CCNode.h" -#include "renderer/CCCustomCommand.h" +#include "base/CCRef.h" +#include "scripting/deprecated/CCDataVisitor.h" + +NS_CC_BEGIN /** - * @addtogroup lua + * @addtogroup data_structures * @{ */ -/** - * The GLNode is wrapped to call the callback function about draw in the Lua. - */ -class GLNode:public cocos2d::Node +class CC_DLL __Double : public Ref, public Clonable { public: - /** - * Destructor. - * - * @lua NA - * @js NA - */ - virtual ~GLNode(){} + __Double(double v) + : _value(v) {} + double getValue() const {return _value;} + + static __Double* create(double v) + { + __Double* pRet = new (std::nothrow) __Double(v); + if (pRet) + { + pRet->autorelease(); + } + return pRet; + } + + /* override functions */ + virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); } - // @cond - virtual void draw(cocos2d::Renderer *renderer, const cocos2d::Mat4& transform, uint32_t flags) override; - // @endcond -protected: - cocos2d::CustomCommand _renderCmd; - void onDraw(const cocos2d::Mat4 &transform, uint32_t flags); + virtual __Double* clone() const override + { + return __Double::create(_value); + } +private: + double _value; }; -/// @cond -TOLUA_API int tolua_opengl_open(lua_State* tolua_S); -TOLUA_API int register_glnode_manual(lua_State* tolua_S); -/// @endcond - -// end group +// end of data_structure group /// @} -#endif //__LUA_OPENGL_H__ + +NS_CC_END + +/// @endcond +#endif /* __CCDOUBLE_H__ */ diff --git a/cocos/scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.h b/cocos/scripting/deprecated/CCFloat.h similarity index 55% rename from cocos/scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.h rename to cocos/scripting/deprecated/CCFloat.h index b1ea8fe8ce..218db45664 100644 --- a/cocos/scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.h +++ b/cocos/scripting/deprecated/CCFloat.h @@ -1,5 +1,5 @@ /**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2013-2017 Chukong Technologies Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org @@ -22,34 +22,54 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_LUA_COCOS2DX_COCOSBUILDER_H -#define COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_LUA_COCOS2DX_COCOSBUILDER_H -#ifdef __cplusplus -extern "C" { -#endif -#include "tolua++.h" -#ifdef __cplusplus -} -#endif +#ifndef __CCFLOAT_H__ +#define __CCFLOAT_H__ +/// @cond DO_NOT_SHOW -TOLUA_API int register_all_cocos2dx_cocosbuilder_manual(lua_State* tolua_S); +#include "base/CCRef.h" +#include "scripting/deprecated/CCDataVisitor.h" + +NS_CC_BEGIN /** - * @addtogroup lua + * @addtogroup data_structures * @{ */ -/** - * Call this function can import the lua bindings for the cocosbuilder module. - * After registering, we could call the related cocosbuilder code conveniently in the lua.eg,.cc.CCBProxy:create(). - * If you don't want to use the cocosbuilder module in the lua, you only don't call this registering function. - * If you don't register the cocosbuilder module, the package size would become smaller . - * The current mechanism,this registering function is called in the lua_module_register.h - */ -TOLUA_API int register_cocosbuilder_module(lua_State* tolua_S); +class CC_DLL __Float : public Ref, public Clonable +{ +public: + __Float(float v) + : _value(v) {} + float getValue() const {return _value;} -// end group + static __Float* create(float v) + { + __Float* pRet = new (std::nothrow) __Float(v); + if (pRet) + { + pRet->autorelease(); + } + return pRet; + } + + /* override functions */ + virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); } + + virtual __Float* clone() const override + { + return __Float::create(_value); + } + +private: + float _value; +}; + +// end of data_structure group /// @} -#endif // #ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_LUA_COCOS2DX_COCOSBUILDER_H +NS_CC_END + +/// @endcond +#endif /* __CCFLOAT_H__ */ diff --git a/cocos/scripting/deprecated/CCInteger.h b/cocos/scripting/deprecated/CCInteger.h new file mode 100644 index 0000000000..151e7de87b --- /dev/null +++ b/cocos/scripting/deprecated/CCInteger.h @@ -0,0 +1,84 @@ +/**************************************************************************** + Copyright (c) 2013-2017 Chukong Technologies + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + 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 __CCINTEGER_H__ +#define __CCINTEGER_H__ +/// @cond DO_NOT_SHOW + +#include "base/CCRef.h" +#include "base/CCConsole.h" +#include "scripting/deprecated/CCDataVisitor.h" +#include "platform/CCCommon.h" + +NS_CC_BEGIN + +/** + * @addtogroup data_structures + * @{ + */ + +class CC_DLL __Integer : public Ref, public Clonable +{ +public: + static __Integer* create(int v) + { + __Integer* pRet = new (std::nothrow) __Integer(v); + pRet->autorelease(); + return pRet; + } + /** + * @js NA + */ + __Integer(int v) + : _value(v) {} + int getValue() const {return _value;} + /** + * @js NA + * @lua NA + */ + virtual ~__Integer() { + CCLOGINFO("deallocing ~__Integer: %p", this); + } + + /* override functions */ + virtual void acceptVisitor(DataVisitor &visitor) { visitor.visit(this); } + + // overrides + virtual __Integer* clone() const override + { + return __Integer::create(_value); + } + +private: + int _value; +}; + +// end of data_structure group +/// @} + +NS_CC_END + +/// @endcond +#endif /* __CCINTEGER_H__ */ diff --git a/cocos/scripting/deprecated/CCNotificationCenter.cpp b/cocos/scripting/deprecated/CCNotificationCenter.cpp new file mode 100644 index 0000000000..03a93df222 --- /dev/null +++ b/cocos/scripting/deprecated/CCNotificationCenter.cpp @@ -0,0 +1,300 @@ +/**************************************************************************** +Copyright (c) 2011 Erawppa +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +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 "scripting/deprecated/CCNotificationCenter.h" + +#include + +#include "base/CCScriptSupport.h" +#include "scripting/deprecated/CCArray.h" + +using namespace std; + +NS_CC_BEGIN + +static __NotificationCenter *s_sharedNotifCenter = nullptr; + +__NotificationCenter::__NotificationCenter() +: _scriptHandler(0) +{ + _observers = __Array::createWithCapacity(3); + _observers->retain(); +} + +__NotificationCenter::~__NotificationCenter() +{ + _observers->release(); +} + +__NotificationCenter *__NotificationCenter::getInstance() +{ + if (!s_sharedNotifCenter) + { + s_sharedNotifCenter = new (std::nothrow) __NotificationCenter; + } + return s_sharedNotifCenter; +} + +void __NotificationCenter::destroyInstance() +{ + CC_SAFE_RELEASE_NULL(s_sharedNotifCenter); +} + +// FIXME:: deprecated +__NotificationCenter *__NotificationCenter::sharedNotificationCenter(void) +{ + return __NotificationCenter::getInstance(); +} + +// FIXME:: deprecated +void __NotificationCenter::purgeNotificationCenter(void) +{ + __NotificationCenter::destroyInstance(); +} + +// +// internal functions +// +bool __NotificationCenter::observerExisted(Ref *target, const std::string& name, Ref *sender) +{ + Ref* obj = nullptr; + CCARRAY_FOREACH(_observers, obj) + { + NotificationObserver* observer = (NotificationObserver*) obj; + if (!observer) + continue; + + if (observer->getName() == name && observer->getTarget() == target && observer->getSender() == sender) + return true; + } + return false; +} + +// +// observer functions +// +void __NotificationCenter::addObserver(Ref *target, + SEL_CallFuncO selector, + const std::string& name, + Ref *sender) +{ + if (this->observerExisted(target, name, sender)) + return; + + NotificationObserver *observer = new (std::nothrow) NotificationObserver(target, selector, name, sender); + if (!observer) + return; + + observer->autorelease(); + _observers->addObject(observer); +} + +void __NotificationCenter::removeObserver(Ref *target, const std::string& name) +{ + Ref* obj = nullptr; + CCARRAY_FOREACH(_observers, obj) + { + NotificationObserver* observer = static_cast(obj); + if (!observer) + continue; + + if (observer->getName() == name && observer->getTarget() == target) + { + _observers->removeObject(observer); + return; + } + } +} + +int __NotificationCenter::removeAllObservers(Ref *target) +{ + Ref *obj = nullptr; + __Array *toRemove = __Array::create(); + + CCARRAY_FOREACH(_observers, obj) + { + NotificationObserver *observer = static_cast(obj); + if (!observer) + continue; + + if (observer->getTarget() == target) + { + toRemove->addObject(observer); + } + } + + _observers->removeObjectsInArray(toRemove); + return static_cast(toRemove->count()); +} + +void __NotificationCenter::registerScriptObserver(Ref *target, int handler,const std::string& name) +{ + + if (this->observerExisted(target, name, nullptr)) + return; + + NotificationObserver *observer = new (std::nothrow) NotificationObserver(target, nullptr, name, nullptr); + if (!observer) + return; + + observer->setHandler(handler); + observer->autorelease(); + _observers->addObject(observer); +} + +void __NotificationCenter::unregisterScriptObserver(Ref *target,const std::string& name) +{ + Ref* obj = nullptr; + CCARRAY_FOREACH(_observers, obj) + { + NotificationObserver* observer = static_cast(obj); + if (!observer) + continue; + + if ( observer->getName() == name && observer->getTarget() == target) + { + _observers->removeObject(observer); + } + } +} + +void __NotificationCenter::postNotification(const std::string& name, Ref *sender) +{ + __Array* ObserversCopy = __Array::createWithCapacity(_observers->count()); + ObserversCopy->addObjectsFromArray(_observers); + Ref* obj = nullptr; + CCARRAY_FOREACH(ObserversCopy, obj) + { + NotificationObserver* observer = static_cast(obj); + if (!observer) + continue; + + if (observer->getName() == name && (observer->getSender() == sender || observer->getSender() == nullptr || sender == nullptr)) + { + if (0 == observer->getHandler()) + { + observer->performSelector(sender); + } + } + } +} + +void __NotificationCenter::postNotification(const std::string& name) +{ + this->postNotification(name,nullptr); +} + +int __NotificationCenter::getObserverHandlerByName(const std::string& name) +{ + if (name.empty()) + { + return 0; + } + + Ref* obj = nullptr; + CCARRAY_FOREACH(_observers, obj) + { + NotificationObserver* observer = static_cast(obj); + if (nullptr == observer) + continue; + + if ( observer->getName() == name ) + { + return observer->getHandler(); + break; + } + } + + return 0; +} + +//////////////////////////////////////////////////////////////////////////////// +/// +/// NotificationObserver +/// +//////////////////////////////////////////////////////////////////////////////// +NotificationObserver::NotificationObserver(Ref *target, + SEL_CallFuncO selector, + const std::string& name, + Ref *sender) +{ + _target = target; + _selector = selector; + _sender = sender; + + _name = name; + _handler = 0; +} + +NotificationObserver::~NotificationObserver() +{ + +} + +void NotificationObserver::performSelector(Ref *sender) +{ + if (_target) + { + if (sender) { + (_target->*_selector)(sender); + } else { + (_target->*_selector)(_sender); + } + } +} + +Ref *NotificationObserver::getTarget() const +{ + return _target; +} + +SEL_CallFuncO NotificationObserver::getSelector() const +{ + return _selector; +} + +const std::string& NotificationObserver::getName() const +{ + return _name; +} + +Ref* NotificationObserver::getSender() const +{ + return _sender; +} + +int NotificationObserver::getHandler() const +{ + return _handler; +} + +void NotificationObserver::setHandler(int var) +{ + _handler = var; +} + +NS_CC_END diff --git a/cocos/scripting/deprecated/CCNotificationCenter.h b/cocos/scripting/deprecated/CCNotificationCenter.h new file mode 100644 index 0000000000..2e4a61e886 --- /dev/null +++ b/cocos/scripting/deprecated/CCNotificationCenter.h @@ -0,0 +1,214 @@ +/**************************************************************************** +Copyright (c) 2011 Erawppa +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +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 __CCNOTIFICATIONCENTER_H__ +#define __CCNOTIFICATIONCENTER_H__ +/// @cond DO_NOT_SHOW + +#include "base/CCRef.h" +#include "base/ccTypes.h" + +NS_CC_BEGIN + +class __Array; +class ScriptHandlerMgr; + +/** + * @cond DO_NOT_SHOW + * @{ + */ + +class CC_DLL __NotificationCenter : public Ref +{ + friend class ScriptHandlerMgr; +public: + /** __NotificationCenter constructor + * @js ctor + */ + __NotificationCenter(); + + /** __NotificationCenter destructor + * @js NA + * @lua NA + */ + ~__NotificationCenter(); + + /** Gets the single instance of __NotificationCenter. */ + static __NotificationCenter *getInstance(); + + /** Destroys the single instance of __NotificationCenter. */ + static void destroyInstance(); + + /** @deprecated use getInstance() instead */ + CC_DEPRECATED_ATTRIBUTE static __NotificationCenter *sharedNotificationCenter(void); + + /** @deprecated use destroyInstance() instead */ + CC_DEPRECATED_ATTRIBUTE static void purgeNotificationCenter(void); + + + /** @brief Adds an observer for the specified target. + * @param target The target which wants to observe notification events. + * @param selector The callback function which will be invoked when the specified notification event was posted. + * @param name The name of this notification. + * @param sender The object whose notifications the target wants to receive. Only notifications sent by this sender are delivered to the target. nullptr means that the sender is not used to decide whether to deliver the notification to target. + */ + void addObserver(Ref *target, + SEL_CallFuncO selector, + const std::string& name, + Ref *sender); + + /** @brief Removes the observer by the specified target and name. + * @param target The target of this notification. + * @param name The name of this notification. + */ + void removeObserver(Ref *target,const std::string& name); + + /** @brief Removes all notifications registered by this target + * @param target The target of this notification. + * @returns the number of observers removed + */ + int removeAllObservers(Ref *target); + + /** @brief Registers one hander for script binding. + * @note Only supports Lua Binding now. + * @param handler The lua handler. + */ + void registerScriptObserver(Ref *target,int handler,const std::string& name); + + /** Unregisters script observer */ + void unregisterScriptObserver(Ref *target,const std::string& name); + + /** @brief Posts one notification event by name. + * @param name The name of this notification. + */ + void postNotification(const std::string& name); + + /** @brief Posts one notification event by name. + * @param name The name of this notification. + * @param sender The object posting the notification. Can be nullptr + */ + void postNotification(const std::string& name, Ref *sender); + + /** @brief Gets script handler. + * @note Only supports Lua Binding now. + * @return The script handle. + */ + int getScriptHandler() const { return _scriptHandler; } + + /** @brief Gets observer script handler. + * @param name The name of this notification. + * @return The observer script handle. + */ + int getObserverHandlerByName(const std::string& name); +private: + // internal functions + + // Check whether the observer exists by the specified target and name. + bool observerExisted(Ref *target,const std::string& name, Ref *sender); + + // variables + // + __Array *_observers; + int _scriptHandler; +}; + +class CC_DLL NotificationObserver : public Ref +{ +public: + /** @brief NotificationObserver constructor + * @param target The target which wants to observer notification events. + * @param selector The callback function which will be invoked when the specified notification event was posted. + * @param name The name of this notification. + * @param sender The object whose notifications the target wants to receive. Only notifications sent by this sender are delivered to the target. nullptr means that the sender is not used to decide whether to deliver the notification to target. + * @js NA + * @lua NA + */ + NotificationObserver(Ref *target, + SEL_CallFuncO selector, + const std::string& name, + Ref *sender); + + /** NotificationObserver destructor function + * @js NA + * @lua NA + */ + ~NotificationObserver(); + + /** Invokes the callback function of this observer + * @js NA + * @lua NA + */ + void performSelector(Ref *sender); + + // Getters / Setters + /** + * @js NA + * @lua NA + */ + Ref* getTarget() const; + /** + * @js NA + * @lua NA + */ + SEL_CallFuncO getSelector() const; + /** + * @js NA + * @lua NA + */ + const std::string& getName() const; + /** + * @js NA + * @lua NA + */ + Ref* getSender() const; + /** + * @js NA + * @lua NA + */ + int getHandler() const; + /** + * @js NA + * @lua NA + */ + void setHandler(int handler); + +private: + Ref* _target; + SEL_CallFuncO _selector; + std::string _name; + Ref* _sender; + int _handler; +}; + +/** + * @} + */ + +NS_CC_END + +/// @endcond +#endif//__CCNOTIFICATIONCENTER_H__ diff --git a/cocos/scripting/deprecated/CCSet.cpp b/cocos/scripting/deprecated/CCSet.cpp new file mode 100644 index 0000000000..71abdf5e7f --- /dev/null +++ b/cocos/scripting/deprecated/CCSet.cpp @@ -0,0 +1,168 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2017 Chukong Technologies +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +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 "scripting/deprecated/CCSet.h" + +using namespace std; + +NS_CC_BEGIN + +__Set::__Set(void) +{ + _set = new (std::nothrow) set; +} + +__Set::__Set(const __Set &other) +{ + _set = new (std::nothrow) set(*other._set); + + // call retain of members + __SetIterator iter; + for (iter = _set->begin(); iter != _set->end(); ++iter) + { + if (! (*iter)) + { + break; + } + + (*iter)->retain(); + } +} + +__Set::~__Set(void) +{ + removeAllObjects(); + CC_SAFE_DELETE(_set); +} + +void __Set::acceptVisitor(DataVisitor &visitor) +{ + visitor.visit(this); +} + +__Set * __Set::create() +{ + __Set * pRet = new (std::nothrow) __Set(); + + if (pRet != nullptr) + { + pRet->autorelease(); + } + + return pRet; +} + +__Set* __Set::copy(void) +{ + __Set *p__Set = new (std::nothrow) __Set(*this); + + return p__Set; +} + +__Set* __Set::mutableCopy(void) +{ + return copy(); +} + +int __Set::count(void) +{ + return (int)_set->size(); +} + +void __Set::addObject(Ref *pObject) +{ + if (_set->count(pObject) == 0) + { + CC_SAFE_RETAIN(pObject); + _set->insert(pObject); + } +} + +void __Set::removeObject(Ref *pObject) +{ + if (_set->erase(pObject) > 0) + { + CC_SAFE_RELEASE(pObject); + } +} + +void __Set::removeAllObjects() +{ + __SetIterator it = _set->begin(); + __SetIterator tmp; + + while (it != _set->end()) + { + if (!(*it)) + { + break; + } + + tmp = it; + ++tmp; + Ref * obj = *it; + _set->erase(it); + CC_SAFE_RELEASE(obj); + it = tmp; + } +} + +bool __Set::containsObject(Ref *pObject) +{ + return _set->find(pObject) != _set->end(); +} + +__SetIterator __Set::begin(void) +{ + return _set->begin(); +} + +__SetIterator __Set::end(void) +{ + return _set->end(); +} + +Ref* __Set::anyObject() +{ + if (!_set || _set->empty()) + { + return 0; + } + + __SetIterator it; + + for( it = _set->begin(); it != _set->end(); ++it) + { + if (*it) + { + return (*it); + } + } + + return 0; +} + +NS_CC_END diff --git a/cocos/scripting/deprecated/CCSet.h b/cocos/scripting/deprecated/CCSet.h new file mode 100644 index 0000000000..9a82f12753 --- /dev/null +++ b/cocos/scripting/deprecated/CCSet.h @@ -0,0 +1,123 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2017 Chukong Technologies +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ + +#ifndef __CC_SET_H__ +#define __CC_SET_H__ +/// @cond DO_NOT_SHOW + +#include +#include "base/CCRef.h" +#include "scripting/deprecated/CCDataVisitor.h" + +NS_CC_BEGIN + +/** + * @addtogroup data_structures + * @{ + */ + +typedef std::set::iterator __SetIterator; + +class CC_DLL __Set : public Ref +{ +public: + /** + * @js ctor + */ + __Set(void); + __Set(const __Set &rSetObject); + /** + * @js NA + * @lua NA + */ + virtual ~__Set(void); + + /** + * @brief Create and return a new empty set. + */ + static __Set * create(); + + /** + *@brief Return a copy of the Set, it will copy all the elements. + */ + __Set* copy(); + /** + *@brief It is the same as copy(). + */ + __Set* mutableCopy(); + /** + *@brief Return the number of elements the Set contains. + */ + int count(); + /** + *@brief Add a element into Set, it will retain the element. + */ + void addObject(Ref *pObject); + /** + *@brief Remove the given element, nothing todo if no element equals pObject. + */ + void removeObject(Ref *pObject); + /** + *@brief Remove all elements of the set + */ + void removeAllObjects(); + /** + *@brief Check if Set contains a element equals pObject. + */ + bool containsObject(Ref *pObject); + /** + *@brief Return the iterator that points to the first element. + * @js NA + * @lua NA + */ + __SetIterator begin(); + /** + *@brief Return the iterator that points to the position after the last element. + * @js NA + * @lua NA + */ + __SetIterator end(); + /** + *@brief Return the first element if it contains elements, or null if it doesn't contain any element. + */ + Ref* anyObject(); + /** + * @js NA + * @lua NA + */ + virtual void acceptVisitor(DataVisitor &visitor); + +private: + std::set *_set; +}; + +// end of data_structure group +/// @} + +NS_CC_END + +/// @endcond +#endif // __CC_SET_H__ diff --git a/cocos/scripting/deprecated/CCString.cpp b/cocos/scripting/deprecated/CCString.cpp new file mode 100644 index 0000000000..84d0fd6a38 --- /dev/null +++ b/cocos/scripting/deprecated/CCString.cpp @@ -0,0 +1,276 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2017 Chukong Technologies +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + 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 "scripting/deprecated/CCString.h" +#include "platform/CCFileUtils.h" +#include "base/ccMacros.h" +#include +#include +#include "scripting/deprecated/CCArray.h" +#include "base/ccUtils.h" + +NS_CC_BEGIN + +#define kMaxStringLen (1024*100) + +__String::__String() + :_string("") +{} + +__String::__String(const char * str) + :_string(str) +{} + +__String::__String(const std::string& str) + :_string(str) +{} + +__String::__String(const __String& str) + :_string(str.getCString()) +{} + +__String::~__String() +{ + CCLOGINFO("deallocing __String: %p", this); + + _string.clear(); +} + +__String& __String::operator= (const __String& other) +{ + if (this != &other) { + _string = other._string; + } + return *this; +} + +bool __String::initWithFormatAndValist(const char* format, va_list ap) +{ + bool bRet = false; + char* pBuf = (char*)malloc(kMaxStringLen); + if (pBuf != nullptr) + { + vsnprintf(pBuf, kMaxStringLen, format, ap); + _string = pBuf; + free(pBuf); + bRet = true; + } + return bRet; +} + +bool __String::initWithFormat(const char* format, ...) +{ + _string.clear(); + + va_list ap; + va_start(ap, format); + + bool bRet = initWithFormatAndValist(format, ap); + + va_end(ap); + + return bRet; +} + +int __String::intValue() const +{ + if (length() == 0) + { + return 0; + } + return atoi(_string.c_str()); +} + +unsigned int __String::uintValue() const +{ + if (length() == 0) + { + return 0; + } + return (unsigned int)atoi(_string.c_str()); +} + +float __String::floatValue() const +{ + if (length() == 0) + { + return 0.0f; + } + return (float)utils::atof(_string.c_str()); +} + +double __String::doubleValue() const +{ + if (length() == 0) + { + return 0.0; + } + return utils::atof(_string.c_str()); +} + +bool __String::boolValue() const +{ + if (length() == 0) + { + return false; + } + + if (0 == strcmp(_string.c_str(), "0") || 0 == strcmp(_string.c_str(), "false")) + { + return false; + } + return true; +} + +const char* __String::getCString() const +{ + return _string.c_str(); +} + +int __String::length() const +{ + return static_cast(_string.length()); +} + +int __String::compare(const char * pStr) const +{ + return strcmp(getCString(), pStr); +} + +void __String::append(const std::string& str) +{ + _string.append(str); +} + +void __String::appendWithFormat(const char* format, ...) +{ + va_list ap; + va_start(ap, format); + + char* pBuf = (char*)malloc(kMaxStringLen); + if (pBuf != nullptr) + { + vsnprintf(pBuf, kMaxStringLen, format, ap); + _string.append(pBuf); + free(pBuf); + } + + va_end(ap); + +} + +__Array* __String::componentsSeparatedByString(const char *delimiter) +{ + __Array* result = __Array::create(); + std::string strTmp = _string; + size_t cutAt; + while( (cutAt = strTmp.find_first_of(delimiter)) != strTmp.npos ) + { + if(cutAt > 0) + { + result->addObject(__String::create(strTmp.substr(0, cutAt))); + } + strTmp = strTmp.substr(cutAt + 1); + } + + if(!strTmp.empty()) + { + result->addObject(__String::create(strTmp)); + } + + return result; +} + +bool __String::isEqual(const Ref* pObject) +{ + bool bRet = false; + const __String* pStr = dynamic_cast(pObject); + if (pStr != nullptr) + { + if (0 == _string.compare(pStr->_string)) + { + bRet = true; + } + } + return bRet; +} + +__String* __String::create(const std::string& str) +{ + __String* ret = new (std::nothrow) __String(str); + ret->autorelease(); + return ret; +} + +__String* __String::createWithData(const unsigned char* data, size_t nLen) +{ + __String* ret = nullptr; + if (data != nullptr) + { + char* pStr = (char*)malloc(nLen+1); + if (pStr != nullptr) + { + pStr[nLen] = '\0'; + if (nLen > 0) + { + memcpy(pStr, data, nLen); + } + + ret = __String::create(pStr); + free(pStr); + } + } + return ret; +} + +__String* __String::createWithFormat(const char* format, ...) +{ + __String* ret = __String::create(""); + va_list ap; + va_start(ap, format); + ret->initWithFormatAndValist(format, ap); + va_end(ap); + + return ret; +} + +__String* __String::createWithContentsOfFile(const std::string &filename) +{ + std::string str = FileUtils::getInstance()->getStringFromFile(filename); + return __String::create(std::move(str)); +} + +void __String::acceptVisitor(DataVisitor &visitor) +{ + visitor.visit(this); +} + +__String* __String::clone() const +{ + return __String::create(_string); +} + +NS_CC_END diff --git a/cocos/scripting/deprecated/CCString.h b/cocos/scripting/deprecated/CCString.h new file mode 100644 index 0000000000..9680a6ea9c --- /dev/null +++ b/cocos/scripting/deprecated/CCString.h @@ -0,0 +1,220 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2017 Chukong Technologies +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +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 __CCSTRING_H__ +#define __CCSTRING_H__ +/// @cond DO_NOT_SHOW + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) +#include +#endif + +#include +#include +#include +#include "scripting/deprecated/CCArray.h" +#include "base/CCRef.h" + +// We need to include `StringUtils::format()` and `StringUtils::toString()` +// for keeping the backward compatibility +#include "base/ccUTF8.h" + +NS_CC_BEGIN + +/** + * @addtogroup data_structures + * @{ + */ + +class CC_DLL __String : public Ref, public Clonable +{ +public: + /** + * @js NA + * @lua NA + */ + __String(); + /** + * @js NA + * @lua NA + */ + __String(const char* str); + /** + * @js NA + * @lua NA + */ + __String(const std::string& str); + /** + * @js NA + * @lua NA + */ + __String(const __String& str); + /** + * @js NA + * @lua NA + */ + virtual ~__String(); + + /* override assignment operator + * @js NA + * @lua NA + */ + __String& operator= (const __String& other); + + /** init a string with format, it's similar with the c function 'sprintf' + * @js NA + * @lua NA + */ + bool initWithFormat(const char* format, ...) CC_FORMAT_PRINTF(2, 3); + + /** convert to int value + * @js NA + */ + int intValue() const; + + /** convert to unsigned int value + * @js NA + */ + unsigned int uintValue() const; + + /** convert to float value + * @js NA + */ + float floatValue() const; + + /** convert to double value + * @js NA + */ + double doubleValue() const; + + /** convert to bool value + * @js NA + */ + bool boolValue() const; + + /** get the C string + * @js NA + */ + const char* getCString() const; + + /** get the length of string + * @js NA + */ + int length() const; + + /** compare to a c string + * @js NA + */ + int compare(const char *) const; + + /** append additional characters at the end of its current value + * @js NA + * @lua NA + */ + void append(const std::string& str); + + /** append(w/ format) additional characters at the end of its current value + * @js NA + * @lua NA + */ + void appendWithFormat(const char* format, ...); + + /** split a string + * @js NA + * @lua NA + */ + __Array* componentsSeparatedByString(const char *delimiter); + + /* override functions + * @js NA + */ + virtual bool isEqual(const Ref* pObject); + + /** create a string with std string, you can also pass a c string pointer because the default constructor of std::string can access a c string pointer. + * @return A String pointer which is an autorelease object pointer, + * it means that you needn't do a release operation unless you retain it. + * @js NA + */ + static __String* create(const std::string& str); + + /** create a string with format, it's similar with the c function 'sprintf', the default buffer size is (1024*100) bytes, + * if you want to change it, you should modify the kMax__StringLen macro in __String.cpp file. + * @return A String pointer which is an autorelease object pointer, + * it means that you needn't do a release operation unless you retain it. + * @js NA + */ + static __String* createWithFormat(const char* format, ...) CC_FORMAT_PRINTF(1, 2); + + /** create a string with binary data + * @return A String pointer which is an autorelease object pointer, + * it means that you needn't do a release operation unless you retain it. + * @js NA + */ + static __String* createWithData(const unsigned char* pData, size_t nLen); + + /** create a string with a file, + * @return A String pointer which is an autorelease object pointer, + * it means that you needn't do a release operation unless you retain it. + * @js NA + */ + static __String* createWithContentsOfFile(const std::string& filename); + /** + * @js NA + * @lua NA + */ + virtual void acceptVisitor(DataVisitor &visitor); + /** + * @js NA + * @lua NA + */ + virtual __String* clone() const override; + +private: + + /** only for internal use */ + bool initWithFormatAndValist(const char* format, va_list ap); + +public: + std::string _string; +}; + +struct StringCompare : public std::function { + public: + bool operator() (__String * a, __String * b) const { + return strcmp(a->getCString(), b->getCString()) < 0; + } +}; + +#define StringMake(str) String::create(str) +#define ccs StringMake + +// end of data_structure group +/// @} + +NS_CC_END + +/// @endcond +#endif //__CCSTRING_H__ diff --git a/cocos/scripting/deprecated/CMakeLists.txt b/cocos/scripting/deprecated/CMakeLists.txt new file mode 100644 index 0000000000..71c7868db8 --- /dev/null +++ b/cocos/scripting/deprecated/CMakeLists.txt @@ -0,0 +1,23 @@ +set(COCOS_DEPRECATED_HEADER + ../deprecated/CCDictionary.h + ../deprecated/CCDouble.h + ../deprecated/CCBool.h + ../deprecated/CCDeprecated.h + ../deprecated/CCNotificationCenter.h + ../deprecated/CCString.h + ../deprecated/CCFloat.h + ../deprecated/CCSet.h + ../deprecated/CCInteger.h + ../deprecated/CCArray.h + ../deprecated/CCDataVisitor.h + ) + +set(COCOS_DEPRECATED_SRC + ../deprecated/CCDictionary.cpp + ../deprecated/CCDeprecated.cpp + ../deprecated/CCNotificationCenter.cpp + ../deprecated/CCString.cpp + ../deprecated/CCSet.cpp + ../deprecated/CCArray.cpp + ../deprecated/CCDataVisitor.cpp + ) diff --git a/cocos/scripting/lua-bindings/CMakeLists.txt b/cocos/scripting/lua-bindings/CMakeLists.txt index 06fbe5b9bd..08d1becb86 100644 --- a/cocos/scripting/lua-bindings/CMakeLists.txt +++ b/cocos/scripting/lua-bindings/CMakeLists.txt @@ -3,8 +3,6 @@ set(cocos_root ${COCOS2DX_ROOT_PATH}) set(lua_bindings_manual_headers manual/CCComponentLua.h manual/3d/lua_cocos2dx_3d_manual.h - manual/cocosbuilder/CCBProxy.h - manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.h manual/CCLuaStack.h manual/CCLuaEngine.h manual/lua_module_register.h @@ -24,7 +22,6 @@ set(lua_bindings_manual_headers manual/navmesh/lua_cocos2dx_navmesh_manual.h manual/navmesh/lua_cocos2dx_navmesh_conversions.h manual/cocos2d/lua_cocos2dx_deprecated.h - manual/cocos2d/LuaOpengl.h manual/cocos2d/LuaScriptHandlerMgr.h manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.h manual/Cocos2dxLuaLoader.h @@ -36,7 +33,7 @@ set(lua_bindings_manual_headers manual/ui/lua_cocos2dx_experimental_video_manual.hpp manual/controller/lua_cocos2dx_controller_manual.hpp ) - +#TOTO minggo set(lua_bindings_manual_files manual/CCLuaBridge.cpp manual/CCLuaEngine.cpp @@ -47,16 +44,13 @@ set(lua_bindings_manual_files manual/lua_module_register.cpp manual/tolua_fix.cpp manual/CCComponentLua.cpp - manual/cocos2d/LuaOpengl.cpp manual/cocos2d/LuaScriptHandlerMgr.cpp manual/cocos2d/lua_cocos2dx_deprecated.cpp manual/cocos2d/lua_cocos2dx_experimental_manual.cpp manual/cocos2d/lua_cocos2dx_manual.cpp manual/cocos2d/lua_cocos2dx_physics_manual.cpp manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.cpp - manual/3d/lua_cocos2dx_3d_manual.cpp - manual/cocosbuilder/CCBProxy.cpp - manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.cpp + #manual/3d/lua_cocos2dx_3d_manual.cpp manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.cpp manual/cocostudio/CustomGUIReader.cpp manual/cocostudio/lua_cocos2dx_coco_studio_manual.cpp @@ -69,12 +63,12 @@ set(lua_bindings_manual_files manual/network/Lua_web_socket.cpp manual/network/lua_xml_http_request.cpp manual/network/lua_downloader.cpp - manual/spine/lua_cocos2dx_spine_manual.cpp + #manual/spine/lua_cocos2dx_spine_manual.cpp manual/spine/LuaSkeletonAnimation.cpp manual/ui/lua_cocos2dx_experimental_video_manual.cpp manual/ui/lua_cocos2dx_ui_manual.cpp manual/audioengine/lua_cocos2dx_audioengine_manual.cpp - manual/physics3d/lua_cocos2dx_physics3d_manual.cpp + #manual/physics3d/lua_cocos2dx_physics3d_manual.cpp manual/navmesh/lua_cocos2dx_navmesh_conversions.cpp manual/navmesh/lua_cocos2dx_navmesh_manual.cpp ) @@ -96,25 +90,23 @@ set(lua_bindings_auto_headers auto/lua_cocos2dx_ui_auto.hpp auto/lua_cocos2dx_physics_auto.hpp auto/lua_cocos2dx_extension_auto.hpp - auto/lua_cocos2dx_cocosbuilder_auto.hpp ) set(lua_bindings_auto_files - auto/lua_cocos2dx_3d_auto.cpp + #auto/lua_cocos2dx_3d_auto.cpp auto/lua_cocos2dx_auto.cpp - auto/lua_cocos2dx_cocosbuilder_auto.cpp auto/lua_cocos2dx_cocosdenshion_auto.cpp auto/lua_cocos2dx_controller_auto.cpp auto/lua_cocos2dx_experimental_auto.cpp auto/lua_cocos2dx_experimental_video_auto.cpp - auto/lua_cocos2dx_extension_auto.cpp + #auto/lua_cocos2dx_extension_auto.cpp auto/lua_cocos2dx_physics_auto.cpp - auto/lua_cocos2dx_spine_auto.cpp + #auto/lua_cocos2dx_spine_auto.cpp auto/lua_cocos2dx_studio_auto.cpp auto/lua_cocos2dx_csloader_auto.cpp auto/lua_cocos2dx_ui_auto.cpp auto/lua_cocos2dx_audioengine_auto.cpp - auto/lua_cocos2dx_physics3d_auto.cpp + #auto/lua_cocos2dx_physics3d_auto.cpp auto/lua_cocos2dx_navmesh_auto.cpp ) @@ -153,13 +145,17 @@ elseif(ANDROID) ) endif() +include(../deprecated/CMakeLists.txt) + set(lua_bindings_files ${lua_bindings_manual_files} ${lua_bindings_auto_files} + ${COCOS_DEPRECATED_SRC} ) set(lua_bindings_headers ${lua_bindings_manual_headers} ${lua_bindings_auto_headers} + ${COCOS_DEPRECATED_HEADER} ) list(APPEND lua_bindings_files ${lua_bindings_headers}) diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index a1a62828ca..da52bd2d54 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -2495,56 +2495,7 @@ int lua_cocos2dx_3d_Mesh_isVisible(lua_State* tolua_S) return 0; } -int lua_cocos2dx_3d_Mesh_setGLProgramState(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_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, "cc.Mesh:setGLProgramState"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_setGLProgramState'", nullptr); - return 0; - } - cobj->setGLProgramState(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:setGLProgramState",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_setGLProgramState'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_3d_Mesh_setVisible(lua_State* tolua_S) { int argc = 0; @@ -2660,7 +2611,6 @@ int lua_register_cocos2dx_3d_Mesh(lua_State* tolua_S) tolua_function(tolua_S,"setForce2DQueue",lua_cocos2dx_3d_Mesh_setForce2DQueue); tolua_function(tolua_S,"setSkin",lua_cocos2dx_3d_Mesh_setSkin); tolua_function(tolua_S,"isVisible",lua_cocos2dx_3d_Mesh_isVisible); - tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_3d_Mesh_setGLProgramState); tolua_function(tolua_S,"setVisible",lua_cocos2dx_3d_Mesh_setVisible); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Mesh).name(); @@ -3694,7 +3644,7 @@ int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); return 0; } - cobj->setCullFace(arg0); +// cobj->setCullFace(arg0); lua_settop(tolua_S, 1); return 1; } @@ -5073,8 +5023,8 @@ int lua_cocos2dx_3d_Sprite3DMaterial_createWithGLStateProgram(lua_State* tolua_S tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3DMaterial_createWithGLStateProgram'", nullptr); return 0; } - cocos2d::Sprite3DMaterial* ret = cocos2d::Sprite3DMaterial::createWithGLStateProgram(arg0); - object_to_luaval(tolua_S, "cc.Sprite3DMaterial",(cocos2d::Sprite3DMaterial*)ret); +// cocos2d::Sprite3DMaterial* ret = cocos2d::Sprite3DMaterial::createWithGLStateProgram(arg0); +// object_to_luaval(tolua_S, "cc.Sprite3DMaterial",(cocos2d::Sprite3DMaterial*)ret); return 1; } luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite3DMaterial:createWithGLStateProgram",argc, 1); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index d3520ecdf7..f7be1eb05b 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -840,53 +840,7 @@ int lua_cocos2dx_Texture2D_getMaxS(lua_State* tolua_S) 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Texture2D_releaseGLTexture'", nullptr); - return 0; - } - cobj->releaseGLTexture(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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; @@ -1450,56 +1404,7 @@ int lua_cocos2dx_Texture2D_getPath(lua_State* tolua_S) 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Texture2D_drawInRect'", nullptr); - return 0; - } - cobj->drawInRect(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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; @@ -1735,53 +1640,7 @@ int lua_cocos2dx_Texture2D_getAlphaTexture(lua_State* tolua_S) 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Texture2D_getDescription'", nullptr); - return 0; - } - std::string ret = cobj->getDescription(); - lua_pushlstring(tolua_S,ret.c_str(),ret.length()); - return 1; - } - luaL_error(tolua_S, "%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; @@ -1829,56 +1688,7 @@ int lua_cocos2dx_Texture2D_getPixelFormat(lua_State* tolua_S) 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, "cc.Texture2D:setGLProgram"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Texture2D_setGLProgram'", nullptr); - return 0; - } - cobj->setGLProgram(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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; @@ -1973,103 +1783,7 @@ int lua_cocos2dx_Texture2D_getPixelsWide(lua_State* tolua_S) 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Texture2D_drawAtPoint'", nullptr); - return 0; - } - cobj->drawAtPoint(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Texture2D_getGLProgram'", nullptr); - return 0; - } - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - luaL_error(tolua_S, "%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; @@ -2292,7 +2006,6 @@ int lua_register_cocos2dx_Texture2D(lua_State* tolua_S) 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,"getAlphaTextureName",lua_cocos2dx_Texture2D_getAlphaTextureName); @@ -2301,19 +2014,14 @@ int lua_register_cocos2dx_Texture2D(lua_State* tolua_S) tolua_function(tolua_S,"initWithString",lua_cocos2dx_Texture2D_initWithString); tolua_function(tolua_S,"setMaxT",lua_cocos2dx_Texture2D_setMaxT); tolua_function(tolua_S,"getPath",lua_cocos2dx_Texture2D_getPath); - 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,"getAlphaTexture",lua_cocos2dx_Texture2D_getAlphaTexture); - 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); @@ -4113,56 +3821,7 @@ int lua_cocos2dx_Node_removeComponent(lua_State* tolua_S) 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, "cc.Node:setPhysicsBody"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setPhysicsBody'", nullptr); - return 0; - } - cobj->setPhysicsBody(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node: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; @@ -5317,53 +4976,7 @@ int lua_cocos2dx_Node_getTag(lua_State* tolua_S) 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_getGLProgram'", nullptr); - return 0; - } - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - luaL_error(tolua_S, "%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; @@ -5719,56 +5332,7 @@ int lua_cocos2dx_Node_setSkewX(lua_State* tolua_S) 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, "cc.Node:setGLProgramState"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setGLProgramState'", nullptr); - return 0; - } - cobj->setGLProgramState(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node: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; @@ -7215,56 +6779,7 @@ int lua_cocos2dx_Node_updateTransform(lua_State* tolua_S) 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, "cc.Node:setGLProgram"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); - return 0; - } - cobj->setGLProgram(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node: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; @@ -7615,53 +7130,7 @@ int lua_cocos2dx_Node_getRotation(lua_State* tolua_S) 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_getPhysicsBody'", nullptr); - return 0; - } - cocos2d::PhysicsBody* ret = cobj->getPhysicsBody(); - object_to_luaval(tolua_S, "cc.PhysicsBody",(cocos2d::PhysicsBody*)ret); - return 1; - } - luaL_error(tolua_S, "%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_getAnchorPointInPoints(lua_State* tolua_S) { int argc = 0; @@ -7776,53 +7245,7 @@ int lua_cocos2dx_Node_removeChildByName(lua_State* tolua_S) 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_getGLProgramState'", nullptr); - return 0; - } - cocos2d::GLProgramState* ret = cobj->getGLProgramState(); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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; @@ -10974,7 +10397,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"new",lua_cocos2dx_Node_constructor); 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); @@ -10998,7 +10420,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) 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); @@ -11006,7 +10427,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) 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,"stopActionsByFlags",lua_cocos2dx_Node_stopActionsByFlags); tolua_function(tolua_S,"setNormalizedPosition",lua_cocos2dx_Node_setNormalizedPosition); @@ -11036,7 +10456,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) 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); @@ -11044,10 +10463,8 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"runAction",lua_cocos2dx_Node_runAction); tolua_function(tolua_S,"visit",lua_cocos2dx_Node_visit); tolua_function(tolua_S,"getRotation",lua_cocos2dx_Node_getRotation); - tolua_function(tolua_S,"getPhysicsBody",lua_cocos2dx_Node_getPhysicsBody); tolua_function(tolua_S,"getAnchorPointInPoints",lua_cocos2dx_Node_getAnchorPointInPoints); 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); @@ -11118,54 +10535,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) g_typeCast["Node"] = "cc.Node"; return 1; } - -int lua_cocos2dx_Scene_initWithPhysics(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_initWithPhysics'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_initWithPhysics'", nullptr); - return 0; - } - bool ret = cobj->initWithPhysics(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:initWithPhysics",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_initWithPhysics'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Scene_setCameraOrderDirty(lua_State* tolua_S) { int argc = 0; @@ -11234,29 +10603,6 @@ int lua_cocos2dx_Scene_render(lua_State* tolua_S) } #endif argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 4) { - cocos2d::Renderer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0, "cc.Scene:render"); - - if (!ok) { break; } - const cocos2d::Mat4* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Mat4",&arg1, "cc.Scene:render"); - - if (!ok) { break; } - const cocos2d::Mat4* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Mat4",&arg2, "cc.Scene:render"); - - if (!ok) { break; } - unsigned int arg3; - ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.Scene:render"); - - if (!ok) { break; } - cobj->render(arg0, arg1, arg2, arg3); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); ok = true; do{ if (argc == 2) { @@ -11304,56 +10650,7 @@ int lua_cocos2dx_Scene_render(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Scene_stepPhysicsAndNavigation(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_stepPhysicsAndNavigation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Scene:stepPhysicsAndNavigation"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_stepPhysicsAndNavigation'", nullptr); - return 0; - } - cobj->stepPhysicsAndNavigation(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:stepPhysicsAndNavigation",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_stepPhysicsAndNavigation'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Scene_onProjectionChanged(lua_State* tolua_S) { int argc = 0; @@ -11404,53 +10701,7 @@ int lua_cocos2dx_Scene_onProjectionChanged(lua_State* tolua_S) return 0; } -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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_getPhysicsWorld'", nullptr); - return 0; - } - cocos2d::PhysicsWorld* ret = cobj->getPhysicsWorld(); - object_to_luaval(tolua_S, "cc.PhysicsWorld",(cocos2d::PhysicsWorld*)ret); - return 1; - } - luaL_error(tolua_S, "%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_initWithSize(lua_State* tolua_S) { int argc = 0; @@ -11618,40 +10869,7 @@ int lua_cocos2dx_Scene_create(lua_State* tolua_S) #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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_createWithPhysics'", nullptr); - return 0; - } - cocos2d::Scene* ret = cocos2d::Scene::createWithPhysics(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene: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; -} int lua_cocos2dx_Scene_constructor(lua_State* tolua_S) { int argc = 0; @@ -11702,17 +10920,12 @@ int lua_register_cocos2dx_Scene(lua_State* tolua_S) tolua_beginmodule(tolua_S,"Scene"); tolua_function(tolua_S,"new",lua_cocos2dx_Scene_constructor); - tolua_function(tolua_S,"initWithPhysics",lua_cocos2dx_Scene_initWithPhysics); tolua_function(tolua_S,"setCameraOrderDirty",lua_cocos2dx_Scene_setCameraOrderDirty); tolua_function(tolua_S,"render",lua_cocos2dx_Scene_render); - tolua_function(tolua_S,"stepPhysicsAndNavigation",lua_cocos2dx_Scene_stepPhysicsAndNavigation); - tolua_function(tolua_S,"onProjectionChanged",lua_cocos2dx_Scene_onProjectionChanged); - tolua_function(tolua_S,"getPhysicsWorld",lua_cocos2dx_Scene_getPhysicsWorld); tolua_function(tolua_S,"initWithSize",lua_cocos2dx_Scene_initWithSize); tolua_function(tolua_S,"getDefaultCamera",lua_cocos2dx_Scene_getDefaultCamera); tolua_function(tolua_S,"createWithSize", lua_cocos2dx_Scene_createWithSize); tolua_function(tolua_S,"create", lua_cocos2dx_Scene_create); - tolua_function(tolua_S,"createWithPhysics", lua_cocos2dx_Scene_createWithPhysics); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Scene).name(); g_luaType[typeName] = "cc.Scene"; @@ -12061,53 +11274,7 @@ int lua_cocos2dx_GLView_getSafeAreaRect(lua_State* tolua_S) return 0; } -int lua_cocos2dx_GLView_getVR(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_getVR'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_getVR'", nullptr); - return 0; - } - cocos2d::VRIRenderer* ret = cobj->getVR(); - object_to_luaval(tolua_S, "cc.VRIRenderer",(cocos2d::VRIRenderer*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:getVR",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_getVR'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_GLView_setScissorInPoints(lua_State* tolua_S) { int argc = 0; @@ -13042,56 +12209,7 @@ int lua_cocos2dx_GLView_renderScene(lua_State* tolua_S) return 0; } -int lua_cocos2dx_GLView_setVR(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLView* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLView",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLView*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLView_setVR'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::VRIRenderer* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.VRIRenderer",&arg0, "cc.GLView:setVR"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLView_setVR'", nullptr); - return 0; - } - cobj->setVR(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLView:setVR",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLView_setVR'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_GLView_setViewPortInPoints(lua_State* tolua_S) { int argc = 0; @@ -13573,7 +12691,6 @@ int lua_register_cocos2dx_GLView(lua_State* tolua_S) tolua_function(tolua_S,"getContentScaleFactor",lua_cocos2dx_GLView_getContentScaleFactor); tolua_function(tolua_S,"setIMEKeyboardState",lua_cocos2dx_GLView_setIMEKeyboardState); tolua_function(tolua_S,"getSafeAreaRect",lua_cocos2dx_GLView_getSafeAreaRect); - tolua_function(tolua_S,"getVR",lua_cocos2dx_GLView_getVR); tolua_function(tolua_S,"setScissorInPoints",lua_cocos2dx_GLView_setScissorInPoints); tolua_function(tolua_S,"getViewName",lua_cocos2dx_GLView_getViewName); tolua_function(tolua_S,"isOpenGLReady",lua_cocos2dx_GLView_isOpenGLReady); @@ -13593,7 +12710,6 @@ int lua_register_cocos2dx_GLView(lua_State* tolua_S) tolua_function(tolua_S,"endToLua",lua_cocos2dx_GLView_end); tolua_function(tolua_S,"isRetinaDisplay",lua_cocos2dx_GLView_isRetinaDisplay); tolua_function(tolua_S,"renderScene",lua_cocos2dx_GLView_renderScene); - tolua_function(tolua_S,"setVR",lua_cocos2dx_GLView_setVR); tolua_function(tolua_S,"setViewPortInPoints",lua_cocos2dx_GLView_setViewPortInPoints); tolua_function(tolua_S,"getScissorRect",lua_cocos2dx_GLView_getScissorRect); tolua_function(tolua_S,"getRetinaFactor",lua_cocos2dx_GLView_getRetinaFactor); @@ -13658,106 +12774,8 @@ int lua_cocos2dx_Director_pause(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Director_pushProjectionMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_pushProjectionMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Director:pushProjectionMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_pushProjectionMatrix'", nullptr); - return 0; - } - cobj->pushProjectionMatrix(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:pushProjectionMatrix",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_pushProjectionMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_popProjectionMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_popProjectionMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Director:popProjectionMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_popProjectionMatrix'", nullptr); - return 0; - } - cobj->popProjectionMatrix(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:popProjectionMatrix",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_popProjectionMatrix'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Director_setEventDispatcher(lua_State* tolua_S) { int argc = 0; @@ -13808,56 +12826,7 @@ int lua_cocos2dx_Director_setEventDispatcher(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Director_loadProjectionIdentityMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_loadProjectionIdentityMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Director:loadProjectionIdentityMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_loadProjectionIdentityMatrix'", nullptr); - return 0; - } - cobj->loadProjectionIdentityMatrix(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:loadProjectionIdentityMatrix",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_loadProjectionIdentityMatrix'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Director_setContentScaleFactor(lua_State* tolua_S) { int argc = 0; @@ -15064,59 +14033,7 @@ int lua_cocos2dx_Director_setScheduler(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Director_multiplyProjectionMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_multiplyProjectionMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Mat4 arg0; - unsigned int arg1; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Director:multiplyProjectionMatrix"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.Director:multiplyProjectionMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_multiplyProjectionMatrix'", nullptr); - return 0; - } - cobj->multiplyProjectionMatrix(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:multiplyProjectionMatrix",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_multiplyProjectionMatrix'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Director_getMatrix(lua_State* tolua_S) { int argc = 0; @@ -16566,109 +15483,6 @@ int lua_cocos2dx_Director_getVisibleSize(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Director_loadProjectionMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_loadProjectionMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Mat4 arg0; - unsigned int arg1; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Director:loadProjectionMatrix"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.Director:loadProjectionMatrix"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_loadProjectionMatrix'", nullptr); - return 0; - } - cobj->loadProjectionMatrix(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:loadProjectionMatrix",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_loadProjectionMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Director_initProjectionMatrixStack(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Director* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Director",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_initProjectionMatrixStack'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Director:initProjectionMatrixStack"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_initProjectionMatrixStack'", nullptr); - return 0; - } - cobj->initProjectionMatrixStack(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:initProjectionMatrixStack",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_initProjectionMatrixStack'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Director_getScheduler(lua_State* tolua_S) { int argc = 0; @@ -17151,10 +15965,7 @@ int lua_register_cocos2dx_Director(lua_State* tolua_S) tolua_beginmodule(tolua_S,"Director"); tolua_function(tolua_S,"pause",lua_cocos2dx_Director_pause); - tolua_function(tolua_S,"pushProjectionMatrix",lua_cocos2dx_Director_pushProjectionMatrix); - tolua_function(tolua_S,"popProjectionMatrix",lua_cocos2dx_Director_popProjectionMatrix); tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Director_setEventDispatcher); - tolua_function(tolua_S,"loadProjectionIdentityMatrix",lua_cocos2dx_Director_loadProjectionIdentityMatrix); tolua_function(tolua_S,"setContentScaleFactor",lua_cocos2dx_Director_setContentScaleFactor); tolua_function(tolua_S,"getDeltaTime",lua_cocos2dx_Director_getDeltaTime); tolua_function(tolua_S,"getContentScaleFactor",lua_cocos2dx_Director_getContentScaleFactor); @@ -17180,7 +15991,6 @@ int lua_register_cocos2dx_Director(lua_State* tolua_S) tolua_function(tolua_S,"setDefaultValues",lua_cocos2dx_Director_setDefaultValues); tolua_function(tolua_S,"init",lua_cocos2dx_Director_init); tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Director_setScheduler); - tolua_function(tolua_S,"multiplyProjectionMatrix",lua_cocos2dx_Director_multiplyProjectionMatrix); tolua_function(tolua_S,"getMatrix",lua_cocos2dx_Director_getMatrix); tolua_function(tolua_S,"isValid",lua_cocos2dx_Director_isValid); tolua_function(tolua_S,"startAnimation",lua_cocos2dx_Director_startAnimation); @@ -17211,8 +16021,6 @@ int lua_register_cocos2dx_Director(lua_State* tolua_S) tolua_function(tolua_S,"setNextDeltaTimeZero",lua_cocos2dx_Director_setNextDeltaTimeZero); tolua_function(tolua_S,"popMatrix",lua_cocos2dx_Director_popMatrix); tolua_function(tolua_S,"getVisibleSize",lua_cocos2dx_Director_getVisibleSize); - tolua_function(tolua_S,"loadProjectionMatrix",lua_cocos2dx_Director_loadProjectionMatrix); - tolua_function(tolua_S,"initProjectionMatrixStack",lua_cocos2dx_Director_initProjectionMatrixStack); tolua_function(tolua_S,"getScheduler",lua_cocos2dx_Director_getScheduler); tolua_function(tolua_S,"pushScene",lua_cocos2dx_Director_pushScene); tolua_function(tolua_S,"getAnimationInterval",lua_cocos2dx_Director_getAnimationInterval); @@ -20247,53 +19055,7 @@ int lua_cocos2dx_Image_getNumberOfMipmaps(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Image_getRenderFormat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Image* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getRenderFormat'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Image_getRenderFormat'", nullptr); - return 0; - } - int ret = (int)cobj->getRenderFormat(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:getRenderFormat",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getRenderFormat'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(lua_State* tolua_S) { int argc = 0; @@ -20427,7 +19189,6 @@ int lua_register_cocos2dx_Image(lua_State* tolua_S) tolua_function(tolua_S,"getFileType",lua_cocos2dx_Image_getFileType); tolua_function(tolua_S,"getFilePath",lua_cocos2dx_Image_getFilePath); tolua_function(tolua_S,"getNumberOfMipmaps",lua_cocos2dx_Image_getNumberOfMipmaps); - tolua_function(tolua_S,"getRenderFormat",lua_cocos2dx_Image_getRenderFormat); tolua_function(tolua_S,"setPVRImagesHavePremultipliedAlpha", lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha); tolua_function(tolua_S,"setPNGPremultipliedAlphaEnabled", lua_cocos2dx_Image_setPNGPremultipliedAlphaEnabled); tolua_endmodule(tolua_S); @@ -20437,1640 +19198,6 @@ int lua_register_cocos2dx_Image(lua_State* tolua_S) return 1; } -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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'", nullptr); - return 0; - } - unsigned int ret = cobj->getVertexAttribsFlags(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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_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); - lua_settop(tolua_S, 1); - return 1; - } - }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); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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_applyAutoBinding(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_applyAutoBinding'", 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.GLProgramState:applyAutoBinding"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgramState:applyAutoBinding"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_applyAutoBinding'", nullptr); - return 0; - } - cobj->applyAutoBinding(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyAutoBinding",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyAutoBinding'.",&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); - lua_settop(tolua_S, 1); - return 1; - } - }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); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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_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); - lua_settop(tolua_S, 1); - return 1; - } - }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); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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_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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_apply'", nullptr); - return 0; - } - cobj->apply(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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_getNodeBinding(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_getNodeBinding'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_getNodeBinding'", nullptr); - return 0; - } - cocos2d::Node* ret = cobj->getNodeBinding(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getNodeBinding",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getNodeBinding'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec4v(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_setUniformVec4v'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 3) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec4v"); - - if (!ok) { break; } - ssize_t arg1; - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4v"); - - if (!ok) { break; } - const cocos2d::Vec4* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec4",&arg2, "cc.GLProgramState:setUniformVec4v"); - - if (!ok) { break; } - cobj->setUniformVec4v(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec4v"); - - if (!ok) { break; } - ssize_t arg1; - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4v"); - - if (!ok) { break; } - const cocos2d::Vec4* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec4",&arg2, "cc.GLProgramState:setUniformVec4v"); - - if (!ok) { break; } - cobj->setUniformVec4v(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec4v",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec4v'.",&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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_applyGLProgram'", nullptr); - return 0; - } - cobj->applyGLProgram(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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_setNodeBinding(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_setNodeBinding'", 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, "cc.GLProgramState:setNodeBinding"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_setNodeBinding'", nullptr); - return 0; - } - cobj->setNodeBinding(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setNodeBinding",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setNodeBinding'.",&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); - lua_settop(tolua_S, 1); - return 1; - } - }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); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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_setParameterAutoBinding(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_setParameterAutoBinding'", 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.GLProgramState:setParameterAutoBinding"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgramState:setParameterAutoBinding"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_setParameterAutoBinding'", nullptr); - return 0; - } - cobj->setParameterAutoBinding(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setParameterAutoBinding",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setParameterAutoBinding'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec2v(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_setUniformVec2v'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 3) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec2v"); - - if (!ok) { break; } - ssize_t arg1; - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2v"); - - if (!ok) { break; } - const cocos2d::Vec2* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec2",&arg2, "cc.GLProgramState:setUniformVec2v"); - - if (!ok) { break; } - cobj->setUniformVec2v(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec2v"); - - if (!ok) { break; } - ssize_t arg1; - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2v"); - - if (!ok) { break; } - const cocos2d::Vec2* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec2",&arg2, "cc.GLProgramState:setUniformVec2v"); - - if (!ok) { break; } - cobj->setUniformVec2v(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec2v",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec2v'.",&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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_getUniformCount'", nullptr); - return 0; - } - ssize_t ret = cobj->getUniformCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_applyAttributes'", nullptr); - return 0; - } - cobj->applyAttributes(); - lua_settop(tolua_S, 1); - return 1; - } - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLProgramState:applyAttributes"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_applyAttributes'", nullptr); - return 0; - } - cobj->applyAttributes(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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_clone(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_clone'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_clone'", nullptr); - return 0; - } - cocos2d::GLProgramState* ret = cobj->clone(); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:clone",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_clone'.",&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, "cc.GLProgramState:setGLProgram"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_setGLProgram'", nullptr); - return 0; - } - cobj->setGLProgram(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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_setUniformFloatv(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_setUniformFloatv'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 3) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformFloatv"); - - if (!ok) { break; } - ssize_t arg1; - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformFloatv"); - - if (!ok) { break; } - const float* arg2; - #pragma warning NO CONVERSION TO NATIVE FOR float* - ok = false; - - if (!ok) { break; } - cobj->setUniformFloatv(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformFloatv"); - - if (!ok) { break; } - ssize_t arg1; - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformFloatv"); - - if (!ok) { break; } - const float* arg2; - #pragma warning NO CONVERSION TO NATIVE FOR float* - ok = false; - - if (!ok) { break; } - cobj->setUniformFloatv(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformFloatv",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformFloatv'.",&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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_getGLProgram'", nullptr); - return 0; - } - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - luaL_error(tolua_S, "%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_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) { - 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, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - }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, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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_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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_applyUniforms'", nullptr); - return 0; - } - cobj->applyUniforms(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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_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); - lua_settop(tolua_S, 1); - return 1; - } - }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); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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_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); - lua_settop(tolua_S, 1); - return 1; - } - }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); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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_setUniformVec3v(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_setUniformVec3v'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 3) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec3v"); - - if (!ok) { break; } - ssize_t arg1; - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3v"); - - if (!ok) { break; } - const cocos2d::Vec3* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec3",&arg2, "cc.GLProgramState:setUniformVec3v"); - - if (!ok) { break; } - cobj->setUniformVec3v(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec3v"); - - if (!ok) { break; } - ssize_t arg1; - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3v"); - - if (!ok) { break; } - const cocos2d::Vec3* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec3",&arg2, "cc.GLProgramState:setUniformVec3v"); - - if (!ok) { break; } - cobj->setUniformVec3v(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec3v",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec3v'.",&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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'", nullptr); - return 0; - } - ssize_t ret = cobj->getVertexAttribCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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_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, "cc.GLProgramState:create"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_create'", nullptr); - return 0; - } - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::create(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.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; - - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithGLProgramName"); - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.GLProgramState:getOrCreateWithGLProgramName"); - if (!ok) { break; } - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0, arg1); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithGLProgramName"); - if (!ok) { break; } - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "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, "cc.GLProgramState:getOrCreateWithGLProgram"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram'", nullptr); - return 0; - } - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgram(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.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; -} -int lua_cocos2dx_GLProgramState_getOrCreateWithShaders(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 == 3) - { - std::string arg0; - std::string arg1; - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithShaders"); - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgramState:getOrCreateWithShaders"); - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.GLProgramState:getOrCreateWithShaders"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_getOrCreateWithShaders'", nullptr); - return 0; - } - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithShaders(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithShaders",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithShaders'.",&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,"getVertexAttribsFlags",lua_cocos2dx_GLProgramState_getVertexAttribsFlags); - tolua_function(tolua_S,"setUniformVec4",lua_cocos2dx_GLProgramState_setUniformVec4); - tolua_function(tolua_S,"applyAutoBinding",lua_cocos2dx_GLProgramState_applyAutoBinding); - tolua_function(tolua_S,"setUniformVec2",lua_cocos2dx_GLProgramState_setUniformVec2); - tolua_function(tolua_S,"setUniformVec3",lua_cocos2dx_GLProgramState_setUniformVec3); - tolua_function(tolua_S,"apply",lua_cocos2dx_GLProgramState_apply); - tolua_function(tolua_S,"getNodeBinding",lua_cocos2dx_GLProgramState_getNodeBinding); - tolua_function(tolua_S,"setUniformVec4v",lua_cocos2dx_GLProgramState_setUniformVec4v); - tolua_function(tolua_S,"applyGLProgram",lua_cocos2dx_GLProgramState_applyGLProgram); - tolua_function(tolua_S,"setNodeBinding",lua_cocos2dx_GLProgramState_setNodeBinding); - tolua_function(tolua_S,"setUniformInt",lua_cocos2dx_GLProgramState_setUniformInt); - tolua_function(tolua_S,"setParameterAutoBinding",lua_cocos2dx_GLProgramState_setParameterAutoBinding); - tolua_function(tolua_S,"setUniformVec2v",lua_cocos2dx_GLProgramState_setUniformVec2v); - tolua_function(tolua_S,"getUniformCount",lua_cocos2dx_GLProgramState_getUniformCount); - tolua_function(tolua_S,"applyAttributes",lua_cocos2dx_GLProgramState_applyAttributes); - tolua_function(tolua_S,"clone",lua_cocos2dx_GLProgramState_clone); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_GLProgramState_setGLProgram); - tolua_function(tolua_S,"setUniformFloatv",lua_cocos2dx_GLProgramState_setUniformFloatv); - tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramState_getGLProgram); - tolua_function(tolua_S,"setUniformTexture",lua_cocos2dx_GLProgramState_setUniformTexture); - tolua_function(tolua_S,"applyUniforms",lua_cocos2dx_GLProgramState_applyUniforms); - tolua_function(tolua_S,"setUniformFloat",lua_cocos2dx_GLProgramState_setUniformFloat); - tolua_function(tolua_S,"setUniformMat4",lua_cocos2dx_GLProgramState_setUniformMat4); - tolua_function(tolua_S,"setUniformVec3v",lua_cocos2dx_GLProgramState_setUniformVec3v); - tolua_function(tolua_S,"getVertexAttribCount",lua_cocos2dx_GLProgramState_getVertexAttribCount); - 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_function(tolua_S,"getOrCreateWithShaders", lua_cocos2dx_GLProgramState_getOrCreateWithShaders); - 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_PolygonInfo_getFilename(lua_State* tolua_S) { int argc = 0; @@ -44332,103 +41459,8 @@ int lua_cocos2dx_CallFunc_execute(lua_State* tolua_S) return 0; } -int lua_cocos2dx_CallFunc_getTargetCallback(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::CallFunc* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CallFunc",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::CallFunc*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CallFunc_getTargetCallback'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CallFunc_getTargetCallback'", nullptr); - return 0; - } - cocos2d::Ref* ret = cobj->getTargetCallback(); - object_to_luaval(tolua_S, "cc.Ref",(cocos2d::Ref*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CallFunc:getTargetCallback",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CallFunc_getTargetCallback'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_CallFunc_setTargetCallback(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::CallFunc* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CallFunc",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::CallFunc*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CallFunc_setTargetCallback'", 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, "cc.CallFunc:setTargetCallback"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CallFunc_setTargetCallback'", nullptr); - return 0; - } - cobj->setTargetCallback(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CallFunc:setTargetCallback",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CallFunc_setTargetCallback'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_CallFunc_constructor(lua_State* tolua_S) { int argc = 0; @@ -44480,8 +41512,6 @@ int lua_register_cocos2dx_CallFunc(lua_State* tolua_S) tolua_beginmodule(tolua_S,"CallFunc"); tolua_function(tolua_S,"new",lua_cocos2dx_CallFunc_constructor); tolua_function(tolua_S,"execute",lua_cocos2dx_CallFunc_execute); - tolua_function(tolua_S,"getTargetCallback",lua_cocos2dx_CallFunc_getTargetCallback); - tolua_function(tolua_S,"setTargetCallback",lua_cocos2dx_CallFunc_setTargetCallback); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::CallFunc).name(); g_luaType[typeName] = "cc.CallFunc"; @@ -53306,59 +50336,7 @@ int lua_cocos2dx_DrawNode_setLineWidth(lua_State* tolua_S) return 0; } -int lua_cocos2dx_DrawNode_onDrawGLPoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::DrawNode* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_onDrawGLPoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Mat4 arg0; - unsigned int arg1; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.DrawNode:onDrawGLPoint"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.DrawNode:onDrawGLPoint"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_DrawNode_onDrawGLPoint'", nullptr); - return 0; - } - cobj->onDrawGLPoint(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:onDrawGLPoint",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_onDrawGLPoint'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_DrawNode_drawDot(lua_State* tolua_S) { int argc = 0; @@ -53521,59 +50499,7 @@ int lua_cocos2dx_DrawNode_getBlendFunc(lua_State* tolua_S) return 0; } -int lua_cocos2dx_DrawNode_onDraw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::DrawNode* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_onDraw'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Mat4 arg0; - unsigned int arg1; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.DrawNode:onDraw"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.DrawNode:onDraw"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_DrawNode_onDraw'", nullptr); - return 0; - } - cobj->onDraw(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:onDraw",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_onDraw'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_DrawNode_drawCircle(lua_State* tolua_S) { int argc = 0; @@ -53739,59 +50665,7 @@ int lua_cocos2dx_DrawNode_drawQuadBezier(lua_State* tolua_S) return 0; } -int lua_cocos2dx_DrawNode_onDrawGLLine(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::DrawNode* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_onDrawGLLine'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Mat4 arg0; - unsigned int arg1; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.DrawNode:onDrawGLLine"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.DrawNode:onDrawGLLine"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_DrawNode_onDrawGLLine'", nullptr); - return 0; - } - cobj->onDrawGLLine(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:onDrawGLLine",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_onDrawGLLine'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_DrawNode_drawTriangle(lua_State* tolua_S) { int argc = 0; @@ -54338,14 +51212,11 @@ int lua_register_cocos2dx_DrawNode(lua_State* tolua_S) tolua_function(tolua_S,"drawRect",lua_cocos2dx_DrawNode_drawRect); tolua_function(tolua_S,"drawSolidCircle",lua_cocos2dx_DrawNode_drawSolidCircle); tolua_function(tolua_S,"setLineWidth",lua_cocos2dx_DrawNode_setLineWidth); - tolua_function(tolua_S,"onDrawGLPoint",lua_cocos2dx_DrawNode_onDrawGLPoint); tolua_function(tolua_S,"drawDot",lua_cocos2dx_DrawNode_drawDot); tolua_function(tolua_S,"drawSegment",lua_cocos2dx_DrawNode_drawSegment); tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_DrawNode_getBlendFunc); - tolua_function(tolua_S,"onDraw",lua_cocos2dx_DrawNode_onDraw); tolua_function(tolua_S,"drawCircle",lua_cocos2dx_DrawNode_drawCircle); tolua_function(tolua_S,"drawQuadBezier",lua_cocos2dx_DrawNode_drawQuadBezier); - tolua_function(tolua_S,"onDrawGLLine",lua_cocos2dx_DrawNode_onDrawGLLine); tolua_function(tolua_S,"drawTriangle",lua_cocos2dx_DrawNode_drawTriangle); tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_DrawNode_setBlendFunc); tolua_function(tolua_S,"clear",lua_cocos2dx_DrawNode_clear); @@ -78753,56 +75624,7 @@ int lua_cocos2dx_RenderTexture_setKeepMatrix(lua_State* tolua_S) return 0; } -int lua_cocos2dx_RenderTexture_setClearFlags(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_setClearFlags'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.RenderTexture:setClearFlags"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setClearFlags'", nullptr); - return 0; - } - cobj->setClearFlags(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:setClearFlags",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_setClearFlags'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_RenderTexture_begin(lua_State* tolua_S) { int argc = 0; @@ -79415,114 +76237,7 @@ int lua_cocos2dx_RenderTexture_clear(lua_State* tolua_S) return 0; } -int lua_cocos2dx_RenderTexture_getClearFlags(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_getClearFlags'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_getClearFlags'", nullptr); - return 0; - } - unsigned int ret = cobj->getClearFlags(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:getClearFlags",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_getClearFlags'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderTexture_newImage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_newImage'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_newImage'", nullptr); - return 0; - } - cocos2d::Image* ret = cobj->newImage(); - object_to_luaval(tolua_S, "cc.Image",(cocos2d::Image*)ret); - return 1; - } - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.RenderTexture:newImage"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_newImage'", nullptr); - return 0; - } - cocos2d::Image* ret = cobj->newImage(arg0); - object_to_luaval(tolua_S, "cc.Image",(cocos2d::Image*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:newImage",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_newImage'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_RenderTexture_setClearDepth(lua_State* tolua_S) { int argc = 0; @@ -79573,81 +76288,7 @@ int lua_cocos2dx_RenderTexture_setClearDepth(lua_State* tolua_S) return 0; } -int lua_cocos2dx_RenderTexture_initWithWidthAndHeight(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderTexture* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderTexture",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::RenderTexture*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderTexture_initWithWidthAndHeight'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 4) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - unsigned int arg3; - ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:initWithWidthAndHeight"); - - if (!ok) { break; } - bool ret = cobj->initWithWidthAndHeight(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderTexture:initWithWidthAndHeight",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderTexture_initWithWidthAndHeight'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_RenderTexture_create(lua_State* tolua_S) { int argc = 0; @@ -79682,28 +76323,6 @@ int lua_cocos2dx_RenderTexture_create(lua_State* tolua_S) } while (0); ok = true; do - { - if (argc == 4) - { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.RenderTexture:create"); - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.RenderTexture:create"); - if (!ok) { break; } - cocos2d::Texture2D::PixelFormat arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.RenderTexture:create"); - if (!ok) { break; } - unsigned int arg3; - ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.RenderTexture:create"); - if (!ok) { break; } - cocos2d::RenderTexture* ret = cocos2d::RenderTexture::create(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.RenderTexture",(cocos2d::RenderTexture*)ret); - return 1; - } - } while (0); - ok = true; - do { if (argc == 2) { @@ -79786,7 +76405,6 @@ int lua_register_cocos2dx_RenderTexture(lua_State* tolua_S) tolua_function(tolua_S,"getSprite",lua_cocos2dx_RenderTexture_getSprite); tolua_function(tolua_S,"isAutoDraw",lua_cocos2dx_RenderTexture_isAutoDraw); tolua_function(tolua_S,"setKeepMatrix",lua_cocos2dx_RenderTexture_setKeepMatrix); - tolua_function(tolua_S,"setClearFlags",lua_cocos2dx_RenderTexture_setClearFlags); tolua_function(tolua_S,"begin",lua_cocos2dx_RenderTexture_begin); tolua_function(tolua_S,"saveToFile",lua_cocos2dx_RenderTexture_saveToFile); tolua_function(tolua_S,"setAutoDraw",lua_cocos2dx_RenderTexture_setAutoDraw); @@ -79796,10 +76414,7 @@ int lua_register_cocos2dx_RenderTexture(lua_State* tolua_S) tolua_function(tolua_S,"clearDepth",lua_cocos2dx_RenderTexture_clearDepth); tolua_function(tolua_S,"getClearColor",lua_cocos2dx_RenderTexture_getClearColor); tolua_function(tolua_S,"clear",lua_cocos2dx_RenderTexture_clear); - tolua_function(tolua_S,"getClearFlags",lua_cocos2dx_RenderTexture_getClearFlags); - tolua_function(tolua_S,"newImage",lua_cocos2dx_RenderTexture_newImage); tolua_function(tolua_S,"setClearDepth",lua_cocos2dx_RenderTexture_setClearDepth); - tolua_function(tolua_S,"initWithWidthAndHeight",lua_cocos2dx_RenderTexture_initWithWidthAndHeight); tolua_function(tolua_S,"create", lua_cocos2dx_RenderTexture_create); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::RenderTexture).name(); @@ -84451,53 +81066,6 @@ int lua_register_cocos2dx_TransitionProgressOutIn(lua_State* tolua_S) return 1; } -int lua_cocos2dx_Camera_restore(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_restore'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_restore'", nullptr); - return 0; - } - cobj->restore(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:restore",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_restore'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Camera_getDepth(lua_State* tolua_S) { int argc = 0; @@ -84994,53 +81562,7 @@ int lua_cocos2dx_Camera_getDepthInView(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_restoreViewport(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_restoreViewport'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_restoreViewport'", nullptr); - return 0; - } - cobj->restoreViewport(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:restoreViewport",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_restoreViewport'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Camera_clearBackground(lua_State* tolua_S) { int argc = 0; @@ -85138,57 +81660,7 @@ int lua_cocos2dx_Camera_setAdditionalProjection(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_setViewport(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setViewport'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::experimental::Viewport arg0; - - #pragma warning NO CONVERSION TO NATIVE FOR Viewport - ok = false; - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setViewport'", nullptr); - return 0; - } - cobj->setViewport(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setViewport",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setViewport'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Camera_initDefault(lua_State* tolua_S) { int argc = 0; @@ -85436,56 +81908,7 @@ int lua_cocos2dx_Camera_getRenderOrder(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_isVisibleInFrustum(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_isVisibleInFrustum'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - const cocos2d::AABB* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.AABB",&arg0, "cc.Camera:isVisibleInFrustum"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_isVisibleInFrustum'", nullptr); - return 0; - } - bool ret = cobj->isVisibleInFrustum(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:isVisibleInFrustum",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_isVisibleInFrustum'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Camera_setDepth(lua_State* tolua_S) { int argc = 0; @@ -85636,53 +82059,7 @@ int lua_cocos2dx_Camera_projectGL(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_restoreFrameBufferObject(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_restoreFrameBufferObject'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_restoreFrameBufferObject'", nullptr); - return 0; - } - cobj->restoreFrameBufferObject(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:restoreFrameBufferObject",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_restoreFrameBufferObject'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Camera_getViewMatrix(lua_State* tolua_S) { int argc = 0; @@ -85924,103 +82301,8 @@ int lua_cocos2dx_Camera_getFarPlane(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_applyFrameBufferObject(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_applyFrameBufferObject'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_applyFrameBufferObject'", nullptr); - return 0; - } - cobj->applyFrameBufferObject(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:applyFrameBufferObject",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_applyFrameBufferObject'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_setFrameBufferObject(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setFrameBufferObject'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::experimental::FrameBuffer* arg0; - - ok &= luaval_to_object(tolua_S, 2, "ccexp.FrameBuffer",&arg0, "cc.Camera:setFrameBufferObject"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setFrameBufferObject'", nullptr); - return 0; - } - cobj->setFrameBufferObject(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setFrameBufferObject",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setFrameBufferObject'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Camera_isViewProjectionUpdated(lua_State* tolua_S) { int argc = 0; @@ -86279,77 +82561,7 @@ int lua_cocos2dx_Camera_createPerspective(lua_State* tolua_S) #endif return 0; } -int lua_cocos2dx_Camera_getDefaultViewport(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getDefaultViewport'", nullptr); - return 0; - } - const cocos2d::experimental::Viewport& ret = cocos2d::Camera::getDefaultViewport(); - #pragma warning NO CONVERSION FROM NATIVE FOR Viewport; - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:getDefaultViewport",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDefaultViewport'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Camera_setDefaultViewport(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::experimental::Viewport arg0; - #pragma warning NO CONVERSION TO NATIVE FOR Viewport - ok = false; - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setDefaultViewport'", nullptr); - return 0; - } - cocos2d::Camera::setDefaultViewport(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:setDefaultViewport",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setDefaultViewport'.",&tolua_err); -#endif - return 0; -} int lua_cocos2dx_Camera_getDefaultCamera(lua_State* tolua_S) { int argc = 0; @@ -86434,7 +82646,6 @@ int lua_register_cocos2dx_Camera(lua_State* tolua_S) tolua_beginmodule(tolua_S,"Camera"); tolua_function(tolua_S,"new",lua_cocos2dx_Camera_constructor); - tolua_function(tolua_S,"restore",lua_cocos2dx_Camera_restore); tolua_function(tolua_S,"getDepth",lua_cocos2dx_Camera_getDepth); tolua_function(tolua_S,"getViewProjectionMatrix",lua_cocos2dx_Camera_getViewProjectionMatrix); tolua_function(tolua_S,"applyViewport",lua_cocos2dx_Camera_applyViewport); @@ -86445,35 +82656,27 @@ int lua_register_cocos2dx_Camera(lua_State* tolua_S) tolua_function(tolua_S,"getProjectionMatrix",lua_cocos2dx_Camera_getProjectionMatrix); tolua_function(tolua_S,"isBrushValid",lua_cocos2dx_Camera_isBrushValid); tolua_function(tolua_S,"getDepthInView",lua_cocos2dx_Camera_getDepthInView); - tolua_function(tolua_S,"restoreViewport",lua_cocos2dx_Camera_restoreViewport); tolua_function(tolua_S,"clearBackground",lua_cocos2dx_Camera_clearBackground); tolua_function(tolua_S,"setAdditionalProjection",lua_cocos2dx_Camera_setAdditionalProjection); - tolua_function(tolua_S,"setViewport",lua_cocos2dx_Camera_setViewport); tolua_function(tolua_S,"initDefault",lua_cocos2dx_Camera_initDefault); tolua_function(tolua_S,"getCameraFlag",lua_cocos2dx_Camera_getCameraFlag); tolua_function(tolua_S,"getType",lua_cocos2dx_Camera_getType); tolua_function(tolua_S,"initOrthographic",lua_cocos2dx_Camera_initOrthographic); tolua_function(tolua_S,"getRenderOrder",lua_cocos2dx_Camera_getRenderOrder); - tolua_function(tolua_S,"isVisibleInFrustum",lua_cocos2dx_Camera_isVisibleInFrustum); tolua_function(tolua_S,"setDepth",lua_cocos2dx_Camera_setDepth); tolua_function(tolua_S,"setScene",lua_cocos2dx_Camera_setScene); tolua_function(tolua_S,"projectGL",lua_cocos2dx_Camera_projectGL); - tolua_function(tolua_S,"restoreFrameBufferObject",lua_cocos2dx_Camera_restoreFrameBufferObject); tolua_function(tolua_S,"getViewMatrix",lua_cocos2dx_Camera_getViewMatrix); tolua_function(tolua_S,"getNearPlane",lua_cocos2dx_Camera_getNearPlane); tolua_function(tolua_S,"project",lua_cocos2dx_Camera_project); tolua_function(tolua_S,"setCameraFlag",lua_cocos2dx_Camera_setCameraFlag); tolua_function(tolua_S,"getFarPlane",lua_cocos2dx_Camera_getFarPlane); - tolua_function(tolua_S,"applyFrameBufferObject",lua_cocos2dx_Camera_applyFrameBufferObject); - tolua_function(tolua_S,"setFrameBufferObject",lua_cocos2dx_Camera_setFrameBufferObject); tolua_function(tolua_S,"isViewProjectionUpdated",lua_cocos2dx_Camera_isViewProjectionUpdated); tolua_function(tolua_S,"initPerspective",lua_cocos2dx_Camera_initPerspective); tolua_function(tolua_S,"createOrthographic", lua_cocos2dx_Camera_createOrthographic); tolua_function(tolua_S,"getVisitingCamera", lua_cocos2dx_Camera_getVisitingCamera); tolua_function(tolua_S,"create", lua_cocos2dx_Camera_create); tolua_function(tolua_S,"createPerspective", lua_cocos2dx_Camera_createPerspective); - tolua_function(tolua_S,"getDefaultViewport", lua_cocos2dx_Camera_getDefaultViewport); - tolua_function(tolua_S,"setDefaultViewport", lua_cocos2dx_Camera_setDefaultViewport); tolua_function(tolua_S,"getDefaultCamera", lua_cocos2dx_Camera_getDefaultCamera); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Camera).name(); @@ -88578,60 +84781,7 @@ int lua_cocos2dx_GridBase_reuse(lua_State* tolua_S) return 0; } -int lua_cocos2dx_GridBase_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.GridBase",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 1) - { - cocos2d::Size arg0; - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.GridBase:create"); - if (!ok) { break; } - cocos2d::GridBase* ret = cocos2d::GridBase::create(arg0); - object_to_luaval(tolua_S, "cc.GridBase",(cocos2d::GridBase*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - cocos2d::Size arg0; - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.GridBase:create"); - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.GridBase:create"); - if (!ok) { break; } - bool arg2; - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.GridBase:create"); - if (!ok) { break; } - cocos2d::GridBase* ret = cocos2d::GridBase::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.GridBase",(cocos2d::GridBase*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.GridBase:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GridBase_create'.",&tolua_err); -#endif - return 0; -} static int lua_cocos2dx_GridBase_finalize(lua_State* tolua_S) { printf("luabindings: finalizing LUA object (GridBase)"); @@ -88665,7 +84815,6 @@ int lua_register_cocos2dx_GridBase(lua_State* tolua_S) tolua_function(tolua_S,"setReuseGrid",lua_cocos2dx_GridBase_setReuseGrid); tolua_function(tolua_S,"isActive",lua_cocos2dx_GridBase_isActive); tolua_function(tolua_S,"reuse",lua_cocos2dx_GridBase_reuse); - tolua_function(tolua_S,"create", lua_cocos2dx_GridBase_create); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::GridBase).name(); g_luaType[typeName] = "cc.GridBase"; @@ -89014,63 +85163,6 @@ int lua_cocos2dx_TiledGrid3D_create(lua_State* tolua_S) #endif return 0; } -int lua_cocos2dx_TiledGrid3D_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::TiledGrid3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TiledGrid3D_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::TiledGrid3D(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TiledGrid3D"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TiledGrid3D:TiledGrid3D",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TiledGrid3D_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_TiledGrid3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TiledGrid3D)"); - return 0; -} - -int lua_register_cocos2dx_TiledGrid3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.TiledGrid3D"); - tolua_cclass(tolua_S,"TiledGrid3D","cc.TiledGrid3D","cc.GridBase",nullptr); - - tolua_beginmodule(tolua_S,"TiledGrid3D"); - tolua_function(tolua_S,"new",lua_cocos2dx_TiledGrid3D_constructor); - tolua_function(tolua_S,"create", lua_cocos2dx_TiledGrid3D_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::TiledGrid3D).name(); - g_luaType[typeName] = "cc.TiledGrid3D"; - g_typeCast["TiledGrid3D"] = "cc.TiledGrid3D"; - return 1; -} int lua_cocos2dx_BaseLight_setEnabled(lua_State* tolua_S) { @@ -90614,1479 +86706,6 @@ int lua_register_cocos2dx_AmbientLight(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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'", nullptr); - return 0; - } - std::string ret = cobj->getFragmentShaderLog(); - lua_pushlstring(tolua_S,ret.c_str(),ret.length()); - return 1; - } - luaL_error(tolua_S, "%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; - do{ - if (argc == 3) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:initWithByteArrays"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - const char* arg1; - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:initWithByteArrays"); arg1 = arg1_tmp.c_str(); - - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.GLProgram:initWithByteArrays"); - - if (!ok) { break; } - bool ret = cobj->initWithByteArrays(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:initWithByteArrays"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - const char* arg1; - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:initWithByteArrays"); arg1 = arg1_tmp.c_str(); - - if (!ok) { break; } - bool ret = cobj->initWithByteArrays(arg0, arg1); - 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.GLProgram:initWithByteArrays"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - const char* arg1; - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:initWithByteArrays"); arg1 = arg1_tmp.c_str(); - - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.GLProgram:initWithByteArrays"); - - if (!ok) { break; } - std::string arg3; - ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.GLProgram:initWithByteArrays"); - - if (!ok) { break; } - bool ret = cobj->initWithByteArrays(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithByteArrays",argc, 4); - 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; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:initWithFilenames"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:initWithFilenames"); - - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.GLProgram:initWithFilenames"); - - if (!ok) { break; } - bool ret = cobj->initWithFilenames(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:initWithFilenames"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:initWithFilenames"); - - if (!ok) { break; } - bool ret = cobj->initWithFilenames(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 4) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:initWithFilenames"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:initWithFilenames"); - - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.GLProgram:initWithFilenames"); - - if (!ok) { break; } - std::string arg3; - ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.GLProgram:initWithFilenames"); - - if (!ok) { break; } - bool ret = cobj->initWithFilenames(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithFilenames",argc, 4); - 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_use'", nullptr); - return 0; - } - cobj->use(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'", nullptr); - return 0; - } - std::string ret = cobj->getVertexShaderLog(); - lua_pushlstring(tolua_S,ret.c_str(),ret.length()); - return 1; - } - luaL_error(tolua_S, "%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 == 0) { - cobj->setUniformsForBuiltins(); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Mat4 arg0; - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgram:setUniformsForBuiltins"); - - if (!ok) { break; } - cobj->setUniformsForBuiltins(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformsForBuiltins",argc, 1); - 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_updateUniforms'", nullptr); - return 0; - } - cobj->updateUniforms(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'", nullptr); - return 0; - } - cobj->setUniformLocationWith1i(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_reset'", nullptr); - return 0; - } - cobj->reset(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_bindAttribLocation'", nullptr); - return 0; - } - cobj->bindAttribLocation(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_getAttribLocation'", nullptr); - return 0; - } - int ret = cobj->getAttribLocation(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_link'", nullptr); - return 0; - } - bool ret = cobj->link(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%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; - - do - { - if (argc == 3) - { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:createWithByteArrays"); arg0 = arg0_tmp.c_str(); - if (!ok) { break; } - const char* arg1; - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:createWithByteArrays"); arg1 = arg1_tmp.c_str(); - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.GLProgram:createWithByteArrays"); - if (!ok) { break; } - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithByteArrays(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:createWithByteArrays"); arg0 = arg0_tmp.c_str(); - if (!ok) { break; } - const char* arg1; - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:createWithByteArrays"); arg1 = arg1_tmp.c_str(); - if (!ok) { break; } - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithByteArrays(arg0, arg1); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)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.GLProgram:createWithByteArrays"); arg0 = arg0_tmp.c_str(); - if (!ok) { break; } - const char* arg1; - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:createWithByteArrays"); arg1 = arg1_tmp.c_str(); - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.GLProgram:createWithByteArrays"); - if (!ok) { break; } - std::string arg3; - ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.GLProgram:createWithByteArrays"); - if (!ok) { break; } - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithByteArrays(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.GLProgram:createWithByteArrays",argc, 4); - 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; - - do - { - if (argc == 3) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:createWithFilenames"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:createWithFilenames"); - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.GLProgram:createWithFilenames"); - if (!ok) { break; } - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithFilenames(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:createWithFilenames"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:createWithFilenames"); - if (!ok) { break; } - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithFilenames(arg0, arg1); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 4) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:createWithFilenames"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:createWithFilenames"); - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.GLProgram:createWithFilenames"); - if (!ok) { break; } - std::string arg3; - ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.GLProgram:createWithFilenames"); - if (!ok) { break; } - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithFilenames(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.GLProgram:createWithFilenames",argc, 4); - 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) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgram_constructor'", nullptr); - 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; - } - luaL_error(tolua_S, "%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_reloadDefaultGLProgramsRelativeToLights(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramCache*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramCache_reloadDefaultGLProgramsRelativeToLights'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramCache_reloadDefaultGLProgramsRelativeToLights'", nullptr); - return 0; - } - cobj->reloadDefaultGLProgramsRelativeToLights(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramCache:reloadDefaultGLProgramsRelativeToLights",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_reloadDefaultGLProgramsRelativeToLights'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramCache_addGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramCache*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramCache_addGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::GLProgram* arg0; - std::string arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0, "cc.GLProgramCache:addGLProgram"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgramCache:addGLProgram"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramCache_addGLProgram'", nullptr); - return 0; - } - cobj->addGLProgram(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramCache:addGLProgram",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_addGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramCache_reloadDefaultGLPrograms(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramCache*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramCache_reloadDefaultGLPrograms'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramCache_reloadDefaultGLPrograms'", nullptr); - return 0; - } - cobj->reloadDefaultGLPrograms(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramCache:reloadDefaultGLPrograms",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_reloadDefaultGLPrograms'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramCache_loadDefaultGLPrograms(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramCache*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramCache_loadDefaultGLPrograms'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramCache_loadDefaultGLPrograms'", nullptr); - return 0; - } - cobj->loadDefaultGLPrograms(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramCache:loadDefaultGLPrograms",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_loadDefaultGLPrograms'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramCache_getGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramCache*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramCache_getGLProgram'", 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.GLProgramCache:getGLProgram"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramCache_getGLProgram'", nullptr); - return 0; - } - cocos2d::GLProgram* ret = cobj->getGLProgram(arg0); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramCache:getGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_getGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramCache_destroyInstance(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramCache_destroyInstance'", nullptr); - return 0; - } - cocos2d::GLProgramCache::destroyInstance(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramCache:destroyInstance",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_destroyInstance'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgramCache_getInstance(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramCache_getInstance'", nullptr); - return 0; - } - cocos2d::GLProgramCache* ret = cocos2d::GLProgramCache::getInstance(); - object_to_luaval(tolua_S, "cc.GLProgramCache",(cocos2d::GLProgramCache*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramCache:getInstance",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_getInstance'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgramCache_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramCache_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::GLProgramCache(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.GLProgramCache"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramCache:GLProgramCache",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_GLProgramCache_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (GLProgramCache)"); - return 0; -} - -int lua_register_cocos2dx_GLProgramCache(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.GLProgramCache"); - tolua_cclass(tolua_S,"GLProgramCache","cc.GLProgramCache","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"GLProgramCache"); - tolua_function(tolua_S,"new",lua_cocos2dx_GLProgramCache_constructor); - tolua_function(tolua_S,"reloadDefaultGLProgramsRelativeToLights",lua_cocos2dx_GLProgramCache_reloadDefaultGLProgramsRelativeToLights); - tolua_function(tolua_S,"addGLProgram",lua_cocos2dx_GLProgramCache_addGLProgram); - tolua_function(tolua_S,"reloadDefaultGLPrograms",lua_cocos2dx_GLProgramCache_reloadDefaultGLPrograms); - tolua_function(tolua_S,"loadDefaultGLPrograms",lua_cocos2dx_GLProgramCache_loadDefaultGLPrograms); - tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramCache_getGLProgram); - tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_GLProgramCache_destroyInstance); - tolua_function(tolua_S,"getInstance", lua_cocos2dx_GLProgramCache_getInstance); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::GLProgramCache).name(); - g_luaType[typeName] = "cc.GLProgramCache"; - g_typeCast["GLProgramCache"] = "cc.GLProgramCache"; - return 1; -} - -int lua_cocos2dx_RenderState_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_setTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Texture2D* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.RenderState:setTexture"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_setTexture'", nullptr); - return 0; - } - cobj->setTexture(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderState_getTopmost(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_getTopmost'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::RenderState* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.RenderState",&arg0, "cc.RenderState:getTopmost"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_getTopmost'", nullptr); - return 0; - } - cocos2d::RenderState* ret = cobj->getTopmost(arg0); - object_to_luaval(tolua_S, "cc.RenderState",(cocos2d::RenderState*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:getTopmost",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_getTopmost'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderState_getTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_getTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_getTexture'", nullptr); - return 0; - } - cocos2d::Texture2D* ret = cobj->getTexture(); - object_to_luaval(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:getTexture",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_getTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderState_bind(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_bind'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Pass* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Pass",&arg0, "cc.RenderState:bind"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_bind'", nullptr); - return 0; - } - cobj->bind(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:bind",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_bind'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_RenderState_getName(lua_State* tolua_S) { int argc = 0; @@ -92134,137 +86753,8 @@ int lua_cocos2dx_RenderState_getName(lua_State* tolua_S) return 0; } -int lua_cocos2dx_RenderState_getStateBlock(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_getStateBlock'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_getStateBlock'", nullptr); - return 0; - } - cocos2d::RenderState::StateBlock* ret = cobj->getStateBlock(); - object_to_luaval(tolua_S, "cc.RenderState::StateBlock",(cocos2d::RenderState::StateBlock*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:getStateBlock",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_getStateBlock'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderState_setParent(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::RenderState* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.RenderState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_setParent'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::RenderState* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.RenderState",&arg0, "cc.RenderState:setParent"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_setParent'", nullptr); - return 0; - } - cobj->setParent(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:setParent",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_setParent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_RenderState_initialize(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.RenderState",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_initialize'", nullptr); - return 0; - } - cocos2d::RenderState::initialize(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.RenderState:initialize",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_initialize'.",&tolua_err); -#endif - return 0; -} static int lua_cocos2dx_RenderState_finalize(lua_State* tolua_S) { printf("luabindings: finalizing LUA object (RenderState)"); @@ -92277,14 +86767,7 @@ int lua_register_cocos2dx_RenderState(lua_State* tolua_S) tolua_cclass(tolua_S,"RenderState","cc.RenderState","cc.Ref",nullptr); tolua_beginmodule(tolua_S,"RenderState"); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_RenderState_setTexture); - tolua_function(tolua_S,"getTopmost",lua_cocos2dx_RenderState_getTopmost); - tolua_function(tolua_S,"getTexture",lua_cocos2dx_RenderState_getTexture); - tolua_function(tolua_S,"bind",lua_cocos2dx_RenderState_bind); tolua_function(tolua_S,"getName",lua_cocos2dx_RenderState_getName); - tolua_function(tolua_S,"getStateBlock",lua_cocos2dx_RenderState_getStateBlock); - tolua_function(tolua_S,"setParent",lua_cocos2dx_RenderState_setParent); - tolua_function(tolua_S,"initialize", lua_cocos2dx_RenderState_initialize); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::RenderState).name(); g_luaType[typeName] = "cc.RenderState"; @@ -92292,112 +86775,7 @@ int lua_register_cocos2dx_RenderState(lua_State* tolua_S) return 1; } -int lua_cocos2dx_Pass_unbind(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Pass* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Pass",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_unbind'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Pass_unbind'", nullptr); - return 0; - } - cobj->unbind(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Pass:unbind",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_unbind'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Pass_bind(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Pass* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Pass",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_bind'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Mat4 arg0; - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Pass:bind"); - - if (!ok) { break; } - bool arg1; - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Pass:bind"); - - if (!ok) { break; } - cobj->bind(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Mat4 arg0; - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Pass:bind"); - - if (!ok) { break; } - cobj->bind(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Pass:bind",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_bind'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Pass_clone(lua_State* tolua_S) { int argc = 0; @@ -92445,53 +86823,7 @@ int lua_cocos2dx_Pass_clone(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Pass_getGLProgramState(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Pass* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Pass",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_getGLProgramState'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Pass_getGLProgramState'", nullptr); - return 0; - } - cocos2d::GLProgramState* ret = cobj->getGLProgramState(); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Pass:getGLProgramState",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_getGLProgramState'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Pass_getVertexAttributeBinding(lua_State* tolua_S) { int argc = 0; @@ -92539,53 +86871,7 @@ int lua_cocos2dx_Pass_getVertexAttributeBinding(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Pass_getHash(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Pass* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Pass",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_getHash'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Pass_getHash'", nullptr); - return 0; - } - unsigned int ret = cobj->getHash(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Pass:getHash",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_getHash'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Pass_setVertexAttribBinding(lua_State* tolua_S) { int argc = 0; @@ -92672,44 +86958,7 @@ int lua_cocos2dx_Pass_create(lua_State* tolua_S) #endif return 0; } -int lua_cocos2dx_Pass_createWithGLProgramState(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Pass",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - cocos2d::Technique* arg0; - cocos2d::GLProgramState* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Technique",&arg0, "cc.Pass:createWithGLProgramState"); - ok &= luaval_to_object(tolua_S, 3, "cc.GLProgramState",&arg1, "cc.Pass:createWithGLProgramState"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Pass_createWithGLProgramState'", nullptr); - return 0; - } - cocos2d::Pass* ret = cocos2d::Pass::createWithGLProgramState(arg0, arg1); - object_to_luaval(tolua_S, "cc.Pass",(cocos2d::Pass*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Pass:createWithGLProgramState",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_createWithGLProgramState'.",&tolua_err); -#endif - return 0; -} static int lua_cocos2dx_Pass_finalize(lua_State* tolua_S) { printf("luabindings: finalizing LUA object (Pass)"); @@ -92722,15 +86971,10 @@ int lua_register_cocos2dx_Pass(lua_State* tolua_S) tolua_cclass(tolua_S,"Pass","cc.Pass","cc.RenderState",nullptr); tolua_beginmodule(tolua_S,"Pass"); - tolua_function(tolua_S,"unbind",lua_cocos2dx_Pass_unbind); - tolua_function(tolua_S,"bind",lua_cocos2dx_Pass_bind); tolua_function(tolua_S,"clone",lua_cocos2dx_Pass_clone); - tolua_function(tolua_S,"getGLProgramState",lua_cocos2dx_Pass_getGLProgramState); tolua_function(tolua_S,"getVertexAttributeBinding",lua_cocos2dx_Pass_getVertexAttributeBinding); - tolua_function(tolua_S,"getHash",lua_cocos2dx_Pass_getHash); tolua_function(tolua_S,"setVertexAttribBinding",lua_cocos2dx_Pass_setVertexAttribBinding); tolua_function(tolua_S,"create", lua_cocos2dx_Pass_create); - tolua_function(tolua_S,"createWithGLProgramState", lua_cocos2dx_Pass_createWithGLProgramState); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Pass).name(); g_luaType[typeName] = "cc.Pass"; @@ -93062,44 +87306,7 @@ int lua_cocos2dx_Technique_create(lua_State* tolua_S) #endif return 0; } -int lua_cocos2dx_Technique_createWithGLProgramState(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Technique",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - cocos2d::Material* arg0; - cocos2d::GLProgramState* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0, "cc.Technique:createWithGLProgramState"); - ok &= luaval_to_object(tolua_S, 3, "cc.GLProgramState",&arg1, "cc.Technique:createWithGLProgramState"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Technique_createWithGLProgramState'", nullptr); - return 0; - } - cocos2d::Technique* ret = cocos2d::Technique::createWithGLProgramState(arg0, arg1); - object_to_luaval(tolua_S, "cc.Technique",(cocos2d::Technique*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Technique:createWithGLProgramState",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Technique_createWithGLProgramState'.",&tolua_err); -#endif - return 0; -} static int lua_cocos2dx_Technique_finalize(lua_State* tolua_S) { printf("luabindings: finalizing LUA object (Technique)"); @@ -93119,7 +87326,6 @@ int lua_register_cocos2dx_Technique(lua_State* tolua_S) tolua_function(tolua_S,"getName",lua_cocos2dx_Technique_getName); tolua_function(tolua_S,"getPassByIndex",lua_cocos2dx_Technique_getPassByIndex); tolua_function(tolua_S,"create", lua_cocos2dx_Technique_create); - tolua_function(tolua_S,"createWithGLProgramState", lua_cocos2dx_Technique_createWithGLProgramState); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Technique).name(); g_luaType[typeName] = "cc.Technique"; @@ -93648,42 +87854,7 @@ int lua_cocos2dx_Material_createWithFilename(lua_State* tolua_S) #endif return 0; } -int lua_cocos2dx_Material_createWithGLStateProgram(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Material",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::GLProgramState* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0, "cc.Material:createWithGLStateProgram"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Material_createWithGLStateProgram'", nullptr); - return 0; - } - cocos2d::Material* ret = cocos2d::Material::createWithGLStateProgram(arg0); - object_to_luaval(tolua_S, "cc.Material",(cocos2d::Material*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Material:createWithGLStateProgram",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_createWithGLStateProgram'.",&tolua_err); -#endif - return 0; -} int lua_cocos2dx_Material_createWithProperties(lua_State* tolua_S) { int argc = 0; @@ -93743,7 +87914,6 @@ int lua_register_cocos2dx_Material(lua_State* tolua_S) tolua_function(tolua_S,"addTechnique",lua_cocos2dx_Material_addTechnique); tolua_function(tolua_S,"getTechnique",lua_cocos2dx_Material_getTechnique); tolua_function(tolua_S,"createWithFilename", lua_cocos2dx_Material_createWithFilename); - tolua_function(tolua_S,"createWithGLStateProgram", lua_cocos2dx_Material_createWithGLStateProgram); tolua_function(tolua_S,"createWithProperties", lua_cocos2dx_Material_createWithProperties); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Material).name(); @@ -95050,21 +89220,6 @@ int lua_cocos2dx_Application_setAnimationInterval(lua_State* tolua_S) } #endif argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Application:setAnimationInterval"); - - if (!ok) { break; } - cocos2d::SetIntervalReason arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Application:setAnimationInterval"); - - if (!ok) { break; } - cobj->setAnimationInterval(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); ok = true; do{ if (argc == 1) { @@ -104425,7 +98580,6 @@ 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_EaseBounceOut(tolua_S); lua_register_cocos2dx_RenderTexture(tolua_S); lua_register_cocos2dx_TintBy(tolua_S); @@ -104449,7 +98603,6 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_EaseSineIn(tolua_S); lua_register_cocos2dx_EaseBounceIn(tolua_S); lua_register_cocos2dx_Camera(tolua_S); - lua_register_cocos2dx_GLProgram(tolua_S); lua_register_cocos2dx_ParticleGalaxy(tolua_S); lua_register_cocos2dx_Twirl(tolua_S); lua_register_cocos2dx_MenuItemLabel(tolua_S); @@ -104494,7 +98647,6 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_EventListenerFocus(tolua_S); lua_register_cocos2dx_Spawn(tolua_S); lua_register_cocos2dx_EaseQuarticActionInOut(tolua_S); - lua_register_cocos2dx_GLProgramState(tolua_S); lua_register_cocos2dx_PageTurn3D(tolua_S); lua_register_cocos2dx_PolygonInfo(tolua_S); lua_register_cocos2dx_TransitionSlideInL(tolua_S); @@ -104560,7 +98712,6 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_EaseBounceInOut(tolua_S); lua_register_cocos2dx_TransitionSlideInR(tolua_S); lua_register_cocos2dx_AmbientLight(tolua_S); - lua_register_cocos2dx_GLProgramCache(tolua_S); lua_register_cocos2dx_EaseQuadraticActionIn(tolua_S); lua_register_cocos2dx_WavesTiles3D(tolua_S); lua_register_cocos2dx_TransitionSlideInB(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.cpp deleted file mode 100644 index b1d8ff4cef..0000000000 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.cpp +++ /dev/null @@ -1,2962 +0,0 @@ -#include "scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.hpp" -#include "editor-support/cocosbuilder/CocosBuilder.h" -#include "scripting/lua-bindings/manual/tolua_fix.h" -#include "scripting/lua-bindings/manual/LuaBasicConversions.h" - -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_moveAnimationsFromNode(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_moveAnimationsFromNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Node* arg0; - cocos2d::Node* arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.CCBAnimationManager:moveAnimationsFromNode"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.CCBAnimationManager:moveAnimationsFromNode"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_moveAnimationsFromNode'", nullptr); - return 0; - } - cobj->moveAnimationsFromNode(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:moveAnimationsFromNode",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_moveAnimationsFromNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setAutoPlaySequenceId(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setAutoPlaySequenceId'", 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.CCBAnimationManager:setAutoPlaySequenceId"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setAutoPlaySequenceId'", nullptr); - return 0; - } - cobj->setAutoPlaySequenceId(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:setAutoPlaySequenceId",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setAutoPlaySequenceId'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNames(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNames'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNames'", nullptr); - return 0; - } - cocos2d::ValueVector& ret = cobj->getDocumentCallbackNames(); - ccvaluevector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getDocumentCallbackNames",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNames'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForSoundChannel(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForSoundChannel'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocosbuilder::CCBSequenceProperty* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequenceProperty",&arg0, "cc.CCBAnimationManager:actionForSoundChannel"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForSoundChannel'", nullptr); - return 0; - } - cocos2d::Sequence* ret = cobj->actionForSoundChannel(arg0); - object_to_luaval(tolua_S, "cc.Sequence",(cocos2d::Sequence*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:actionForSoundChannel",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForSoundChannel'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setBaseValue(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setBaseValue'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - cocos2d::Value arg0; - cocos2d::Node* arg1; - std::string arg2; - - ok &= luaval_to_ccvalue(tolua_S, 2, &arg0, "cc.CCBAnimationManager:setBaseValue"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.CCBAnimationManager:setBaseValue"); - - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.CCBAnimationManager:setBaseValue"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setBaseValue'", nullptr); - return 0; - } - cobj->setBaseValue(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:setBaseValue",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setBaseValue'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNodes(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNodes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNodes'", nullptr); - return 0; - } - cocos2d::Vector& ret = cobj->getDocumentOutletNodes(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getDocumentOutletNodes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNodes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getLastCompletedSequenceName(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getLastCompletedSequenceName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getLastCompletedSequenceName'", nullptr); - return 0; - } - std::string ret = cobj->getLastCompletedSequenceName(); - lua_pushlstring(tolua_S,ret.c_str(),ret.length()); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getLastCompletedSequenceName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getLastCompletedSequenceName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootNode(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootNode'", 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, "cc.CCBAnimationManager:setRootNode"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootNode'", nullptr); - return 0; - } - cobj->setRootNode(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:setRootNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamedTweenDuration(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamedTweenDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - const char* arg0; - double arg1; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.CCBAnimationManager:runAnimationsForSequenceNamedTweenDuration"); arg0 = arg0_tmp.c_str(); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.CCBAnimationManager:runAnimationsForSequenceNamedTweenDuration"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamedTweenDuration'", nullptr); - return 0; - } - cobj->runAnimationsForSequenceNamedTweenDuration(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:runAnimationsForSequenceNamedTweenDuration",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamedTweenDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletName(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletName'", 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.CCBAnimationManager:addDocumentOutletName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletName'", nullptr); - return 0; - } - cobj->addDocumentOutletName(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:addDocumentOutletName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequences(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequences'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequences'", nullptr); - return 0; - } - cocos2d::Vector& ret = cobj->getSequences(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getSequences",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequences'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootContainerSize(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootContainerSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootContainerSize'", nullptr); - return 0; - } - const cocos2d::Size& ret = cobj->getRootContainerSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getRootContainerSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootContainerSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setDocumentControllerName(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setDocumentControllerName'", 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.CCBAnimationManager:setDocumentControllerName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setDocumentControllerName'", nullptr); - return 0; - } - cobj->setDocumentControllerName(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:setDocumentControllerName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setDocumentControllerName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setObject(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setObject'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - cocos2d::Ref* arg0; - cocos2d::Node* arg1; - std::string arg2; - - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0, "cc.CCBAnimationManager:setObject"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.CCBAnimationManager:setObject"); - - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.CCBAnimationManager:setObject"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setObject'", nullptr); - return 0; - } - cobj->setObject(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:setObject",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setObject'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getContainerSize(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getContainerSize'", 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, "cc.CCBAnimationManager:getContainerSize"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getContainerSize'", nullptr); - return 0; - } - const cocos2d::Size& ret = cobj->getContainerSize(arg0); - size_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getContainerSize",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getContainerSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForCallbackChannel(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForCallbackChannel'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocosbuilder::CCBSequenceProperty* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequenceProperty",&arg0, "cc.CCBAnimationManager:actionForCallbackChannel"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForCallbackChannel'", nullptr); - return 0; - } - cocos2d::Sequence* ret = cobj->actionForCallbackChannel(arg0); - object_to_luaval(tolua_S, "cc.Sequence",(cocos2d::Sequence*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:actionForCallbackChannel",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForCallbackChannel'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNames(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNames'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNames'", nullptr); - return 0; - } - cocos2d::ValueVector& ret = cobj->getDocumentOutletNames(); - ccvaluevector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getDocumentOutletNames",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNames'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackControlEvents(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackControlEvents'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::extension::Control::EventType arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.CCBAnimationManager:addDocumentCallbackControlEvents"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackControlEvents'", nullptr); - return 0; - } - cobj->addDocumentCallbackControlEvents(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:addDocumentCallbackControlEvents",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackControlEvents'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_init(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_init'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_init'", nullptr); - return 0; - } - bool ret = cobj->init(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:init",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_init'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getKeyframeCallbacks(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getKeyframeCallbacks'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getKeyframeCallbacks'", nullptr); - return 0; - } - cocos2d::ValueVector& ret = cobj->getKeyframeCallbacks(); - ccvaluevector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getKeyframeCallbacks",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getKeyframeCallbacks'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackControlEvents(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackControlEvents'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackControlEvents'", nullptr); - return 0; - } - cocos2d::ValueVector& ret = cobj->getDocumentCallbackControlEvents(); - ccvaluevector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getDocumentCallbackControlEvents",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackControlEvents'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootContainerSize(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootContainerSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Size arg0; - - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.CCBAnimationManager:setRootContainerSize"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootContainerSize'", nullptr); - return 0; - } - cobj->setRootContainerSize(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:setRootContainerSize",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootContainerSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceIdTweenDuration(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceIdTweenDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - int arg0; - double arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.CCBAnimationManager:runAnimationsForSequenceIdTweenDuration"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.CCBAnimationManager:runAnimationsForSequenceIdTweenDuration"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceIdTweenDuration'", nullptr); - return 0; - } - cobj->runAnimationsForSequenceIdTweenDuration(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:runAnimationsForSequenceIdTweenDuration",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceIdTweenDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRunningSequenceName(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRunningSequenceName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRunningSequenceName'", nullptr); - return 0; - } - const char* ret = cobj->getRunningSequenceName(); - tolua_pushstring(tolua_S,(const char*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getRunningSequenceName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRunningSequenceName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getAutoPlaySequenceId(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getAutoPlaySequenceId'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getAutoPlaySequenceId'", nullptr); - return 0; - } - int ret = cobj->getAutoPlaySequenceId(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getAutoPlaySequenceId",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getAutoPlaySequenceId'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackName(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackName'", 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.CCBAnimationManager:addDocumentCallbackName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackName'", nullptr); - return 0; - } - cobj->addDocumentCallbackName(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:addDocumentCallbackName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootNode(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootNode'", nullptr); - return 0; - } - cocos2d::Node* ret = cobj->getRootNode(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getRootNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletNode(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletNode'", 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, "cc.CCBAnimationManager:addDocumentOutletNode"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletNode'", nullptr); - return 0; - } - cobj->addDocumentOutletNode(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:addDocumentOutletNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceDuration(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - const char* arg0; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.CCBAnimationManager:getSequenceDuration"); arg0 = arg0_tmp.c_str(); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceDuration'", nullptr); - return 0; - } - double ret = cobj->getSequenceDuration(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getSequenceDuration",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackNode(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackNode'", 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, "cc.CCBAnimationManager:addDocumentCallbackNode"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackNode'", nullptr); - return 0; - } - cobj->addDocumentCallbackNode(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:addDocumentCallbackNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamed(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamed'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - const char* arg0; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.CCBAnimationManager:runAnimationsForSequenceNamed"); arg0 = arg0_tmp.c_str(); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamed'", nullptr); - return 0; - } - cobj->runAnimationsForSequenceNamed(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:runAnimationsForSequenceNamed",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamed'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceId(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceId'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - const char* arg0; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.CCBAnimationManager:getSequenceId"); arg0 = arg0_tmp.c_str(); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceId'", nullptr); - return 0; - } - int ret = cobj->getSequenceId(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getSequenceId",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceId'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNodes(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNodes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNodes'", nullptr); - return 0; - } - cocos2d::Vector& ret = cobj->getDocumentCallbackNodes(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getDocumentCallbackNodes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNodes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setSequences(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setSequences'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vector arg0; - - ok &= luaval_to_ccvector(tolua_S, 2, &arg0, "cc.CCBAnimationManager:setSequences"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setSequences'", nullptr); - return 0; - } - cobj->setSequences(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:setSequences",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setSequences'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_debug(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_debug'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_debug'", nullptr); - return 0; - } - cobj->debug(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:debug",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_debug'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentControllerName(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBAnimationManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentControllerName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentControllerName'", nullptr); - return 0; - } - std::string ret = cobj->getDocumentControllerName(); - lua_pushlstring(tolua_S,ret.c_str(),ret.length()); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:getDocumentControllerName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentControllerName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBAnimationManager_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBAnimationManager* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_constructor'", nullptr); - return 0; - } - cobj = new cocosbuilder::CCBAnimationManager(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CCBAnimationManager"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBAnimationManager:CCBAnimationManager",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_cocosbuilder_CCBAnimationManager_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (CCBAnimationManager)"); - return 0; -} - -int lua_register_cocos2dx_cocosbuilder_CCBAnimationManager(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.CCBAnimationManager"); - tolua_cclass(tolua_S,"CCBAnimationManager","cc.CCBAnimationManager","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"CCBAnimationManager"); - tolua_function(tolua_S,"new",lua_cocos2dx_cocosbuilder_CCBAnimationManager_constructor); - tolua_function(tolua_S,"moveAnimationsFromNode",lua_cocos2dx_cocosbuilder_CCBAnimationManager_moveAnimationsFromNode); - tolua_function(tolua_S,"setAutoPlaySequenceId",lua_cocos2dx_cocosbuilder_CCBAnimationManager_setAutoPlaySequenceId); - tolua_function(tolua_S,"getDocumentCallbackNames",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNames); - tolua_function(tolua_S,"actionForSoundChannel",lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForSoundChannel); - tolua_function(tolua_S,"setBaseValue",lua_cocos2dx_cocosbuilder_CCBAnimationManager_setBaseValue); - tolua_function(tolua_S,"getDocumentOutletNodes",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNodes); - tolua_function(tolua_S,"getLastCompletedSequenceName",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getLastCompletedSequenceName); - tolua_function(tolua_S,"setRootNode",lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootNode); - tolua_function(tolua_S,"runAnimationsForSequenceNamedTweenDuration",lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamedTweenDuration); - tolua_function(tolua_S,"addDocumentOutletName",lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletName); - tolua_function(tolua_S,"getSequences",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequences); - tolua_function(tolua_S,"getRootContainerSize",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootContainerSize); - tolua_function(tolua_S,"setDocumentControllerName",lua_cocos2dx_cocosbuilder_CCBAnimationManager_setDocumentControllerName); - tolua_function(tolua_S,"setObject",lua_cocos2dx_cocosbuilder_CCBAnimationManager_setObject); - tolua_function(tolua_S,"getContainerSize",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getContainerSize); - tolua_function(tolua_S,"actionForCallbackChannel",lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForCallbackChannel); - tolua_function(tolua_S,"getDocumentOutletNames",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentOutletNames); - tolua_function(tolua_S,"addDocumentCallbackControlEvents",lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackControlEvents); - tolua_function(tolua_S,"init",lua_cocos2dx_cocosbuilder_CCBAnimationManager_init); - tolua_function(tolua_S,"getKeyframeCallbacks",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getKeyframeCallbacks); - tolua_function(tolua_S,"getDocumentCallbackControlEvents",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackControlEvents); - tolua_function(tolua_S,"setRootContainerSize",lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootContainerSize); - tolua_function(tolua_S,"runAnimationsForSequenceIdTweenDuration",lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceIdTweenDuration); - tolua_function(tolua_S,"getRunningSequenceName",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRunningSequenceName); - tolua_function(tolua_S,"getAutoPlaySequenceId",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getAutoPlaySequenceId); - tolua_function(tolua_S,"addDocumentCallbackName",lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackName); - tolua_function(tolua_S,"getRootNode",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getRootNode); - tolua_function(tolua_S,"addDocumentOutletNode",lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletNode); - tolua_function(tolua_S,"getSequenceDuration",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceDuration); - tolua_function(tolua_S,"addDocumentCallbackNode",lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackNode); - tolua_function(tolua_S,"runAnimationsForSequenceNamed",lua_cocos2dx_cocosbuilder_CCBAnimationManager_runAnimationsForSequenceNamed); - tolua_function(tolua_S,"getSequenceId",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getSequenceId); - tolua_function(tolua_S,"getDocumentCallbackNodes",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentCallbackNodes); - tolua_function(tolua_S,"setSequences",lua_cocos2dx_cocosbuilder_CCBAnimationManager_setSequences); - tolua_function(tolua_S,"debug",lua_cocos2dx_cocosbuilder_CCBAnimationManager_debug); - tolua_function(tolua_S,"getDocumentControllerName",lua_cocos2dx_cocosbuilder_CCBAnimationManager_getDocumentControllerName); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocosbuilder::CCBAnimationManager).name(); - g_luaType[typeName] = "cc.CCBAnimationManager"; - g_typeCast["CCBAnimationManager"] = "cc.CCBAnimationManager"; - return 1; -} - -int lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletName(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletName'", 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.CCBReader:addOwnerOutletName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletName'", nullptr); - return 0; - } - cobj->addOwnerOutletName(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:addOwnerOutletName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNames(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNames'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNames'", nullptr); - return 0; - } - cocos2d::ValueVector ret = cobj->getOwnerCallbackNames(); - ccvaluevector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:getOwnerCallbackNames",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNames'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_addDocumentCallbackControlEvents(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_addDocumentCallbackControlEvents'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::extension::Control::EventType arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.CCBReader:addDocumentCallbackControlEvents"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_addDocumentCallbackControlEvents'", nullptr); - return 0; - } - cobj->addDocumentCallbackControlEvents(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:addDocumentCallbackControlEvents",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_addDocumentCallbackControlEvents'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_setCCBRootPath(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_setCCBRootPath'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - const char* arg0; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.CCBReader:setCCBRootPath"); arg0 = arg0_tmp.c_str(); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_setCCBRootPath'", nullptr); - return 0; - } - cobj->setCCBRootPath(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:setCCBRootPath",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_setCCBRootPath'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletNode(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletNode'", 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, "cc.CCBReader:addOwnerOutletNode"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletNode'", nullptr); - return 0; - } - cobj->addOwnerOutletNode(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:addOwnerOutletNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNodes(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNodes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNodes'", nullptr); - return 0; - } - cocos2d::Vector& ret = cobj->getOwnerCallbackNodes(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:getOwnerCallbackNodes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNodes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_readSoundKeyframesForSeq(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_readSoundKeyframesForSeq'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocosbuilder::CCBSequence* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequence",&arg0, "cc.CCBReader:readSoundKeyframesForSeq"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_readSoundKeyframesForSeq'", nullptr); - return 0; - } - bool ret = cobj->readSoundKeyframesForSeq(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:readSoundKeyframesForSeq",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_readSoundKeyframesForSeq'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_getCCBRootPath(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_getCCBRootPath'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_getCCBRootPath'", nullptr); - return 0; - } - const std::string& ret = cobj->getCCBRootPath(); - lua_pushlstring(tolua_S,ret.c_str(),ret.length()); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:getCCBRootPath",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_getCCBRootPath'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackControlEvents(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackControlEvents'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackControlEvents'", nullptr); - return 0; - } - cocos2d::ValueVector& ret = cobj->getOwnerCallbackControlEvents(); - ccvaluevector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:getOwnerCallbackControlEvents",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackControlEvents'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNodes(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNodes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNodes'", nullptr); - return 0; - } - cocos2d::Vector& ret = cobj->getOwnerOutletNodes(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:getOwnerOutletNodes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNodes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_readUTF8(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_readUTF8'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_readUTF8'", nullptr); - return 0; - } - std::string ret = cobj->readUTF8(); - lua_pushlstring(tolua_S,ret.c_str(),ret.length()); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:readUTF8",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_readUTF8'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_addOwnerCallbackControlEvents(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerCallbackControlEvents'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::extension::Control::EventType arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.CCBReader:addOwnerCallbackControlEvents"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerCallbackControlEvents'", nullptr); - return 0; - } - cobj->addOwnerCallbackControlEvents(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:addOwnerCallbackControlEvents",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerCallbackControlEvents'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNames(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNames'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNames'", nullptr); - return 0; - } - cocos2d::ValueVector ret = cobj->getOwnerOutletNames(); - ccvaluevector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:getOwnerOutletNames",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNames'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_setAnimationManager(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_setAnimationManager'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocosbuilder::CCBAnimationManager* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.CCBAnimationManager",&arg0, "cc.CCBReader:setAnimationManager"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_setAnimationManager'", nullptr); - return 0; - } - cobj->setAnimationManager(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:setAnimationManager",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_setAnimationManager'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_readCallbackKeyframesForSeq(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_readCallbackKeyframesForSeq'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocosbuilder::CCBSequence* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequence",&arg0, "cc.CCBReader:readCallbackKeyframesForSeq"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_readCallbackKeyframesForSeq'", nullptr); - return 0; - } - bool ret = cobj->readCallbackKeyframesForSeq(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:readCallbackKeyframesForSeq",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_readCallbackKeyframesForSeq'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManagersForNodes(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManagersForNodes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManagersForNodes'", nullptr); - return 0; - } - cocos2d::Vector& ret = cobj->getAnimationManagersForNodes(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:getAnimationManagersForNodes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManagersForNodes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_getNodesWithAnimationManagers(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_getNodesWithAnimationManagers'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_getNodesWithAnimationManagers'", nullptr); - return 0; - } - cocos2d::Vector& ret = cobj->getNodesWithAnimationManagers(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:getNodesWithAnimationManagers",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_getNodesWithAnimationManagers'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManager(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocosbuilder::CCBReader*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManager'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManager'", nullptr); - return 0; - } - cocosbuilder::CCBAnimationManager* ret = cobj->getAnimationManager(); - object_to_luaval(tolua_S, "cc.CCBAnimationManager",(cocosbuilder::CCBAnimationManager*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:getAnimationManager",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManager'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_setResolutionScale(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.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CCBReader:setResolutionScale"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_setResolutionScale'", nullptr); - return 0; - } - cocosbuilder::CCBReader::setResolutionScale(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.CCBReader:setResolutionScale",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_setResolutionScale'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocosbuilder::CCBReader* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocosbuilder::CCBReader* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.CCBReader",&arg0, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cobj = new cocosbuilder::CCBReader(arg0); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CCBReader"); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocosbuilder::NodeLoaderLibrary* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cobj = new cocosbuilder::CCBReader(arg0); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CCBReader"); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - cocosbuilder::NodeLoaderLibrary* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cocosbuilder::CCBMemberVariableAssigner* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.CCBMemberVariableAssigner",&arg1, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cobj = new cocosbuilder::CCBReader(arg0, arg1); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CCBReader"); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocosbuilder::NodeLoaderLibrary* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cocosbuilder::CCBMemberVariableAssigner* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.CCBMemberVariableAssigner",&arg1, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cocosbuilder::CCBSelectorResolver* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.CCBSelectorResolver",&arg2, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cobj = new cocosbuilder::CCBReader(arg0, arg1, arg2); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CCBReader"); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 4) { - cocosbuilder::NodeLoaderLibrary* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cocosbuilder::CCBMemberVariableAssigner* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.CCBMemberVariableAssigner",&arg1, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cocosbuilder::CCBSelectorResolver* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.CCBSelectorResolver",&arg2, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cocosbuilder::NodeLoaderListener* arg3; - ok &= luaval_to_object(tolua_S, 5, "cc.NodeLoaderListener",&arg3, "cc.CCBReader:CCBReader"); - - if (!ok) { break; } - cobj = new cocosbuilder::CCBReader(arg0, arg1, arg2, arg3); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CCBReader"); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cobj = new cocosbuilder::CCBReader(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.CCBReader"); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CCBReader:CCBReader",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosbuilder_CCBReader_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_cocosbuilder_CCBReader_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (CCBReader)"); - return 0; -} - -int lua_register_cocos2dx_cocosbuilder_CCBReader(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.CCBReader"); - tolua_cclass(tolua_S,"CCBReader","cc.CCBReader","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"CCBReader"); - tolua_function(tolua_S,"new",lua_cocos2dx_cocosbuilder_CCBReader_constructor); - tolua_function(tolua_S,"addOwnerOutletName",lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletName); - tolua_function(tolua_S,"getOwnerCallbackNames",lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNames); - tolua_function(tolua_S,"addDocumentCallbackControlEvents",lua_cocos2dx_cocosbuilder_CCBReader_addDocumentCallbackControlEvents); - tolua_function(tolua_S,"setCCBRootPath",lua_cocos2dx_cocosbuilder_CCBReader_setCCBRootPath); - tolua_function(tolua_S,"addOwnerOutletNode",lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletNode); - tolua_function(tolua_S,"getOwnerCallbackNodes",lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackNodes); - tolua_function(tolua_S,"readSoundKeyframesForSeq",lua_cocos2dx_cocosbuilder_CCBReader_readSoundKeyframesForSeq); - tolua_function(tolua_S,"getCCBRootPath",lua_cocos2dx_cocosbuilder_CCBReader_getCCBRootPath); - tolua_function(tolua_S,"getOwnerCallbackControlEvents",lua_cocos2dx_cocosbuilder_CCBReader_getOwnerCallbackControlEvents); - tolua_function(tolua_S,"getOwnerOutletNodes",lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNodes); - tolua_function(tolua_S,"readUTF8",lua_cocos2dx_cocosbuilder_CCBReader_readUTF8); - tolua_function(tolua_S,"addOwnerCallbackControlEvents",lua_cocos2dx_cocosbuilder_CCBReader_addOwnerCallbackControlEvents); - tolua_function(tolua_S,"getOwnerOutletNames",lua_cocos2dx_cocosbuilder_CCBReader_getOwnerOutletNames); - tolua_function(tolua_S,"setActionManager",lua_cocos2dx_cocosbuilder_CCBReader_setAnimationManager); - tolua_function(tolua_S,"readCallbackKeyframesForSeq",lua_cocos2dx_cocosbuilder_CCBReader_readCallbackKeyframesForSeq); - tolua_function(tolua_S,"getAnimationManagersForNodes",lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManagersForNodes); - tolua_function(tolua_S,"getNodesWithAnimationManagers",lua_cocos2dx_cocosbuilder_CCBReader_getNodesWithAnimationManagers); - tolua_function(tolua_S,"getActionManager",lua_cocos2dx_cocosbuilder_CCBReader_getAnimationManager); - tolua_function(tolua_S,"setResolutionScale", lua_cocos2dx_cocosbuilder_CCBReader_setResolutionScale); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocosbuilder::CCBReader).name(); - g_luaType[typeName] = "cc.CCBReader"; - g_typeCast["CCBReader"] = "cc.CCBReader"; - return 1; -} -TOLUA_API int register_all_cocos2dx_cocosbuilder(lua_State* tolua_S) -{ - tolua_open(tolua_S); - - tolua_module(tolua_S,"cc",0); - tolua_beginmodule(tolua_S,"cc"); - - lua_register_cocos2dx_cocosbuilder_CCBAnimationManager(tolua_S); - lua_register_cocos2dx_cocosbuilder_CCBReader(tolua_S); - - tolua_endmodule(tolua_S); - return 1; -} - diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.hpp deleted file mode 100644 index 42f7b98e06..0000000000 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.hpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "base/ccConfig.h" -#ifndef __cocos2dx_cocosbuilder_h__ -#define __cocos2dx_cocosbuilder_h__ - -#ifdef __cplusplus -extern "C" { -#endif -#include "tolua++.h" -#ifdef __cplusplus -} -#endif - -int register_all_cocos2dx_cocosbuilder(lua_State* tolua_S); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#endif // __cocos2dx_cocosbuilder_h__ diff --git a/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp b/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp index 9d502d9ad5..a01569d353 100644 --- a/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp @@ -68,8 +68,9 @@ CC_DEPRECATED_ATTRIBUTE int lua_cocos2dx_3d_Sprite3D_setBlendFunc01(lua_State* L if (!luaval_to_int32(L, 3, (int32_t*)&dst, "cc.Sprite3D:setBlendFunc")) return 0; - BlendFunc blendFunc = {src, dst}; - cobj->setBlendFunc(blendFunc); +//TODO minggo +// BlendFunc blendFunc = {src, dst}; +// cobj->setBlendFunc(blendFunc); lua_settop(L, 1); return 1; diff --git a/cocos/scripting/lua-bindings/manual/CCLuaEngine.cpp b/cocos/scripting/lua-bindings/manual/CCLuaEngine.cpp index 4e6df93a4b..62c9ec8502 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaEngine.cpp +++ b/cocos/scripting/lua-bindings/manual/CCLuaEngine.cpp @@ -28,7 +28,6 @@ #include "scripting/lua-bindings/manual/tolua_fix.h" #include "extensions/GUI/CCControlExtension/CCControl.h" -#include "scripting/lua-bindings/manual/cocos2d/LuaOpengl.h" #include "scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.hpp" #include "scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.h" #include "scripting/lua-bindings/manual/cocostudio/lua_cocos2dx_coco_studio_manual.hpp" diff --git a/cocos/scripting/lua-bindings/manual/CCLuaEngine.h b/cocos/scripting/lua-bindings/manual/CCLuaEngine.h index 6580e16d80..c37a62ad68 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaEngine.h +++ b/cocos/scripting/lua-bindings/manual/CCLuaEngine.h @@ -37,7 +37,7 @@ extern "C" { #include "scripting/lua-bindings/manual/CCLuaValue.h" #include "scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h" #include "scripting/lua-bindings/manual/Lua-BindingsExport.h" -#include "deprecated/CCNotificationCenter.h" +#include "scripting/deprecated/CCNotificationCenter.h" /** * @addtogroup lua diff --git a/cocos/scripting/lua-bindings/manual/CCLuaStack.cpp b/cocos/scripting/lua-bindings/manual/CCLuaStack.cpp index 72768d2200..cf396abd93 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaStack.cpp +++ b/cocos/scripting/lua-bindings/manual/CCLuaStack.cpp @@ -45,7 +45,6 @@ extern "C" { #include "scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h" #endif -#include "scripting/lua-bindings/manual/cocos2d/LuaOpengl.h" #include "scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h" #include "scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp" #include "scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.hpp" @@ -56,8 +55,8 @@ extern "C" { #include "scripting/lua-bindings/auto/lua_cocos2dx_experimental_auto.hpp" #include "scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_experimental_manual.hpp" #include "base/ZipUtils.h" -#include "deprecated/CCBool.h" -#include "deprecated/CCDouble.h" +#include "scripting/deprecated/CCBool.h" +#include "scripting/deprecated/CCDouble.h" #include "platform/CCFileUtils.h" namespace { @@ -136,7 +135,7 @@ bool LuaStack::init(void) toluafix_open(_state); // Register our version of the global "print" function - const luaL_reg global_functions [] = { + const luaL_Reg global_functions [] = { {"print", lua_print}, {"release_print",lua_release_print}, {nullptr, nullptr} @@ -145,14 +144,13 @@ bool LuaStack::init(void) g_luaType.clear(); register_all_cocos2dx(_state); - tolua_opengl_open(_state); register_all_cocos2dx_manual(_state); register_all_cocos2dx_module_manual(_state); register_all_cocos2dx_math_manual(_state); - register_all_cocos2dx_experimental(_state); + //TODO minggo + // register_all_cocos2dx_experimental(_state); register_all_cocos2dx_experimental_manual(_state); - register_glnode_manual(_state); #if CC_USE_PHYSICS register_all_cocos2dx_physics(_state); register_all_cocos2dx_physics_manual(_state); diff --git a/cocos/scripting/lua-bindings/manual/CCLuaStack.h b/cocos/scripting/lua-bindings/manual/CCLuaStack.h index d4e62391a5..dee8f4191c 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaStack.h +++ b/cocos/scripting/lua-bindings/manual/CCLuaStack.h @@ -31,7 +31,7 @@ extern "C" { #include "lua.h" } -#include "deprecated/CCArray.h" +#include "scripting/deprecated/CCArray.h" #include "scripting/lua-bindings/manual/CCLuaValue.h" diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp index b51872e1fc..713bcdddbb 100644 --- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp +++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp @@ -25,11 +25,11 @@ #include "scripting/lua-bindings/manual/LuaBasicConversions.h" #include "scripting/lua-bindings/manual/tolua_fix.h" -#include "deprecated/CCBool.h" +#include "scripting/deprecated/CCBool.h" -#include "deprecated/CCDouble.h" -#include "deprecated/CCFloat.h" -#include "deprecated/CCInteger.h" +#include "scripting/deprecated/CCDouble.h" +#include "scripting/deprecated/CCFloat.h" +#include "scripting/deprecated/CCInteger.h" std::unordered_map g_luaType; std::unordered_map g_typeCast; @@ -422,15 +422,16 @@ bool luaval_to_blendfunc(lua_State* L, int lo, cocos2d::BlendFunc* outValue, con if (ok) { - lua_pushstring(L, "src"); - lua_gettable(L, lo); - outValue->src = lua_isnil(L, -1) ? 0 : lua_tonumber(L, -1); - lua_pop(L, 1); - - lua_pushstring(L, "dst"); - lua_gettable(L, lo); - outValue->dst = lua_isnil(L, -1) ? 0 : lua_tonumber(L, -1); - lua_pop(L, 1); + //TODO minggo +// lua_pushstring(L, "src"); +// lua_gettable(L, lo); +// outValue->src = lua_isnil(L, -1) ? 0 : lua_tonumber(L, -1); +// lua_pop(L, 1); +// +// lua_pushstring(L, "dst"); +// lua_gettable(L, lo); +// outValue->dst = lua_isnil(L, -1) ? 0 : lua_tonumber(L, -1); +// lua_pop(L, 1); } return ok; } @@ -1007,95 +1008,6 @@ bool luaval_to_ttfconfig(lua_State* L,int lo, cocos2d::TTFConfig* outValue, cons return false; } - -bool luaval_to_uniform(lua_State* L, int lo, cocos2d::Uniform* outValue, const char* funcName) -{ - if (nullptr == L || nullptr == outValue) - return false; - - bool ok = true; - - tolua_Error tolua_err; - if (!tolua_istable(L, lo, 0, &tolua_err) ) - { -#if COCOS2D_DEBUG >=1 - luaval_to_native_err(L,"#ferror:",&tolua_err,funcName); -#endif - ok = false; - } - - if (ok) - { - lua_pushstring(L, "location"); /* L: paramStack key */ - lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ - outValue->location = lua_isnumber(L, -1)? (GLint)lua_tointeger(L, -1) : 0; - lua_pop(L,1); /* L: paramStack*/ - - lua_pushstring(L, "size"); - lua_gettable(L,lo); - outValue->size = lua_isnumber(L, -1)?(GLint)lua_tointeger(L, -1) : 0; - lua_pop(L,1); - - lua_pushstring(L, "type"); - lua_gettable(L, lo); - outValue->type = lua_isnumber(L, -1)?(GLenum)lua_tointeger(L, -1) : 0; - lua_pop(L, 1); - - lua_pushstring(L, "name"); - lua_gettable(L, lo); - outValue->name = lua_isstring(L, -1)?lua_tostring(L, -1) : ""; - lua_pop(L, 1); - - return true; - } - - return false; -} - -bool luaval_to_vertexattrib(lua_State* L, int lo, cocos2d::VertexAttrib* outValue, const char* funcName) -{ - if (nullptr == L || nullptr == outValue) - return false; - - bool ok = true; - - tolua_Error tolua_err; - if (!tolua_istable(L, lo, 0, &tolua_err) ) - { -#if COCOS2D_DEBUG >=1 - luaval_to_native_err(L,"#ferror:",&tolua_err,funcName); -#endif - ok = false; - } - - if (ok) - { - lua_pushstring(L, "index"); /* L: paramStack key */ - lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ - outValue->index = lua_isnumber(L, -1)? (GLint)lua_tointeger(L, -1) : 0; - lua_pop(L,1); /* L: paramStack*/ - - lua_pushstring(L, "size"); - lua_gettable(L,lo); - outValue->size = lua_isnumber(L, -1)?(GLint)lua_tointeger(L, -1) : 0; - lua_pop(L,1); - - lua_pushstring(L, "type"); - lua_gettable(L, lo); - outValue->type = lua_isnumber(L, -1)?(GLenum)lua_tointeger(L, -1) : 0; - lua_pop(L, 1); - - lua_pushstring(L, "name"); - lua_gettable(L, lo); - outValue->name = lua_isstring(L, -1)?lua_tostring(L, -1) : ""; - lua_pop(L, 1); - - return true; - } - - return false; -} - bool luaval_to_mat4(lua_State* L, int lo, cocos2d::Mat4* outValue , const char* funcName) { if (nullptr == L || nullptr == outValue) @@ -1916,25 +1828,26 @@ bool luaval_to_mesh_vertex_attrib(lua_State* L, int lo, cocos2d::MeshVertexAttri if (ok) { - lua_pushstring(L, "size"); /* L: paramStack key */ - lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ - ret->size = (GLint)lua_tonumber(L, -1); - lua_pop(L,1); - - lua_pushstring(L, "type"); /* L: paramStack key */ - lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ - ret->type = (GLenum)lua_tonumber(L, -1); - lua_pop(L,1); - - lua_pushstring(L, "vertexAttrib"); /* L: paramStack key */ - lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ - ret->type = (GLenum)lua_tonumber(L, -1); - lua_pop(L,1); - - lua_pushstring(L, "attribSizeBytes"); /* L: paramStack key */ - lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ - ret->type = (GLenum)lua_tonumber(L, -1); - lua_pop(L,1); + //TODO minggo +// lua_pushstring(L, "size"); /* L: paramStack key */ +// lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ +// ret->size = (GLint)lua_tonumber(L, -1); +// lua_pop(L,1); +// +// lua_pushstring(L, "type"); /* L: paramStack key */ +// lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ +// ret->type = (GLenum)lua_tonumber(L, -1); +// lua_pop(L,1); +// +// lua_pushstring(L, "vertexAttrib"); /* L: paramStack key */ +// lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ +// ret->type = (GLenum)lua_tonumber(L, -1); +// lua_pop(L,1); +// +// lua_pushstring(L, "attribSizeBytes"); /* L: paramStack key */ +// lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */ +// ret->type = (GLenum)lua_tonumber(L, -1); +// lua_pop(L,1); } return ok; @@ -3136,77 +3049,29 @@ void ttfconfig_to_luaval(lua_State* L, const cocos2d::TTFConfig& config) lua_rawset(L, -3); } - -void uniform_to_luaval(lua_State* L, const cocos2d::Uniform& uniform) -{ - if (nullptr == L) - return; - - lua_newtable(L); - - lua_pushstring(L, "location"); - lua_pushnumber(L, (lua_Number)uniform.location); - lua_rawset(L, -3); - - lua_pushstring(L, "size"); - lua_pushnumber(L, (lua_Number)uniform.size); - lua_rawset(L, -3); - - lua_pushstring(L, "type"); - lua_pushnumber(L, (lua_Number)uniform.type); - lua_rawset(L, -3); - - lua_pushstring(L, "name"); - tolua_pushcppstring(L, uniform.name); - lua_rawset(L, -3); -} - -void vertexattrib_to_luaval(lua_State* L, const cocos2d::VertexAttrib& verAttrib) -{ - if (nullptr == L) - return; - - lua_newtable(L); - - lua_pushstring(L, "index"); - lua_pushnumber(L, (lua_Number)verAttrib.index); - lua_rawset(L, -3); - - lua_pushstring(L, "size"); - lua_pushnumber(L, (lua_Number)verAttrib.size); - lua_rawset(L, -3); - - lua_pushstring(L, "type"); - lua_pushnumber(L, (lua_Number)verAttrib.type); - lua_rawset(L, -3); - - lua_pushstring(L, "name"); - tolua_pushcppstring(L, verAttrib.name); - lua_rawset(L, -3); -} - void mesh_vertex_attrib_to_luaval(lua_State* L, const cocos2d::MeshVertexAttrib& inValue) { if (nullptr == L) return; - lua_newtable(L); - - lua_pushstring(L, "size"); - lua_pushnumber(L, (lua_Number)inValue.size); - lua_rawset(L, -3); - - lua_pushstring(L, "type"); - lua_pushnumber(L, (lua_Number)inValue.type); - lua_rawset(L, -3); - - lua_pushstring(L, "vertexAttrib"); - lua_pushnumber(L, (lua_Number)inValue.vertexAttrib); - lua_rawset(L, -3); - - lua_pushstring(L, "attribSizeBytes"); - lua_pushnumber(L, (lua_Number)inValue.attribSizeBytes); - lua_rawset(L, -3); +//TODO minggo +// lua_newtable(L); +// +// lua_pushstring(L, "size"); +// lua_pushnumber(L, (lua_Number)inValue.size); +// lua_rawset(L, -3); +// +// lua_pushstring(L, "type"); +// lua_pushnumber(L, (lua_Number)inValue.type); +// lua_rawset(L, -3); +// +// lua_pushstring(L, "vertexAttrib"); +// lua_pushnumber(L, (lua_Number)inValue.vertexAttrib); +// lua_rawset(L, -3); +// +// lua_pushstring(L, "attribSizeBytes"); +// lua_pushnumber(L, (lua_Number)inValue.attribSizeBytes); +// lua_rawset(L, -3); } diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h index 91eb6e635a..ec1cf715ff 100644 --- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h +++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h @@ -41,14 +41,12 @@ extern "C" { #include "3d/CCBundle3D.h" #include "base/CCValue.h" #include "base/ccTypes.h" -#include "deprecated/CCArray.h" -#include "deprecated/CCDictionary.h" +#include "scripting/deprecated/CCArray.h" +#include "scripting/deprecated/CCDictionary.h" #include "physics/CCPhysicsContact.h" #include "physics/CCPhysicsJoint.h" #include "physics/CCPhysicsShape.h" #include "physics/CCPhysicsWorld.h" -#include "renderer/CCGLProgram.h" - using namespace cocos2d; @@ -450,33 +448,6 @@ extern bool luaval_to_blendfunc(lua_State* L, int lo, cocos2d::BlendFunc* outVal */ extern bool luaval_to_ttfconfig(lua_State* L, int lo, cocos2d::TTFConfig* outValue, const char* funcName = ""); -/** - * Get a Uniform object value from the given acceptable index of stack. - * If the value at the given acceptable index of stack is a table it returns true, otherwise returns false. - * If the table has the `location`, `size`, `type` and `name` keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be given the default value. - * - * @param L the current lua_State. - * @param lo the given acceptable index of stack. - * @param outValue the pointer to a Uniform object which stores the values from the Lua table. - * @param funcName the name of calling function, it is used for error output in the debug model. - * @return Return true if the value at the given acceptable index of stack is a table, otherwise return false. - */ -extern bool luaval_to_uniform(lua_State* L, int lo, cocos2d::Uniform* outValue, const char* funcName = ""); - -/** - * Get a VertexAttrib object value from the given acceptable index of stack. - * If the value at the given acceptable index of stack is a table it returns true, otherwise returns false. - * If the table has the `index`, `size`, `type` and `name` keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be given the default value. - * - * @param L the current lua_State. - * @param lo the given acceptable index of stack. - * @param outValue the pointer to a VertexAttrib object which stores the values from the Lua table. - * @param funcName the name of calling function, it is used for error output in the debug model. - * @return Return true if the value at the given acceptable index of stack is a table, otherwise return false. - */ -extern bool luaval_to_vertexattrib(lua_State* L, int lo, cocos2d::VertexAttrib* outValue, const char* funcName = ""); - - /** * Get a Vec2 object value from the given acceptable index of stack. * At current, the Point is typedef of Vec2. @@ -1022,25 +993,6 @@ extern void blendfunc_to_luaval(lua_State* L, const cocos2d::BlendFunc& func); */ extern void ttfconfig_to_luaval(lua_State* L, const cocos2d::TTFConfig& config); -/** - * Push a table converted from a cocos2d::Uniform object into the Lua stack. - * The format of table as follows: {location=numberValue1, size=numberValue2, type=numberValue3, name=stringValue1} - * - * @param L the current lua_State. - * @param uniform a cocos2d::Uniform object. - */ -extern void uniform_to_luaval(lua_State* L, const cocos2d::Uniform& uniform); - -/** - * Push a table converted from a cocos2d::VertexAttrib object into the Lua stack. - * The format of table as follows: {index=numberValue1, size=numberValue2, type=numberValue3, name=stringValue1} - * - * @param L the current lua_State. - * @param verAttrib a cocos2d::VertexAttrib object. - */ -extern void vertexattrib_to_luaval(lua_State* L, const cocos2d::VertexAttrib& verAttrib); - - static inline void point_to_luaval(lua_State* L,const cocos2d::Vec2& pt) { vec2_to_luaval(L, pt); diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.cpp b/cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.cpp deleted file mode 100644 index 48bfb261ab..0000000000 --- a/cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.cpp +++ /dev/null @@ -1,5307 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - 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 "scripting/lua-bindings/manual/cocos2d/LuaOpengl.h" -#include -#include -#include "scripting/lua-bindings/manual/tolua_fix.h" - -#include "scripting/lua-bindings/manual/CCLuaStack.h" -#include "scripting/lua-bindings/manual/CCLuaValue.h" -#include "scripting/lua-bindings/manual/CCLuaEngine.h" -#include "scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h" -#include "scripting/lua-bindings/manual/LuaBasicConversions.h" -#include "2d/CCActionCatmullRom.h" -#include "2d/CCDrawingPrimitives.h" -#include "renderer/CCRenderer.h" -#include "platform/CCGL.h" - -using namespace cocos2d; - - -void GLNode::draw(Renderer *renderer, const cocos2d::Mat4& transform, uint32_t flags) -{ - _renderCmd.init(_globalZOrder); - _renderCmd.func = CC_CALLBACK_0(GLNode::onDraw, this, transform, flags); - renderer->addCommand(&_renderCmd); -} - -void GLNode::onDraw(const cocos2d::Mat4 &transform, uint32_t flags) -{ - int handler = ScriptHandlerMgr::getInstance()->getObjectHandler((void*)this, ScriptHandlerMgr::HandlerType::GL_NODE_DRAW); - if (0 != handler) - { - - LuaStack* stack = LuaEngine::getInstance()->getLuaStack(); - lua_State* L = stack->getLuaState(); - - lua_newtable(L); - for (int i =0; i < 16; i++) - { - stack->pushFloat(transform.m[i]); - lua_rawseti(L, -2, i + 1); - } - stack->pushInt(flags); - stack->executeFunctionByHandler(handler, 2); - stack->clean(); - } -} - -/* function to release collected object via destructor */ -static void tolua_reg_gl_type(lua_State* tolua_S) -{ - tolua_usertype(tolua_S, "cc.GLNode"); -} - -static int tolua_collect_GLNode (lua_State* tolua_S) -{ - GLNode *self = (GLNode*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -/* method: create of class GLNode */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_GLNode_create00 -static int tolua_Cocos2d_GLNode_create00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cc.GLNode",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - GLNode *glNode = new (std::nothrow) GLNode(); - if (NULL != glNode) - { - glNode->autorelease(); - int nID = (int)glNode->_ID; - int* pLuaID = &glNode->_luaID; - toluafix_pushusertype_ccobject(tolua_S, nID, pLuaID, (void*)glNode,"cc.GLNode"); - //tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - else - { - return 0; - } - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'create'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: setShaderProgram of class GLNode */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_GLNode_setShaderProgram00 -static int tolua_Cocos2d_GLNode_setShaderProgram00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cc.GLNode",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cc.GLProgram",0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - GLNode* self = (GLNode*) tolua_tousertype(tolua_S,1,0); - GLProgram* pShaderProgram = ((GLProgram*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setShaderProgram'", NULL); -#endif - if(NULL != self) - self->setGLProgram(pShaderProgram); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'setShaderProgram'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetSupportedExtensions*/ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetSupportedExtensions00 -static int tolua_Cocos2d_glGetSupportedExtensions00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!tolua_isnoobj(tolua_S,1,&tolua_err)) - goto tolua_lerror; - else -#endif - { - const GLubyte* extensions = glGetString(GL_EXTENSIONS); - size_t len = strlen((const char*)extensions); - GLubyte* copy = new (std::nothrow) GLubyte[len+1]; - strncpy((char*)copy, (const char*)extensions, len ); - - int start_extension=0; - LuaValueArray array; - for (unsigned int i=0; i < len+1; i++) - { - if( copy[i]==' ' || copy[i]==',' || i == len ) - { - copy[i] = 0; - LuaValue value = LuaValue::stringValue((const char*)©[start_extension]); - array.push_back(value); - start_extension = i+1; - i++; - } - } - - lua_newtable(tolua_S); /* L: table */ - int index = 1; - for (LuaValueArrayIterator it = array.begin(); it != array.end(); ++it) - { - lua_pushstring(tolua_S, (*it).stringValue().c_str()); /* L: table value */ - lua_rawseti(tolua_S, -2, index); /* table[index] = value, L: table */ - ++index; - } - CC_SAFE_DELETE_ARRAY(copy); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetSupportedExtensions'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - - -/* function: glActiveTexture */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glActiveTexture00 -static int tolua_Cocos2d_glActiveTexture00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int activeTexture = (unsigned int)tolua_tonumber(tolua_S,1,0); - glActiveTexture((GLenum)activeTexture); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glActiveTexture'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glAttachShader */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glAttachShader00 -static int tolua_Cocos2d_glAttachShader00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int program = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int shader = (unsigned int)tolua_tonumber(tolua_S,2,0); - glAttachShader ((GLuint)program,(GLuint) shader); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glAttachShader'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBindAttribLocation */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBindAttribLocation00 -static int tolua_Cocos2d_glBindAttribLocation00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isstring(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int program = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int index = (unsigned int)tolua_tonumber(tolua_S,2,0); - const char* name = (const char*)tolua_tostring(tolua_S, 3, ""); - glBindAttribLocation ((GLuint)program,(GLuint) index,name); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBindAttribLocation'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBindBuffer */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBindBuffer00 -static int tolua_Cocos2d_glBindBuffer00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int buffer = (unsigned int)tolua_tonumber(tolua_S,2,0); - glBindBuffer((GLenum)target,(GLuint)buffer); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBindBuffer'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: glBindFramebuffer of class GLNode */ -/* -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBindFramebuffer00 -static int tolua_Cocos2d_glBindFramebuffer00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"GLNode",0,&tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,2,0); - unsigned int framebuffer = (unsigned int)tolua_tonumber(tolua_S,3,0); - glBindFramebuffer((GLenum)target,(GLuint)framebuffer); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBindFramebuffer'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE -*/ - -/* function: glBindRenderbuffer */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBindRenderbuffer00 -static int tolua_Cocos2d_glBindRenderbuffer00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int renderbuffer = (unsigned int)tolua_tonumber(tolua_S,2,0); - glBindRenderbuffer((GLenum)target,(GLuint)renderbuffer); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBindRenderbuffer'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBindTexture */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBindTexture00 -static int tolua_Cocos2d_glBindTexture00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int texture = (unsigned int)tolua_tonumber(tolua_S,2,0); - glBindTexture((GLenum)target,(GLuint)texture); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBindTexture'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBlendColor */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBlendColor00 -static int tolua_Cocos2d_glBlendColor00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int red = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int green = (unsigned int)tolua_tonumber(tolua_S,2,0); - unsigned int blue = (unsigned int)tolua_tonumber(tolua_S,3,0); - unsigned int alpha = (unsigned int)tolua_tonumber(tolua_S,4,0); - glBlendColor((GLclampf)red , (GLclampf)green , (GLclampf)blue , (GLclampf)alpha ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBlendColor'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBlendEquation */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBlendEquation00 -static int tolua_Cocos2d_glBlendEquation00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int mode = (unsigned int)tolua_tonumber(tolua_S,1,0); - glBlendEquation((GLenum)mode); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBlendEquation'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBlendEquationSeparate */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBlendEquationSeparate00 -static int tolua_Cocos2d_glBlendEquationSeparate00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int modeRGB = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int modeAlpha = (unsigned int)tolua_tonumber(tolua_S,2,0); - glBlendEquationSeparate((GLenum)modeRGB , (GLenum)modeAlpha ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBlendEquationSeparate'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBlendFunc */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBlendFunc00 -static int tolua_Cocos2d_glBlendFunc00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int sfactor = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int dfactor = (unsigned int)tolua_tonumber(tolua_S,2,0); - glBlendFunc((GLenum)sfactor , (GLenum)dfactor); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBlendFunc'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBlendFuncSeparate */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBlendFuncSeparate00 -static int tolua_Cocos2d_glBlendFuncSeparate00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int srcRGB = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int dstRGB = (unsigned int)tolua_tonumber(tolua_S,2,0); - unsigned int srcAlpha = (unsigned int)tolua_tonumber(tolua_S,3,0); - unsigned int dstAlpha = (unsigned int)tolua_tonumber(tolua_S,4,0); - glBlendFuncSeparate((GLenum)srcRGB , (GLenum)dstRGB , (GLenum)srcAlpha , (GLenum)dstAlpha ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBlendFuncSeparate'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBufferData */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBufferData00 -static int tolua_Cocos2d_glBufferData00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2, 0,&tolua_err) || - !tolua_istable(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - long length = (long)tolua_tonumber(tolua_S,2,0); - float* floatArray = new (std::nothrow) float[length]; - if (NULL == floatArray) - { - return 0; - } - for (int i = 1; i <= length; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - unsigned int usage = (unsigned int)tolua_tonumber(tolua_S,4,0); - long lengthInByte = length * sizeof(float); - glBufferData((GLenum)target , (GLsizeiptr)lengthInByte, (GLvoid*)floatArray , (GLenum)usage); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBufferData'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glBufferSubData */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glBufferSubData00 -static int tolua_Cocos2d_glBufferSubData00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2, 0,&tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - long offset = (long)tolua_tonumber(tolua_S,2,0); - long length = (long)tolua_tonumber(tolua_S,3,0); - float* floatArray = new (std::nothrow) float[length]; - if (NULL == floatArray) - { - return 0; - } - for (int i = 1; i <= length; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - long lengthInByte = length * sizeof(float); - long offsetInByte = offset * sizeof(float); - glBufferSubData((GLenum)target,(GLintptr)offsetInByte,(GLsizei)lengthInByte,(GLvoid*)floatArray); - - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glBufferData'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glCheckFramebufferStatus */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glCheckFramebufferStatus00 -static int tolua_Cocos2d_glCheckFramebufferStatus00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int retVal = glCheckFramebufferStatus((GLenum)target); - tolua_pushnumber(tolua_S,retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glCheckFramebufferStatus'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glClear */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glClear00 -static int tolua_Cocos2d_glClear00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int mask = (unsigned int)tolua_tonumber(tolua_S,1,0); - glClear((GLbitfield)mask); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glClear'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glClearColor */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glClearColor00 -static int tolua_Cocos2d_glClearColor00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - GLclampf red = (GLclampf)tolua_tonumber(tolua_S,1,0); - GLclampf green = (GLclampf)tolua_tonumber(tolua_S,2,0); - GLclampf blue = (GLclampf)tolua_tonumber(tolua_S,3,0); - GLclampf alpha = (GLclampf)tolua_tonumber(tolua_S,4,0); - glClearColor(red , green , blue , alpha); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glClearColor'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glClearDepthf */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glClearDepthf00 -static int tolua_Cocos2d_glClearDepthf00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int depth = (unsigned int)tolua_tonumber(tolua_S,1,0); - glClearDepthf((GLclampf)depth ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glClearDepthf'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glClearStencil */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glClearStencil00 -static int tolua_Cocos2d_glClearStencil00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int stencil = (unsigned int)tolua_tonumber(tolua_S,1,0); - glClearStencil((GLint)stencil ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glClearStencil'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glColorMask */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glColorMask00 -static int tolua_Cocos2d_glColorMask00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned char red = (unsigned char)tolua_tonumber(tolua_S,1,0); - unsigned char green = (unsigned char)tolua_tonumber(tolua_S,2,0); - unsigned char blue = (unsigned char)tolua_tonumber(tolua_S,3,0); - unsigned char alpha = (unsigned char)tolua_tonumber(tolua_S,4,0); - glColorMask((GLboolean)red , (GLboolean)green , (GLboolean)blue , (GLboolean)alpha); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glColorMask'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glCompileShader */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glCompileShader00 -static int tolua_Cocos2d_glCompileShader00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int shader = (unsigned int)tolua_tonumber(tolua_S,1,0); - glCompileShader((GLuint)shader ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glCompileShader'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glCompressedTexImage2D */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glCompressedTexImage2D00 -static int tolua_Cocos2d_glCompressedTexImage2D00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2, 0,&tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S,5, 0,&tolua_err) || - !tolua_isnumber(tolua_S, 6, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 7, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 8, 0, &tolua_err) || - !tolua_istable(tolua_S, 9, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 10, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - int level = (int)tolua_tonumber(tolua_S,2,0); - unsigned int internalformat = (unsigned int)tolua_tonumber(tolua_S,3,0); - int width = (int)tolua_tonumber(tolua_S, 4, 0); - int height = (int)tolua_tonumber(tolua_S, 5, 0); - int border = (int)tolua_tonumber(tolua_S, 6, 0); - int imageSize = (int)tolua_tonumber(tolua_S, 7, 0); - - long length = (long)tolua_tonumber(tolua_S,8,0); - float* floatArray = new (std::nothrow) float[length]; - if (NULL == floatArray) - { - return 0; - } - for (int i = 1; i <= length; i++) - { - floatArray[i - 1] = (float)tolua_tofieldnumber(tolua_S, 9, i, 0); - } - glCompressedTexImage2D((GLenum)target , (GLint)level , (GLenum)internalformat , (GLsizei)width , (GLsizei)height , (GLint)border , (GLsizei)imageSize , (GLvoid*)floatArray ); - - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glCompressedTexImage2D'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glCompressedTexSubImage2D */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glCompressedTexSubImage2D00 -static int tolua_Cocos2d_glCompressedTexSubImage2D00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2, 0,&tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S,5, 0,&tolua_err) || - !tolua_isnumber(tolua_S, 6, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 7, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 8, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 9, 0, &tolua_err) || - !tolua_istable(tolua_S, 10, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 11, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - int level = (int)tolua_tonumber(tolua_S,2,0); - int xoffset = (int)tolua_tonumber(tolua_S, 3, 0); - int yoffset = (int)tolua_tonumber(tolua_S, 4, 0); - int width = (int)tolua_tonumber(tolua_S, 5, 0); - int height = (int)tolua_tonumber(tolua_S, 6, 0); - unsigned int format = (unsigned int)tolua_tonumber(tolua_S,7,0); - int imageSize = (int)tolua_tonumber(tolua_S, 8, 0); - - long length = (long)tolua_tonumber(tolua_S,9,0); - float* floatArray = new (std::nothrow) float[length]; - if (NULL == floatArray) - { - return 0; - } - for (int i = 1; i <= length; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 10, i, 0); - } - glCompressedTexSubImage2D((GLenum)target , (GLint)level , (GLint)xoffset , (GLint)yoffset , (GLsizei)width , (GLsizei)height , (GLenum)format , (GLsizei)imageSize , (GLvoid*)floatArray ); - - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glCompressedTexSubImage2D'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glCopyTexImage2D */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glCopyTexImage2D00 -static int tolua_Cocos2d_glCopyTexImage2D00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0,&tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S,5, 0,&tolua_err) || - !tolua_isnumber(tolua_S, 6, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 7, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 8, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 9, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - int level = (int)tolua_tonumber(tolua_S,2,0); - unsigned int internalformat = (unsigned int)tolua_tonumber(tolua_S, 3, 0); - int x = (int)tolua_tonumber(tolua_S, 4, 0); - int y = (int)tolua_tonumber(tolua_S, 5, 0); - int width = (int)tolua_tonumber(tolua_S, 6, 0); - int height = (int)tolua_tonumber(tolua_S,7,0); - int border = (int)tolua_tonumber(tolua_S, 8, 0); - glCopyTexImage2D((GLenum)target , (GLint)level , (GLenum)internalformat , (GLint)x , (GLint)y , (GLsizei)width , (GLsizei)height , (GLint)border ); - - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glCopyTexImage2D'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glCopyTexSubImage2D */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glCopyTexSubImage2D00 -static int tolua_Cocos2d_glCopyTexSubImage2D00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2, 0,&tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S,5, 0,&tolua_err) || - !tolua_isnumber(tolua_S, 6, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 7, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 8, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 9, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S,1,0); - int level = (int)tolua_tonumber(tolua_S,2,0); - int xoffset = (int)tolua_tonumber(tolua_S, 3, 0); - int yoffset = (int)tolua_tonumber(tolua_S, 4, 0); - int x = (int)tolua_tonumber(tolua_S, 5, 0); - int y = (int)tolua_tonumber(tolua_S, 6, 0); - int width = (int)tolua_tonumber(tolua_S, 7, 0); - int height = (int)tolua_tonumber(tolua_S,8,0); - glCopyTexSubImage2D((GLenum)target , (GLint)level , (GLint)xoffset ,(GLint)yoffset , (GLint)x , (GLint)y , (GLsizei)width , (GLsizei)height); - - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glCopyTexSubImage2D'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glCreateProgram */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glCreateProgram00 -static int tolua_Cocos2d_glCreateProgram00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!tolua_isnoobj(tolua_S, 1, &tolua_err)) - goto tolua_lerror; - else -#endif - { - int retVal = glCreateProgram(); - tolua_pushnumber(tolua_S,retVal); - - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glCreateProgram'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glCreateShader */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glCreateShader00 -static int tolua_Cocos2d_glCreateShader00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int type = (unsigned int)tolua_tonumber(tolua_S,1,0); - int retVal = glCreateShader((GLenum)type ); - tolua_pushnumber(tolua_S,retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glCreateShader'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glCullFace */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glCullFace00 -static int tolua_Cocos2d_glCullFace00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int mode = (unsigned int)tolua_tonumber(tolua_S,1,0); - glCullFace((GLenum)mode ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glCullFace'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDeleteBuffers */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDeleteBuffers00 -static int tolua_Cocos2d_glDeleteBuffers00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int buffers = (unsigned int)tolua_tonumber(tolua_S,1,0); - glDeleteBuffers(1,&buffers ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDeleteBuffers'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDeleteFramebuffers */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDeleteFramebuffers00 -static int tolua_Cocos2d_glDeleteFramebuffers00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int framebuffers = (unsigned int)tolua_tonumber(tolua_S,1,0); - glDeleteBuffers(1,&framebuffers ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDeleteFramebuffers'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDeleteProgram */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDeleteProgram00 -static int tolua_Cocos2d_glDeleteProgram00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int program = (unsigned int)tolua_tonumber(tolua_S,1,0); - glDeleteProgram((GLuint)program); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDeleteProgram'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDeleteRenderbuffers */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDeleteRenderbuffers00 -static int tolua_Cocos2d_glDeleteRenderbuffers00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int renderbuffers = (unsigned int)tolua_tonumber(tolua_S,1,0); - glDeleteRenderbuffers(1,&renderbuffers); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDeleteRenderbuffers'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDeleteShader */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDeleteShader00 -static int tolua_Cocos2d_glDeleteShader00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int shader = (unsigned int)tolua_tonumber(tolua_S,1,0); - glDeleteShader((GLuint)shader ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDeleteShader'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDeleteTextures */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDeleteTextures00 -static int tolua_Cocos2d_glDeleteTextures00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int textures = (unsigned int)tolua_tonumber(tolua_S,1,0); - glDeleteTextures(1,&textures ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDeleteTextures'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDepthFunc */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDepthFunc00 -static int tolua_Cocos2d_glDepthFunc00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int func = (unsigned int)tolua_tonumber(tolua_S,1,0); - glDepthFunc((GLenum)func); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDepthFunc'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDepthMask */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDepthMask00 -static int tolua_Cocos2d_glDepthMask00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned char flag = (unsigned char)tolua_tonumber(tolua_S,1,0); - glDepthMask((GLboolean)flag ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDepthMask'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDepthRangef */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDepthRangef00 -static int tolua_Cocos2d_glDepthRangef00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int zNear = (int)tolua_tonumber(tolua_S,1,0); - int zFar = (int)tolua_tonumber(tolua_S,2,0); - glDepthRangef((GLclampf)zNear , (GLclampf)zFar ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDepthRangef'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDetachShader */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDetachShader00 -static int tolua_Cocos2d_glDetachShader00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int program = (unsigned int)tolua_tonumber(tolua_S,1,0); - unsigned int shader = (unsigned int)tolua_tonumber(tolua_S,2,0); - glDetachShader((GLuint)program , (GLuint)shader ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDetachShader'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDisable */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDisable00 -static int tolua_Cocos2d_glDisable00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int cap = (unsigned int)tolua_tonumber(tolua_S,1,0); - glDisable((GLenum)cap ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDisable'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDisableVertexAttribArray */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDisableVertexAttribArray00 -static int tolua_Cocos2d_glDisableVertexAttribArray00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int index = (unsigned int)tolua_tonumber(tolua_S,1,0); - glDisableVertexAttribArray((GLuint)index ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDisableVertexAttribArray'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glDrawArrays */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDrawArrays00 -static int tolua_Cocos2d_glDrawArrays00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int mode = (unsigned int)tolua_tonumber(tolua_S,1,0); - int first = (unsigned int)tolua_tonumber(tolua_S,2,0); - int count = (unsigned int)tolua_tonumber(tolua_S,3,0); - glDrawArrays((GLenum)mode , (GLint)first , (GLsizei)count ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDrawArrays'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - - -/* function: glDrawElements */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glDrawElements00 -static int tolua_Cocos2d_glDrawElements00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_istable(tolua_S,5,1,&tolua_err) || - !tolua_isnoobj(tolua_S,6, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - unsigned int arg2 = (unsigned int)tolua_tonumber(tolua_S, 3, 0); - unsigned int arg3 = (unsigned int)tolua_tonumber(tolua_S, 4, 0); - if (GL_UNSIGNED_BYTE == arg2) - { - if (arg3 > 0) - { - unsigned char* unit8Array = new (std::nothrow) unsigned char[arg3]; - if (NULL == unit8Array) - { - return 0; - } - for (unsigned int i = 1; i <= arg3; i++) - { - unit8Array[i-1] = (unsigned char)tolua_tofieldnumber(tolua_S, 5, i, 0); - } - glDrawElements((GLenum)arg0 , (GLsizei)arg1 , (GLenum)arg2 , (GLvoid*)unit8Array); - CC_SAFE_DELETE_ARRAY(unit8Array); - - } - else - { - glDrawElements((GLenum)arg0 , (GLsizei)arg1 , (GLenum)arg2 , nullptr); - } - } - else if(GL_UNSIGNED_SHORT == arg2) - { - if (arg3 > 0) - { - unsigned short* shortArray = new (std::nothrow) unsigned short[arg3]; - if (NULL == shortArray) - { - return 0; - } - for (unsigned int i = 1; i <= arg3; i++) - { - shortArray[i-1] = (unsigned short)tolua_tofieldnumber(tolua_S, 5, i, 0); - } - - glDrawElements((GLenum)arg0 , (GLsizei)arg1 , (GLenum)arg2 , (GLvoid*)shortArray); - - CC_SAFE_DELETE_ARRAY(shortArray); - } - else - { - glDrawElements((GLenum)arg0 , (GLsizei)arg1 , (GLenum)arg2 , nullptr); - } - } - else if(GL_UNSIGNED_INT == arg2) - { - if (arg3 > 0) - { - unsigned int* intArray = new (std::nothrow) unsigned int[arg3]; - if (nullptr == intArray) - { - return 0; - } - for (unsigned int i = 1; i <= arg3; i++) - { - intArray[i-1] = (unsigned int)tolua_tofieldnumber(tolua_S, 5, i, 0); - } - glDrawElements((GLenum)arg0 , (GLsizei)arg1 , (GLenum)arg2 , (GLvoid*)intArray); - CC_SAFE_DELETE_ARRAY(intArray); - } - else - { - glDrawElements((GLenum)arg0 , (GLsizei)arg1 , (GLenum)arg2 , nullptr); - - } - } - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glDrawElements'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - - -/* function: glEnable */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glEnable00 -static int tolua_Cocos2d_glEnable00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int cap = (unsigned int)tolua_tonumber(tolua_S,1,0); - glEnable((GLenum)cap); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glEnable'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glEnableVertexAttribArray */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glEnableVertexAttribArray00 -static int tolua_Cocos2d_glEnableVertexAttribArray00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int index = (unsigned int)tolua_tonumber(tolua_S,1,0); - glEnableVertexAttribArray((GLuint)index); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glEnableVertexAttribArray'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glFinish */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glFinish00 -static int tolua_Cocos2d_glFinish00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnoobj(tolua_S, 1, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - glFinish(); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glFinish'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glFlush */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glFlush00 -static int tolua_Cocos2d_glFlush00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnoobj(tolua_S, 1, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - glFlush(); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glFlush'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glFramebufferRenderbuffer */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glFramebufferRenderbuffer00 -static int tolua_Cocos2d_glFramebufferRenderbuffer00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int attachment = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - unsigned int renderbuffertarget = (unsigned int)tolua_tonumber(tolua_S, 3, 0); - unsigned int renderbuffer = (unsigned int)tolua_tonumber(tolua_S, 4, 0); - glFramebufferRenderbuffer((GLenum)target , (GLenum)attachment , (GLenum)renderbuffertarget , (GLuint)renderbuffer ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glFramebufferRenderbuffer'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glFramebufferTexture2D */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glFramebufferTexture2D00 -static int tolua_Cocos2d_glFramebufferTexture2D00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 5, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 6, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int attachment = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - unsigned int textarget = (unsigned int)tolua_tonumber(tolua_S, 3, 0); - unsigned int texture = (unsigned int)tolua_tonumber(tolua_S, 4, 0); - int level = (int)tolua_tonumber(tolua_S, 5, 0); - glFramebufferTexture2D((GLenum)target , (GLenum)attachment , (GLenum)textarget , (GLuint)texture,(GLuint)level ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glFramebufferTexture2D'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glFrontFace */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glFrontFace00 -static int tolua_Cocos2d_glFrontFace00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int mode = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - glFrontFace((GLenum)mode); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glFrontFace'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGenBuffers */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGenBuffers00 -static int tolua_Cocos2d_glGenBuffers00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnoobj(tolua_S, 1, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int buffer = 0; - glGenBuffers(1, &buffer); - tolua_pushnumber(tolua_S, buffer); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGenBuffers'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGenFramebuffers */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGenFramebuffers00 -static int tolua_Cocos2d_glGenFramebuffers00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int framebuffer = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - glGenFramebuffers(1, &framebuffer); - tolua_pushnumber(tolua_S, framebuffer); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGenFramebuffers'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGenRenderbuffers */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGenRenderbuffers00 -static int tolua_Cocos2d_glGenRenderbuffers00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int renderbuffer = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - glGenRenderbuffers(1, &renderbuffer); - tolua_pushnumber(tolua_S, renderbuffer); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGenRenderbuffers'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGenTextures */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGenTextures00 -static int tolua_Cocos2d_glGenTextures00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnoobj(tolua_S, 1, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - GLuint texture; - glGenTextures(1, &texture); - tolua_pushnumber(tolua_S, texture); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGenTextures'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGenerateMipmap */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGenerateMipmap00 -static int tolua_Cocos2d_glGenerateMipmap00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int target = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - glGenerateMipmap((GLenum)target ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGenerateMipmap'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetActiveAttrib */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetActiveAttrib00 -static int tolua_Cocos2d_glGetActiveAttrib00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - GLsizei length; - glGetProgramiv(arg0, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &length); - GLchar* buffer = new (std::nothrow) GLchar[length]; - GLint size = -1; - GLenum type = -1; - glGetActiveAttrib(arg0, arg1, length, NULL, &size, &type, buffer); - lua_pushnumber(tolua_S, size); - lua_pushnumber(tolua_S, type); - //may check - std::string name = buffer; - lua_pushstring(tolua_S, name.c_str()); - CC_SAFE_DELETE_ARRAY(buffer); - } - return 3; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetActiveAttrib'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetActiveUniform */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetActiveUniform00 -static int tolua_Cocos2d_glGetActiveUniform00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - GLsizei length; - glGetProgramiv(arg0, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &length); - GLchar* buffer = new (std::nothrow) GLchar[length]; - GLint size = -1; - GLenum type = -1; - glGetActiveUniform(arg0, arg1, length, NULL, &size, &type, buffer); - lua_pushnumber(tolua_S, size); - lua_pushnumber(tolua_S, type); - //may check - std::string name = buffer; - lua_pushstring(tolua_S, name.c_str()); - CC_SAFE_DELETE_ARRAY(buffer); - } - return 3; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetActiveUniform'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetAttachedShaders */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetAttachedShaders00 -static int tolua_Cocos2d_glGetAttachedShaders00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - GLsizei length; - glGetProgramiv(arg0, GL_ATTACHED_SHADERS, &length); - GLuint* buffer = new (std::nothrow) GLuint[length]; - memset(buffer, 0, length * sizeof(GLuint)); - //Fix bug 2448, it seems that glGetAttachedShaders will crash if we send NULL to the third parameter (eg Windows), same as in JS binding - GLsizei realShaderCount = 0; - glGetAttachedShaders(arg0, length, &realShaderCount, buffer); - - lua_newtable(tolua_S); /* L: table */ - int index = 1; - for (int i = 0; i < length; i++) - { - lua_pushnumber(tolua_S, buffer[i]); /* L: table value */ - lua_rawseti(tolua_S, -2, index); /* table[index] = value, L: table */ - ++index; - } - CC_SAFE_DELETE_ARRAY(buffer); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetAttachedShaders'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetAttribLocation */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetAttribLocation00 -static int tolua_Cocos2d_glGetAttribLocation00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isstring(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int program = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - const char* name = (const char*)tolua_tostring(tolua_S, 2, ""); - int retVal = glGetAttribLocation((GLuint)program , name ); - lua_pushnumber(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetAttribLocation'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetError */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetError00 -static int tolua_Cocos2d_glGetError00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnoobj(tolua_S, 1, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int retVal = glGetError(); - lua_pushnumber(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetAttribLocation'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetProgramInfoLog */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetProgramInfoLog00 -static int tolua_Cocos2d_glGetProgramInfoLog00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - GLsizei length; - glGetProgramiv(arg0, GL_INFO_LOG_LENGTH, &length); - GLchar* src = new (std::nothrow) GLchar[length]; - glGetProgramInfoLog(arg0, length, NULL, src); - lua_pushstring(tolua_S, src); - CC_SAFE_DELETE_ARRAY(src); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetProgramInfoLog'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetProgramiv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetProgramiv00 -static int tolua_Cocos2d_glGetProgramiv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - GLint ret; - glGetProgramiv(arg0, arg1, &ret); - lua_pushnumber(tolua_S, ret); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetProgramiv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetShaderInfoLog */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetShaderInfoLog00 -static int tolua_Cocos2d_glGetShaderInfoLog00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - GLsizei length; - glGetShaderiv(arg0, GL_INFO_LOG_LENGTH, &length); - GLchar* src = new (std::nothrow) GLchar[length]; - glGetShaderInfoLog(arg0, length, NULL, src); - lua_pushstring(tolua_S, src); - CC_SAFE_DELETE_ARRAY(src); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetShaderInfoLog'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetShaderSource */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetShaderSource00 -static int tolua_Cocos2d_glGetShaderSource00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - GLsizei length; - glGetShaderiv(arg0, GL_SHADER_SOURCE_LENGTH, &length); - GLchar* src = new (std::nothrow) GLchar[length]; - glGetShaderSource(arg0, length, NULL, src); - lua_pushstring(tolua_S, src); - CC_SAFE_DELETE_ARRAY(src); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetShaderSource'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetShaderiv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetShaderiv00 -static int tolua_Cocos2d_glGetShaderiv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - GLint ret; - glGetShaderiv(arg0, arg1, &ret); - lua_pushnumber(tolua_S, ret); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetShaderiv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetTexParameterfv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetTexParameterfv00 -static int tolua_Cocos2d_glGetTexParameterfv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - GLfloat param; - glGetTexParameterfv(arg0, arg1, ¶m); - lua_pushnumber(tolua_S, param); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetTexParameterfv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - - -/* function: glGetUniformLocation */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetUniformLocation00 -static int tolua_Cocos2d_glGetUniformLocation00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isstring(tolua_S, 2,0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - const char* arg1 = tolua_tostring(tolua_S, 2, ""); - int retVal = glGetUniformLocation((GLuint)arg0 , arg1 ); - lua_pushnumber(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetUniformLocation'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glGetUniformfv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glGetUniformfv00 -static int tolua_Cocos2d_glGetUniformfv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - memset(&tolua_err, 0, sizeof(tolua_Error)); - if ( - !tolua_isnumber(tolua_S, 1,0,&tolua_err) || - !tolua_isnumber(tolua_S, 2,0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - - GLsizei length; - glGetProgramiv(arg0, GL_ACTIVE_UNIFORM_MAX_LENGTH, &length); - GLchar* namebuffer = new (std::nothrow) GLchar[length]; - GLint size = -1; - GLenum type = -1; - - glGetActiveUniform(arg0, arg1, length, NULL, &size, &type, namebuffer); - CC_SAFE_DELETE_ARRAY(namebuffer); - - int usize = 0; - int utype = 0; - switch(type) { - // float - case GL_FLOAT: - usize = 1; - utype = GL_FLOAT; - break; - case GL_FLOAT_MAT2: - usize = 2 * 2; - utype = GL_FLOAT; - break; - case GL_FLOAT_MAT3: - usize = 3 * 3; - utype = GL_FLOAT; - break; - case GL_FLOAT_MAT4: - usize = 4 * 4; - utype = GL_FLOAT; - break; - case GL_FLOAT_VEC2: - usize = 2; - utype = GL_FLOAT; - break; - case GL_FLOAT_VEC3: - usize = 3; - utype = GL_FLOAT; - break; - case GL_FLOAT_VEC4: - usize = 4; - utype = GL_FLOAT; - break; - - // int - case GL_INT: - usize = 1; - utype = GL_INT; - break; - case GL_INT_VEC2: - usize = 1; - utype = GL_INT; - break; - case GL_INT_VEC3: - usize = 1; - utype = GL_INT; - break; - case GL_INT_VEC4: - usize = 1; - utype = GL_INT; - break; - - default: -#ifndef TOLUA_RELEASE - tolua_error(tolua_S,"#ferror in function 'glGetUniformfv'.",&tolua_err); - return 0; -#endif - break; - } - if( utype == GL_FLOAT) { - GLfloat* param = new (std::nothrow) GLfloat[usize]; - glGetUniformfv(arg0, arg1, param); - - lua_newtable(tolua_S); /* L: table */ - int index = 1; - for (int i = 0; i < usize; i++) - { - lua_pushnumber(tolua_S, param[i]); /* L: table value */ - lua_rawseti(tolua_S, -2, index); /* table[index] = value, L: table */ - ++index; - } - CC_SAFE_DELETE_ARRAY(param); - - } else if( utype == GL_INT ) { - GLint* param = new (std::nothrow) GLint[usize]; - glGetUniformiv(arg0, arg1, param); - - lua_newtable(tolua_S); /* L: table */ - int index = 1; - for (int i = 0; i < usize; i++) - { - lua_pushnumber(tolua_S, param[i]); /* L: table value */ - lua_rawseti(tolua_S, -2, index); /* table[index] = value, L: table */ - ++index; - } - CC_SAFE_DELETE_ARRAY(param); - } - - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glGetUniformfv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glHint */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glHint00 -static int tolua_Cocos2d_glHint00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - glHint((GLenum)arg0 , (GLenum)arg1 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glHint'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glIsBuffer */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glIsBuffer00 -static int tolua_Cocos2d_glIsBuffer00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - bool retVal = glIsBuffer((GLuint)arg0 ); - lua_pushboolean(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glIsBuffer'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glIsEnabled */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glIsEnabled00 -static int tolua_Cocos2d_glIsEnabled00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - bool retVal = glIsEnabled((GLenum)arg0 ); - lua_pushboolean(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glIsEnabled'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glIsFramebuffer */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glIsFramebuffer00 -static int tolua_Cocos2d_glIsFramebuffer00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - bool retVal = glIsFramebuffer((GLuint)arg0 ); - lua_pushboolean(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glIsFramebuffer'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glIsProgram */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glIsProgram00 -static int tolua_Cocos2d_glIsProgram00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - bool retVal = glIsProgram((GLuint)arg0 ); - lua_pushboolean(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glIsProgram'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glIsRenderbuffer */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glIsRenderbuffer00 -static int tolua_Cocos2d_glIsRenderbuffer00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - bool retVal = glIsRenderbuffer((GLuint)arg0 ); - lua_pushboolean(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glIsRenderbuffer'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glIsShader */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glIsShader00 -static int tolua_Cocos2d_glIsShader00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - bool retVal = glIsShader((GLuint)arg0 ); - lua_pushboolean(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glIsShader'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glIsTexture */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glIsTexture00 -static int tolua_Cocos2d_glIsTexture00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - bool retVal = glIsTexture((GLuint)arg0 ); - lua_pushboolean(tolua_S, retVal); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glIsTexture'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glLineWidth */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glLineWidth00 -static int tolua_Cocos2d_glLineWidth00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - float arg0 = (float)tolua_tonumber(tolua_S, 1, 0); - glLineWidth(arg0); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glLineWidth'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glLinkProgram */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glLinkProgram00 -static int tolua_Cocos2d_glLinkProgram00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - glLinkProgram((GLuint)arg0 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glLinkProgram'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glPixelStorei */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glPixelStorei00 -static int tolua_Cocos2d_glPixelStorei00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - glPixelStorei((GLenum)arg0 , (GLint)arg1 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glPixelStorei'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glPolygonOffset */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glPolygonOffset00 -static int tolua_Cocos2d_glPolygonOffset00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - float arg0 = (float)tolua_tonumber(tolua_S, 1, 0); - float arg1 = (float)tolua_tonumber(tolua_S, 2, 0); - glPolygonOffset(arg0, arg1); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glPolygonOffset'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - - -/* function: glReadPixels */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glReadPixels00 -static int tolua_Cocos2d_glReadPixels00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7, 0, &tolua_err) || - !tolua_isnoobj(tolua_S,8, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int arg3 = (int)tolua_tonumber(tolua_S, 4, 0); - unsigned int arg4 = (unsigned int)tolua_tonumber(tolua_S, 5, 0); - unsigned int arg5 = (unsigned int)tolua_tonumber(tolua_S, 6, 0); - - long length = (long)tolua_tonumber(tolua_S,7,0); - unsigned char* unit8Array = new (std::nothrow) unsigned char[length]; - if (NULL == unit8Array) - { - return 0; - } - for (int i = 0; i < length; i++) - { - unit8Array[i] = 0; - } - - glReadPixels((GLint)arg0 , (GLint)arg1 , (GLsizei)arg2 , (GLsizei)arg3 , (GLenum)arg4 , (GLenum)arg5 , (GLvoid*)unit8Array); - - lua_newtable(tolua_S); /* L: table */ - int index = 1; - for (int i = 0; i < length; i++) - { - lua_pushnumber(tolua_S, unit8Array[i]); /* L: unit8 value */ - lua_rawseti(tolua_S, -2, index); /* table[index] = value, L: table */ - ++index; - } - - CC_SAFE_DELETE_ARRAY(unit8Array); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glReadPixels'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glReleaseShaderCompiler */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glReleaseShaderCompiler00 -static int tolua_Cocos2d_glReleaseShaderCompiler00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnoobj(tolua_S, 1, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - glReleaseShaderCompiler( ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glReleaseShaderCompiler'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glRenderbufferStorage */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glRenderbufferStorage00 -static int tolua_Cocos2d_glRenderbufferStorage00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int arg3 = (int)tolua_tonumber(tolua_S, 4, 0); - glRenderbufferStorage((GLenum)arg0 , (GLenum)arg1 , (GLsizei)arg2 , (GLsizei)arg3 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glRenderbufferStorage'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glSampleCoverage */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glSampleCoverage00 -static int tolua_Cocos2d_glSampleCoverage00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - unsigned short arg1 = (unsigned short)tolua_tonumber(tolua_S, 2, 0); - glSampleCoverage((GLclampf)arg0 , (GLboolean)arg1 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glSampleCoverage'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glScissor */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glScissor00 -static int tolua_Cocos2d_glScissor00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int arg3 = (int)tolua_tonumber(tolua_S, 4, 0); - glScissor((GLint)arg0 , (GLint)arg1 , (GLsizei)arg2 , (GLsizei)arg3 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glScissor'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glShaderSource */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glShaderSource00 -static int tolua_Cocos2d_glShaderSource00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isstring(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - const char* arg1 = tolua_tostring(tolua_S, 2, ""); - glShaderSource(arg0, 1, &arg1, NULL); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glShaderSource'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glStencilFunc */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glStencilFunc00 -static int tolua_Cocos2d_glStencilFunc00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - unsigned int arg2 = (unsigned int)tolua_tonumber(tolua_S, 3, 0); - glStencilFunc((GLenum)arg0 , (GLint)arg1 , (GLuint)arg2 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glStencilFunc'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glStencilFuncSeparate */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glStencilFuncSeparate00 -static int tolua_Cocos2d_glStencilFuncSeparate00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - unsigned int arg3 = (unsigned int)tolua_tonumber(tolua_S, 4, 0); - glStencilFuncSeparate((GLenum)arg0 , (GLenum)arg1 , (GLint)arg2 , (GLuint)arg3 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glStencilFuncSeparate'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glStencilMask */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glStencilMask00 -static int tolua_Cocos2d_glStencilMask00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - glStencilMask((GLuint)arg0); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glStencilMask'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glStencilMaskSeparate */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glStencilMaskSeparate00 -static int tolua_Cocos2d_glStencilMaskSeparate00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - glStencilMaskSeparate((GLenum)arg0 , (GLuint)arg1 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glStencilMaskSeparate'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glStencilOp */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glStencilOp00 -static int tolua_Cocos2d_glStencilOp00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - unsigned int arg2 = (unsigned int)tolua_tonumber(tolua_S, 3, 0); - glStencilOp((GLenum)arg0 , (GLenum)arg1 , (GLenum)arg2 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glStencilOp'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glStencilOpSeparate */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glStencilOpSeparate00 -static int tolua_Cocos2d_glStencilOpSeparate00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - unsigned int arg2 = (unsigned int)tolua_tonumber(tolua_S, 3, 0); - unsigned int arg3 = (unsigned int)tolua_tonumber(tolua_S, 4, 0); - glStencilOpSeparate((GLenum)arg0 , (GLenum)arg1 , (GLenum)arg2 , (GLenum)arg3 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glStencilOpSeparate'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glTexImage2D */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glTexImage2D00 -static int tolua_Cocos2d_glTexImage2D00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 5, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 6, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 7, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 8, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 9, 0, &tolua_err) || - !tolua_istable(tolua_S, 10, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 11, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int arg3 = (int)tolua_tonumber(tolua_S, 4, 0); - int arg4 = (int)tolua_tonumber(tolua_S, 5, 0); - int arg5 = (int)tolua_tonumber(tolua_S, 6, 0); - unsigned int arg6 = (unsigned int)tolua_tonumber(tolua_S, 7, 0); - unsigned int arg7 = (unsigned int)tolua_tonumber(tolua_S, 8, 0); - unsigned int arg8 = (unsigned int)tolua_tonumber(tolua_S, 9, 0); - - unsigned char* unit8Array = new (std::nothrow) unsigned char[arg8]; - if (NULL == unit8Array) - { - return 0; - } - - for (unsigned int i = 1; i <= arg8; i++) - { - unit8Array[i-1] = (unsigned char)tolua_tofieldnumber(tolua_S, 10, i, 0); - } - - glTexImage2D((GLenum)arg0 , (GLint)arg1 , (GLint)arg2 , (GLsizei)arg3 , (GLsizei)arg4 , (GLint)arg5 , (GLenum)arg6 , (GLenum)arg7 , (GLvoid*)unit8Array); - -// lua_newtable(tolua_S); /* L: table */ -// int index = 1; -// for (int i = 0; i < arg8; i++) -// { -// lua_pushnumber(tolua_S, unit8Array[i]); /* L: unit8 value */ -// lua_rawseti(tolua_S, -2, index); /* table[index] = value, L: table */ -// ++index; -// } - - - CC_SAFE_DELETE_ARRAY(unit8Array); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glTexImage2D'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glTexParameterf */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glTexParameterf00 -static int tolua_Cocos2d_glTexParameterf00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - float arg2 = (float)tolua_tonumber(tolua_S, 3, 0); - glTexParameterf((GLenum)arg0 , (GLenum)arg1 , (GLfloat)arg2 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glTexParameterf'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glTexParameteri */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glTexParameteri00 -static int tolua_Cocos2d_glTexParameteri00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - unsigned int arg1 = (unsigned int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - glTexParameteri((GLenum)arg0 , (GLenum)arg1 , (GLint)arg2 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glTexParameteri'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glTexSubImage2D */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glTexSubImage2D00 -static int tolua_Cocos2d_glTexSubImage2D00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 5, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 6, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 7, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 8, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 9, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 10, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int arg3 = (int)tolua_tonumber(tolua_S, 4, 0); - int arg4 = (int)tolua_tonumber(tolua_S, 5, 0); - int arg5 = (int)tolua_tonumber(tolua_S, 6, 0); - unsigned int arg6 = (unsigned int)tolua_tonumber(tolua_S, 7, 0); - unsigned int arg7 = (unsigned int)tolua_tonumber(tolua_S, 8, 0); - unsigned int arg8 = (unsigned int)tolua_tonumber(tolua_S, 9, 0); - - unsigned char* unit8Array = new (std::nothrow) unsigned char[arg8]; - if (NULL == unit8Array) - { - return 0; - } - for (unsigned int i = 0; i < arg8; i++) - { - unit8Array[i] = 0; - } - - glTexSubImage2D((GLenum)arg0 , (GLint)arg1 , (GLint)arg2 , (GLint)arg3 , (GLsizei)arg4 , (GLsizei)arg5 , (GLenum)arg6 , (GLenum)arg7 , (GLvoid*)unit8Array ); - - lua_newtable(tolua_S); /* L: table */ - int index = 1; - for (unsigned int i = 0; i < arg8; i++) - { - lua_pushnumber(tolua_S, unit8Array[i]); /* L: unit8 value */ - lua_rawseti(tolua_S, -2, index); /* table[index] = value, L: table */ - ++index; - } - - CC_SAFE_DELETE_ARRAY(unit8Array); - } - return 1; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glTexSubImage2D'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform1f */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform1f00 -static int tolua_Cocos2d_glUniform1f00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - float arg1 = (float)tolua_tonumber(tolua_S, 2, 0); - glUniform1f(arg0,arg1); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform1f'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform1fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform1fv00 -static int tolua_Cocos2d_glUniform1fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - float* floatArray = new (std::nothrow) float[arg2]; - if (NULL == floatArray) - { - return 0; - } - for (int i = 1; i <= arg2; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - glUniform1fv((GLint)arg0 , (GLsizei)arg1 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform1fv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform1i */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform1i00 -static int tolua_Cocos2d_glUniform1i00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - glUniform1i((GLint)arg0 , (GLint)arg1 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform1i'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform1iv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform1iv00 -static int tolua_Cocos2d_glUniform1iv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int* intArray = new (std::nothrow) int[arg2]; - if (NULL == intArray) - { - return 0; - } - for (int i = 1; i <= arg2; i++) - { - intArray[i-1] = (int)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - glUniform1iv((GLint)arg0 , (GLsizei)arg1 , (GLint*)intArray ); - CC_SAFE_DELETE_ARRAY(intArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform1fv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform2f */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform2f00 -static int tolua_Cocos2d_glUniform2f00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - float arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - float arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - glUniform2f(arg0, arg1, arg2); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform2f'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform2fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform2fv00 -static int tolua_Cocos2d_glUniform2fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - float* floatArray = new (std::nothrow) float[arg2]; - if (NULL == floatArray) - { - return 0; - } - for (int i = 1; i <= arg2; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - glUniform1fv((GLint)arg0 , (GLsizei)arg1 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform2fv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform2i */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform2i00 -static int tolua_Cocos2d_glUniform2i00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - glUniform2i((GLint)arg0 , (GLint)arg1 , (GLint)arg2 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform2i'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform2iv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform2iv00 -static int tolua_Cocos2d_glUniform2iv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int* intArray = new (std::nothrow) int[arg2]; - if (NULL == intArray) - { - return 0; - } - for (int i = 1; i <= arg2; i++) - { - intArray[i-1] = (int)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - glUniform2iv((GLint)arg0 , (GLsizei)arg1 , (GLint*)intArray ); - CC_SAFE_DELETE_ARRAY(intArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform2iv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform3f */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform3f00 -static int tolua_Cocos2d_glUniform3f00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - float arg1 = (float)tolua_tonumber(tolua_S, 2, 0); - float arg2 = (float)tolua_tonumber(tolua_S, 3, 0); - float arg3 = (float)tolua_tonumber(tolua_S, 4, 0); - glUniform3f(arg0, arg1, arg2, arg3); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform4f'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform3fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform3fv00 -static int tolua_Cocos2d_glUniform3fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - float* floatArray = new (std::nothrow) float[arg2]; - if (NULL == floatArray) - { - return 0; - } - for (int i = 1; i <= arg2; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - glUniform1fv((GLint)arg0 , (GLsizei)arg1 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform3fv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform3i */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform3i00 -static int tolua_Cocos2d_glUniform3i00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int arg3 = (int)tolua_tonumber(tolua_S, 4, 0); - glUniform3i((GLint)arg0 , (GLint)arg1 , (GLint)arg2 , (GLint)arg3 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform3i'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform3iv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform3iv00 -static int tolua_Cocos2d_glUniform3iv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int* intArray = new (std::nothrow) int[arg2]; - if (NULL == intArray) - { - return 0; - } - for (int i = 1; i <= arg2; i++) - { - intArray[i-1] = (int)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - glUniform3iv((GLint)arg0 , (GLsizei)arg1 , (GLint*)intArray ); - CC_SAFE_DELETE_ARRAY(intArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform3iv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform4f */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform4f00 -static int tolua_Cocos2d_glUniform4f00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 5, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 6, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - float arg1 = (float)tolua_tonumber(tolua_S, 2, 0); - float arg2 = (float)tolua_tonumber(tolua_S, 3, 0); - float arg3 = (float)tolua_tonumber(tolua_S, 4, 0); - float arg4 = (float)tolua_tonumber(tolua_S, 5, 0); - glUniform4f(arg0 , arg1, arg2, arg3, arg4); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform4f'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform4fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform4fv00 -static int tolua_Cocos2d_glUniform4fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - float* floatArray = new (std::nothrow) float[arg2]; - if (NULL == floatArray) - { - return 0; - } - for (int i = 1; i <= arg2; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - glUniform4fv((GLint)arg0 , (GLsizei)arg1 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform4fv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform4i */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform4i00 -static int tolua_Cocos2d_glUniform4i00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 5, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 6, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int arg3 = (int)tolua_tonumber(tolua_S, 4, 0); - int arg4 = (int)tolua_tonumber(tolua_S, 5, 0); - glUniform4i((GLint)arg0 , (GLint)arg1 , (GLint)arg2 , (GLint)arg3 , (GLint)arg4 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform4i'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniform4iv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniform4iv00 -static int tolua_Cocos2d_glUniform4iv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int* intArray = new (std::nothrow) int[arg2]; - if (NULL == intArray) - { - return 0; - } - for (int i = 1; i <= arg2; i++) - { - intArray[i-1] = (int)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - glUniform4iv((GLint)arg0 , (GLsizei)arg1 , (GLint*)intArray ); - CC_SAFE_DELETE_ARRAY(intArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniform4iv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniformMatrix2fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniformMatrix2fv00 -static int tolua_Cocos2d_glUniformMatrix2fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - unsigned short arg1 = (unsigned short)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - float* floatArray = new (std::nothrow) float[arg2]; - if (NULL == floatArray) - { - return 0; - } - for (int i = 1; i <= arg2; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - glUniformMatrix2fv(arg0, 1, (GLboolean)arg1 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniformMatrix2fv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniformMatrix3fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniformMatrix3fv00 -static int tolua_Cocos2d_glUniformMatrix3fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - unsigned short arg1 = (unsigned short)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - float* floatArray = new (std::nothrow) float[arg2]; - if (NULL == floatArray) - { - return 0; - } - - for (int i = 1; i <= arg2; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - - glUniformMatrix3fv(arg0, 1, (GLboolean)arg1 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniformMatrix3fv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUniformMatrix4fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUniformMatrix4fv00 -static int tolua_Cocos2d_glUniformMatrix4fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isboolean(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - bool arg1 = (bool)tolua_toboolean(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - float* floatArray = new (std::nothrow) float[arg2]; - if (NULL == floatArray) - { - return 0; - } - - for (int i = 1; i <= arg2; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 4, i, 0); - } - - glUniformMatrix4fv(arg0, 1, (GLboolean)arg1 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUniformMatrix4fv'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glUseProgram */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glUseProgram00 -static int tolua_Cocos2d_glUseProgram00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - glUseProgram((GLuint)arg0 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glUseProgram'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glValidateProgram */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glValidateProgram00 -static int tolua_Cocos2d_glValidateProgram00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - glValidateProgram((GLuint)arg0 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glValidateProgram'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glVertexAttrib1f */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glVertexAttrib1f00 -static int tolua_Cocos2d_glVertexAttrib1f00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - float arg1 = (float)tolua_tonumber(tolua_S, 2, 0); - glVertexAttrib1f(arg0 , arg1); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glVertexAttrib1f'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glVertexAttrib1fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glVertexAttrib1fvf00 -static int tolua_Cocos2d_glVertexAttrib1fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_istable(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - float* floatArray = new (std::nothrow) float[arg1]; - if (NULL == floatArray) - { - return 0; - } - - for (int i = 1; i <= arg1; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - - glVertexAttrib1fv((GLuint)arg0 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glVertexAttrib1fv'.",&tolua_err); - return 0; -#endif - -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glVertexAttrib2f */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glVertexAttrib2f00 -static int tolua_Cocos2d_glVertexAttrib2f00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - float arg1 = (float)tolua_tonumber(tolua_S, 2, 0); - float arg2 = (float)tolua_tonumber(tolua_S, 3, 0); - glVertexAttrib2f(arg0, arg1, arg2); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glVertexAttrib2f'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glVertexAttrib2fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glVertexAttrib2fv00 -static int tolua_Cocos2d_glVertexAttrib2fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_istable(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - float* floatArray = new (std::nothrow) float[arg1]; - if (NULL == floatArray) - { - return 0; - } - - for (int i = 1; i <= arg1; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - - glVertexAttrib2fv((GLuint)arg0 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glVertexAttrib2fv'.",&tolua_err); - return 0; -#endif - -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glVertexAttrib3f */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glVertexAttrib3f00 -static int tolua_Cocos2d_glVertexAttrib3f00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - float arg1 = (float)tolua_tonumber(tolua_S, 2, 0); - float arg2 = (float)tolua_tonumber(tolua_S, 3, 0); - float arg3 = (float)tolua_tonumber(tolua_S, 4, 0); - glVertexAttrib3f(arg0 , arg1, arg2, arg3); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glVertexAttrib3f'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glVertexAttrib3fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glVertexAttrib3fv00 -static int tolua_Cocos2d_glVertexAttrib3fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_istable(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - float* floatArray = new (std::nothrow) float[arg1]; - if (NULL == floatArray) - { - return 0; - } - - for (int i = 1; i <= arg1; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - - glVertexAttrib3fv((GLuint)arg0 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glVertexAttrib3fv'.",&tolua_err); - return 0; -#endif - -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glVertexAttrib4f */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glVertexAttrib4f00 -static int tolua_Cocos2d_glVertexAttrib4f00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 5, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 6, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - float arg1 = (float)tolua_tonumber(tolua_S, 2, 0); - float arg2 = (float)tolua_tonumber(tolua_S, 3, 0); - float arg3 = (float)tolua_tonumber(tolua_S, 4, 0); - float arg4 = (float)tolua_tonumber(tolua_S, 5, 0); - glVertexAttrib4f(arg0, arg1, arg2, arg3, arg4); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glVertexAttrib4f'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glVertexAttrib4fv */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glVertexAttrib4fv00 -static int tolua_Cocos2d_glVertexAttrib4fv00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_istable(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 4, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - float* floatArray = new (std::nothrow) float[arg1]; - if (NULL == floatArray) - { - return 0; - } - - for (int i = 1; i <= arg1; i++) - { - floatArray[i-1] = (float)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - - glVertexAttrib4fv((GLuint)arg0 , (GLfloat*)floatArray ); - CC_SAFE_DELETE_ARRAY(floatArray); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glVertexAttrib4fv'.",&tolua_err); - return 0; -#endif - -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glVertexAttribPointer */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glVertexAttribPointer00 -static int tolua_Cocos2d_glVertexAttribPointer00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isboolean(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 5, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 6, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 7, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int arg0 = (unsigned int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - unsigned int arg2 = (unsigned int)tolua_tonumber(tolua_S, 3, 0); - bool arg3 = tolua_toboolean(tolua_S, 4, 0); - int arg4 = (int)tolua_tonumber(tolua_S, 5, 0); - //int arg5 = (int)tolua_tonumber(tolua_S, 7, 0); - glVertexAttribPointer((GLuint)arg0, (GLint)arg1, (GLenum)arg2, (GLboolean)arg3, (GLsizei)arg4, nullptr); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glVertexAttribPointer'.",&tolua_err); - return 0; -#endif - -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glViewport */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glViewport00 -static int tolua_Cocos2d_glViewport00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 5, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - int arg1 = (int)tolua_tonumber(tolua_S, 2, 0); - int arg2 = (int)tolua_tonumber(tolua_S, 3, 0); - int arg3 = (int)tolua_tonumber(tolua_S, 4, 0); - glViewport((GLint)arg0 , (GLint)arg1 , (GLsizei)arg2 , (GLsizei)arg3 ); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glViewport'.",&tolua_err); - return 0; -#endif - -} -#endif //#ifndef TOLUA_DISABLE - -/* function: glEnableVertexAttribs */ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_glEnableVertexAttribs00 -static int tolua_Cocos2d_glEnableVertexAttribs00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || - !tolua_isnoobj(tolua_S, 2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int arg0 = (int)tolua_tonumber(tolua_S, 1, 0); - glEnableVertexAttribArray(arg0); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'glEnableVertexAttribs'.",&tolua_err); - return 0; -#endif - -} -#endif //#ifndef TOLUA_DISABLE - -/* function: DrawPoint in the DrawPrimitives namespace */ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_ccDrawPoint00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawPoint00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!tolua_istable(tolua_S,1,0, &tolua_err) || - !tolua_isnoobj(tolua_S,2, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cocos2d::Vec2 vec2; - if(luaval_to_vec2(tolua_S, 1, &vec2, "cc.DrawPrimitives.drawPoint")) - { - DrawPrimitives::drawPoint(vec2); - } - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawPoint'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawPoints in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_DrawPoints00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawPoints00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int numberOfPoints = ((unsigned int) tolua_tonumber(tolua_S,2,0)); - - if (numberOfPoints > 0) - { - cocos2d::Vec2* points = new (std::nothrow) cocos2d::Vec2[numberOfPoints]; - if (NULL == points) - return 0; - - for (int i = 0; i < numberOfPoints; i++) - { - lua_pushnumber(tolua_S,i + 1); - lua_gettable(tolua_S,1); - if (!tolua_istable(tolua_S,-1, 0, &tolua_err)) - { - CC_SAFE_DELETE_ARRAY(points); - goto tolua_lerror; - } - - if(!luaval_to_vec2(tolua_S, lua_gettop(tolua_S), &points[i], "cc.DrawPrimitives.drawPoints")) - { - lua_pop(tolua_S, 1); - CC_SAFE_DELETE_ARRAY(points); - return 0; - } - lua_pop(tolua_S, 1); - } - DrawPrimitives::drawPoints(points, numberOfPoints); - CC_SAFE_DELETE_ARRAY(points); - } - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawPoints'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawLine in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawLine00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawLine00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_istable(tolua_S, 2, 0,&tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cocos2d::Vec2 origin; - if (!luaval_to_vec2(tolua_S, 1, &origin, "cc.DrawPrimitives.drawLine")) - return 0; - - cocos2d::Vec2 destination; - if (!luaval_to_vec2(tolua_S, 2, &destination, "cc.DrawPrimitives.drawLine")) - return 0; - - DrawPrimitives::drawLine(origin,destination); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawLine'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawRect in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawRect00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawRect00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_istable(tolua_S, 2, 0,&tolua_err) || - !tolua_isnoobj(tolua_S, 3, &tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cocos2d::Vec2 origin; - if (!luaval_to_vec2(tolua_S, 1, &origin, "cc.DrawPrimitives.drawRect")) - return 0; - - cocos2d::Vec2 destination; - if (!luaval_to_vec2(tolua_S, 2, &destination, "cc.DrawPrimitives.drawRect")) - return 0; - - DrawPrimitives::drawRect(origin,destination); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawRect'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawSolidRect in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_Cocos2d_DrawPrimitives_drawSolidRect00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawSolidRect00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_istable(tolua_S, 2, 0, &tolua_err) || - !tolua_istable(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cocos2d::Vec2 origin; - if (!luaval_to_vec2(tolua_S, 1, &origin, "cc.DrawPrimitives.drawSolidRect")) - return 0; - - cocos2d::Vec2 destination; - if (!luaval_to_vec2(tolua_S, 2, &destination, "cc.DrawPrimitives.drawSolidRect")) - return 0; - - Color4F color; - if (!luaval_to_color4f(tolua_S, 3, &color, "cc.DrawPrimitives.drawSolidRect")) - return 0; - - - DrawPrimitives::drawSolidRect(origin,destination,color); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawSolidRect'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawPoly in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawPoly00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawPoly00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isboolean(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int numOfVertices = ((unsigned int) tolua_tonumber(tolua_S,2,0)); - bool closePolygon = ((bool) tolua_toboolean(tolua_S,3,0)); - - if (numOfVertices > 0) - { - cocos2d::Vec2* points = new (std::nothrow) cocos2d::Vec2[numOfVertices]; - if (NULL == points) - return 0; - - for (int i = 0; i < numOfVertices; i++) - { - lua_pushnumber(tolua_S,i + 1); - lua_gettable(tolua_S,1); - if (!tolua_istable(tolua_S,-1, 0, &tolua_err)) - { - CC_SAFE_DELETE_ARRAY(points); - goto tolua_lerror; - } - - if(!luaval_to_vec2(tolua_S, lua_gettop(tolua_S), &points[i], "cc.DrawPrimitives.drawPoly")) - { - lua_pop(tolua_S, 1); - CC_SAFE_DELETE_ARRAY(points); - return 0; - } - lua_pop(tolua_S, 1); - } - DrawPrimitives::drawPoly(points,numOfVertices,closePolygon); - CC_SAFE_DELETE_ARRAY(points); - } - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ccDrawPoly'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawSolidPoly in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawSolidPoly00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawSolidPoly00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_istable(tolua_S, 3, 0, &tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned int numberOfPoints = ((unsigned int) tolua_tonumber(tolua_S,2,0)); - if (numberOfPoints > 0) - { - cocos2d::Vec2* points = new (std::nothrow) cocos2d::Vec2[numberOfPoints]; - if (NULL == points) - return 0; - - for (int i = 0; i < numberOfPoints; i++) - { - lua_pushnumber(tolua_S,i + 1); - lua_gettable(tolua_S,1); - if (!tolua_istable(tolua_S,-1, 0, &tolua_err)) - { - CC_SAFE_DELETE_ARRAY(points); - goto tolua_lerror; - } - - if(!luaval_to_vec2(tolua_S, lua_gettop(tolua_S), &points[i], "cc.DrawPrimitives.drawSolidPoly")) - { - lua_pop(tolua_S, 1); - CC_SAFE_DELETE_ARRAY(points); - return 0; - } - lua_pop(tolua_S, 1); - } - - Color4F color; - if (!luaval_to_color4f(tolua_S, 3, &color, "cc.DrawPrimitives.drawSolidPoly")) - { - CC_SAFE_DELETE_ARRAY(points); - return 0; - } - - DrawPrimitives::drawSolidPoly(points,numberOfPoints,color); - CC_SAFE_DELETE_ARRAY(points); - } - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawSolidPoly'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawCircle in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawCircle00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawCircle00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isboolean(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,1,&tolua_err) || - !tolua_isnumber(tolua_S,7,1,&tolua_err) || - !tolua_isnoobj(tolua_S,8,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cocos2d::Vec2 center; - if (!luaval_to_vec2(tolua_S, 1, ¢er, "cc.DrawPrimitives.drawCircle")) - return 0; - - float radius = ((float) tolua_tonumber(tolua_S,2,0)); - float angle = ((float) tolua_tonumber(tolua_S,3,0)); - unsigned int segments = ((unsigned int) tolua_tonumber(tolua_S,4,0)); - bool drawLineToCenter = ((bool) tolua_toboolean(tolua_S,5,0)); - float xScale = ((float) tolua_tonumber(tolua_S,6,1.0f)); - float yScale = ((float) tolua_tonumber(tolua_S,7,1.0f)); - - DrawPrimitives::drawCircle(center,radius,angle,segments,drawLineToCenter,xScale,yScale); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawCircle'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawSolidCircle in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawSolidCircle00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawSolidCircle00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,1,&tolua_err) || - !tolua_isnumber(tolua_S,6,1,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cocos2d::Vec2 center; - if (!luaval_to_vec2(tolua_S, 1, ¢er, "cc.DrawPrimitives.drawSolidCircle")) - return 0; - float radius = ((float) tolua_tonumber(tolua_S,2,0)); - float angle = ((float) tolua_tonumber(tolua_S,3,0)); - unsigned int segments = ((unsigned int) tolua_tonumber(tolua_S,4,0)); - float scaleX = ((float) tolua_tonumber(tolua_S,5,1.0f)); - float scaleY = ((float) tolua_tonumber(tolua_S,6,1.0f)); - DrawPrimitives::drawSolidCircle(center,radius,angle,segments,scaleX,scaleY); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawSolidCircle'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - - -/* function: drawQuadBezier in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawQuadBezier00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawQuadBezier00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_istable(tolua_S, 2, 0, &tolua_err) || - !tolua_istable(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S,4, 0, &tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cocos2d::Vec2 origin; - if (!luaval_to_vec2(tolua_S, 1, &origin, "cc.DrawPrimitives.drawQuadBezier")) - return 0; - - cocos2d::Vec2 control; - if (!luaval_to_vec2(tolua_S, 2, &control, "cc.DrawPrimitives.drawQuadBezier")) - return 0; - - cocos2d::Vec2 destination; - if (!luaval_to_vec2(tolua_S, 3, &destination, "cc.DrawPrimitives.drawQuadBezier")) - return 0; - - unsigned int segments = ((unsigned int) tolua_tonumber(tolua_S,4,0)); - DrawPrimitives::drawQuadBezier(origin,control,destination,segments); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawQuadBezier'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawCubicBezier in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawCubicBezier00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawCubicBezier00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_istable(tolua_S, 2, 0, &tolua_err) || - !tolua_istable(tolua_S, 3, 0, &tolua_err) || - !tolua_istable(tolua_S, 4, 0, &tolua_err) || - !tolua_isnumber(tolua_S,5, 0, &tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - - cocos2d::Vec2 origin; - if (!luaval_to_vec2(tolua_S, 1, &origin, "cc.DrawPrimitives.drawCubicBezier")) - return 0; - - cocos2d::Vec2 control1; - if (!luaval_to_vec2(tolua_S, 2, &control1, "cc.DrawPrimitives.drawCubicBezier")) - return 0; - - cocos2d::Vec2 control2; - if (!luaval_to_vec2(tolua_S, 3, &control2, "cc.DrawPrimitives.drawCubicBezier")) - return 0; - - cocos2d::Vec2 destination; - if (!luaval_to_vec2(tolua_S, 4, &destination, "cc.DrawPrimitives.drawCubicBezier")) - return 0; - - unsigned int segments = ((unsigned int) tolua_tonumber(tolua_S,5,0)); - DrawPrimitives::drawCubicBezier(origin,control1,control2,destination,segments); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawCubicBezier'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawCatmullRom in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawCatmullRom00 -CC_DEPRECATED_ATTRIBUTE int tolua_cocos2d_DrawPrimitives_drawCatmullRom00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int num = 0; - cocos2d::Vec2 *arr = NULL; - if (!luaval_to_array_of_vec2(tolua_S, 1, &arr, &num, "cc.DrawPrimitives.drawCatmullRom")) - return 0; - - - PointArray* points = PointArray::create(num); - if (NULL == points) - { - CC_SAFE_DELETE_ARRAY(arr); - return 0; - } - - for( int i = 0; i < num; i++) { - points->addControlPoint(arr[i]); - } - CC_SAFE_DELETE_ARRAY(arr); - - unsigned int segments = ((unsigned int) tolua_tonumber(tolua_S,2,0)); - - DrawPrimitives::drawCatmullRom(points,segments); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawCatmullRom'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawCardinalSpline in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawCardinalSpline00 -CC_DEPRECATED_ATTRIBUTE int tolua_cocos2d_DrawPrimitives_drawCardinalSpline00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_istable(tolua_S, 1, 0, &tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int num = 0; - cocos2d::Vec2 *arr = NULL; - if (!luaval_to_array_of_vec2(tolua_S, 1, &arr, &num, "cc.DrawPrimitives.drawCatmullRom")) - return 0; - - - PointArray* config = PointArray::create(num); - if (NULL == config) - { - CC_SAFE_DELETE_ARRAY(arr); - return 0; - } - - for( int i = 0; i < num; i++) { - config->addControlPoint(arr[i]); - } - CC_SAFE_DELETE_ARRAY(arr); - float tension = ((float) tolua_tonumber(tolua_S,2,0)); - unsigned int segments = ((unsigned int) tolua_tonumber(tolua_S,3,0)); - DrawPrimitives::drawCardinalSpline(config,tension,segments); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawCardinalSpline'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawColor4B in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawColor4B00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawColor4B00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned char r = (( unsigned char) tolua_tonumber(tolua_S,1,0)); - unsigned char g = (( unsigned char) tolua_tonumber(tolua_S,2,0)); - unsigned char b = (( unsigned char) tolua_tonumber(tolua_S,3,0)); - unsigned char a = (( unsigned char) tolua_tonumber(tolua_S,4,0)); - DrawPrimitives::setDrawColor4B(r,g,b,a); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawColor4B'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: drawColor4F in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_drawColor4F00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_drawColor4F00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - float r = (float)tolua_tonumber(tolua_S,1,0); - float g = (float)tolua_tonumber(tolua_S,2,0); - float b = (float)tolua_tonumber(tolua_S,3,0); - float a = (float)tolua_tonumber(tolua_S,4,0); - DrawPrimitives::setDrawColor4F(r,g,b,a); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'drawColor4F'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: setPointSize in the DrawPrimitives namespace*/ -#ifndef TOLUA_DISABLE_tolua_cocos2d_DrawPrimitives_setPointSize00 -CC_DEPRECATED_ATTRIBUTE static int tolua_cocos2d_DrawPrimitives_setPointSize00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - float pointSize = (( float) tolua_tonumber(tolua_S,1,0)); - DrawPrimitives::setPointSize(pointSize); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'setPointSize'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - - -TOLUA_API int tolua_opengl_open(lua_State* tolua_S) -{ - tolua_open(tolua_S); - tolua_reg_gl_type(tolua_S); - tolua_module(tolua_S,"cc",0); - tolua_beginmodule(tolua_S,"cc"); - tolua_cclass(tolua_S,"GLNode","cc.GLNode","cc.Node",tolua_collect_GLNode); - tolua_beginmodule(tolua_S,"GLNode"); - tolua_function(tolua_S, "create", tolua_Cocos2d_GLNode_create00); - tolua_function(tolua_S, "setShaderProgram", tolua_Cocos2d_GLNode_setShaderProgram00); - tolua_endmodule(tolua_S); - tolua_module(tolua_S, "DrawPrimitives", 0); - tolua_beginmodule(tolua_S,"DrawPrimitives"); - tolua_function(tolua_S,"drawPoint",tolua_cocos2d_DrawPrimitives_drawPoint00); - tolua_function(tolua_S,"drawPoints",tolua_cocos2d_DrawPrimitives_drawPoints00); - tolua_function(tolua_S,"drawLine",tolua_cocos2d_DrawPrimitives_drawLine00); - tolua_function(tolua_S,"drawRect",tolua_cocos2d_DrawPrimitives_drawRect00); - tolua_function(tolua_S,"drawSolidRect",tolua_cocos2d_DrawPrimitives_drawSolidRect00); - tolua_function(tolua_S,"drawPoly",tolua_cocos2d_DrawPrimitives_drawPoly00); - tolua_function(tolua_S,"drawSolidPoly",tolua_cocos2d_DrawPrimitives_drawSolidPoly00); - tolua_function(tolua_S,"drawCircle",tolua_cocos2d_DrawPrimitives_drawCircle00); - tolua_function(tolua_S,"drawSolidCircle",tolua_cocos2d_DrawPrimitives_drawSolidCircle00); - tolua_function(tolua_S,"drawQuadBezier",tolua_cocos2d_DrawPrimitives_drawQuadBezier00); - tolua_function(tolua_S,"drawCubicBezier",tolua_cocos2d_DrawPrimitives_drawCubicBezier00); - tolua_function(tolua_S,"drawCatmullRom",tolua_cocos2d_DrawPrimitives_drawCatmullRom00); - tolua_function(tolua_S,"drawCardinalSpline",tolua_cocos2d_DrawPrimitives_drawCardinalSpline00); - tolua_function(tolua_S,"drawColor4B",tolua_cocos2d_DrawPrimitives_drawColor4B00); - tolua_function(tolua_S,"drawColor4F",tolua_cocos2d_DrawPrimitives_drawColor4F00); - tolua_function(tolua_S,"setPointSize",tolua_cocos2d_DrawPrimitives_setPointSize00); - tolua_endmodule(tolua_S); - tolua_endmodule(tolua_S); - tolua_module(tolua_S, "gl", 0); - tolua_beginmodule(tolua_S,"gl"); - tolua_function(tolua_S, "getSupportedExtensions", tolua_Cocos2d_glGetSupportedExtensions00); - tolua_function(tolua_S, "activeTexture", tolua_Cocos2d_glActiveTexture00); - tolua_function(tolua_S, "_attachShader", tolua_Cocos2d_glAttachShader00); - tolua_function(tolua_S, "_bindAttribLocation", tolua_Cocos2d_glBindAttribLocation00); - tolua_function(tolua_S, "_bindBuffer", tolua_Cocos2d_glBindBuffer00); - tolua_function(tolua_S, "_bindFramebuffer", tolua_Cocos2d_glBindBuffer00); - tolua_function(tolua_S, "_bindRenderbuffer", tolua_Cocos2d_glBindRenderbuffer00); - tolua_function(tolua_S, "_bindTexture", tolua_Cocos2d_glBindTexture00); - tolua_function(tolua_S, "blendColor", tolua_Cocos2d_glBlendColor00); - tolua_function(tolua_S, "blendEquation", tolua_Cocos2d_glBlendEquation00); - tolua_function(tolua_S, "blendEquationSeparate", tolua_Cocos2d_glBlendEquationSeparate00); - tolua_function(tolua_S, "blendFunc", tolua_Cocos2d_glBlendFunc00); - tolua_function(tolua_S, "blendFuncSeparate", tolua_Cocos2d_glBlendFuncSeparate00); - tolua_function(tolua_S, "bufferData", tolua_Cocos2d_glBufferData00); - tolua_function(tolua_S, "bufferSubData", tolua_Cocos2d_glBufferSubData00); - tolua_function(tolua_S, "checkFramebufferStatus", tolua_Cocos2d_glCheckFramebufferStatus00); - tolua_function(tolua_S, "clear", tolua_Cocos2d_glClear00); - tolua_function(tolua_S, "clearColor", tolua_Cocos2d_glClearColor00); - tolua_function(tolua_S, "clearDepthf", tolua_Cocos2d_glClearDepthf00); - tolua_function(tolua_S, "clearStencil", tolua_Cocos2d_glClearStencil00); - tolua_function(tolua_S, "colorMask", tolua_Cocos2d_glColorMask00); - tolua_function(tolua_S, "_compileShader", tolua_Cocos2d_glCompileShader00); - tolua_function(tolua_S, "compressedTexImage2D", tolua_Cocos2d_glCompressedTexImage2D00); - tolua_function(tolua_S, "compressedTexSubImage2D", tolua_Cocos2d_glCompressedTexSubImage2D00); - tolua_function(tolua_S, "copyTexImage2D", tolua_Cocos2d_glCopyTexImage2D00); - tolua_function(tolua_S, "copyTexSubImage2D", tolua_Cocos2d_glCopyTexSubImage2D00); - tolua_function(tolua_S, "_createProgram", tolua_Cocos2d_glCreateProgram00); - tolua_function(tolua_S, "_createShader", tolua_Cocos2d_glCreateShader00); - tolua_function(tolua_S, "cullFace", tolua_Cocos2d_glCullFace00); - tolua_function(tolua_S, "_deleteBuffer", tolua_Cocos2d_glDeleteBuffers00); - tolua_function(tolua_S, "_deleteFramebuffer", tolua_Cocos2d_glDeleteFramebuffers00); - tolua_function(tolua_S, "_deleteProgram", tolua_Cocos2d_glDeleteProgram00); - tolua_function(tolua_S, "_deleteRenderbuffer", tolua_Cocos2d_glDeleteRenderbuffers00); - tolua_function(tolua_S, "_deleteShader", tolua_Cocos2d_glDeleteShader00); - tolua_function(tolua_S, "_deleteTexture", tolua_Cocos2d_glDeleteTextures00); - tolua_function(tolua_S, "depthFunc", tolua_Cocos2d_glDepthFunc00); - tolua_function(tolua_S, "depthMask", tolua_Cocos2d_glDepthMask00); - tolua_function(tolua_S, "depthRangef", tolua_Cocos2d_glDepthRangef00); - tolua_function(tolua_S, "detachShader", tolua_Cocos2d_glDetachShader00); - tolua_function(tolua_S, "disable", tolua_Cocos2d_glDisable00); - tolua_function(tolua_S, "disableVertexAttribArray", tolua_Cocos2d_glDisableVertexAttribArray00); - tolua_function(tolua_S, "drawArrays", tolua_Cocos2d_glDrawArrays00); - tolua_function(tolua_S, "drawElements", tolua_Cocos2d_glDrawElements00); - tolua_function(tolua_S, "enable", tolua_Cocos2d_glEnable00); - tolua_function(tolua_S, "enableVertexAttribArray", tolua_Cocos2d_glEnableVertexAttribArray00); - tolua_function(tolua_S, "finish", tolua_Cocos2d_glFinish00); - tolua_function(tolua_S, "flush", tolua_Cocos2d_glFlush00); - tolua_function(tolua_S, "framebufferRenderbuffer", tolua_Cocos2d_glFramebufferRenderbuffer00); - tolua_function(tolua_S, "framebufferTexture2D", tolua_Cocos2d_glFramebufferTexture2D00); - tolua_function(tolua_S, "frontFace", tolua_Cocos2d_glFrontFace00); - tolua_function(tolua_S, "_createBuffer", tolua_Cocos2d_glGenBuffers00); - tolua_function(tolua_S, "_createFramebuffer", tolua_Cocos2d_glGenFramebuffers00); - tolua_function(tolua_S, "_createRenderbuffer", tolua_Cocos2d_glGenRenderbuffers00); - tolua_function(tolua_S, "_createTexture", tolua_Cocos2d_glGenTextures00); - tolua_function(tolua_S, "generateMipmap", tolua_Cocos2d_glGenerateMipmap00); - tolua_function(tolua_S, "_getActiveAttrib", tolua_Cocos2d_glGetActiveAttrib00); - tolua_function(tolua_S, "_getActiveUniform", tolua_Cocos2d_glGetActiveUniform00); - tolua_function(tolua_S, "_getAttachedShaders", tolua_Cocos2d_glGetAttachedShaders00); - tolua_function(tolua_S, "_getAttribLocation", tolua_Cocos2d_glGetAttribLocation00); - tolua_function(tolua_S, "getError", tolua_Cocos2d_glGetError00); - tolua_function(tolua_S, "_getProgramInfoLog", tolua_Cocos2d_glGetProgramInfoLog00); - tolua_function(tolua_S, "_getProgramParameter", tolua_Cocos2d_glGetProgramiv00); - tolua_function(tolua_S, "_getShaderInfoLog", tolua_Cocos2d_glGetShaderInfoLog00); - tolua_function(tolua_S, "_getShaderSource", tolua_Cocos2d_glGetShaderSource00); - tolua_function(tolua_S, "_getShaderParameter", tolua_Cocos2d_glGetShaderiv00); - tolua_function(tolua_S, "getTexParameter", tolua_Cocos2d_glGetTexParameterfv00); - tolua_function(tolua_S, "_getUniformLocation", tolua_Cocos2d_glGetUniformLocation00); - tolua_function(tolua_S, "_getUniform", tolua_Cocos2d_glGetUniformfv00); - tolua_function(tolua_S, "hint", tolua_Cocos2d_glHint00); - tolua_function(tolua_S, "isBuffer",tolua_Cocos2d_glIsBuffer00); - tolua_function(tolua_S, "isEnabled", tolua_Cocos2d_glIsEnabled00); - tolua_function(tolua_S, "isFramebuffer", tolua_Cocos2d_glIsFramebuffer00); - tolua_function(tolua_S, "isProgram", tolua_Cocos2d_glIsProgram00); - tolua_function(tolua_S, "isRenderbuffer", tolua_Cocos2d_glIsRenderbuffer00); - tolua_function(tolua_S, "isShader", tolua_Cocos2d_glIsShader00); - tolua_function(tolua_S, "isTexture", tolua_Cocos2d_glIsTexture00); - tolua_function(tolua_S, "lineWidth", tolua_Cocos2d_glLineWidth00); - tolua_function(tolua_S, "_linkProgram", tolua_Cocos2d_glLinkProgram00); - tolua_function(tolua_S, "pixelStorei", tolua_Cocos2d_glPixelStorei00); - tolua_function(tolua_S, "polygonOffset", tolua_Cocos2d_glPolygonOffset00); - tolua_function(tolua_S, "readPixels", tolua_Cocos2d_glReadPixels00); - tolua_function(tolua_S, "releaseShaderCompiler", tolua_Cocos2d_glReleaseShaderCompiler00); - tolua_function(tolua_S, "renderbufferStorage", tolua_Cocos2d_glRenderbufferStorage00); - tolua_function(tolua_S, "sampleCoverage", tolua_Cocos2d_glSampleCoverage00); - tolua_function(tolua_S, "scissor", tolua_Cocos2d_glScissor00); - tolua_function(tolua_S, "_shaderSource", tolua_Cocos2d_glShaderSource00); - tolua_function(tolua_S, "stencilFunc", tolua_Cocos2d_glStencilFunc00); - tolua_function(tolua_S, "stencilFuncSeparate", tolua_Cocos2d_glStencilFuncSeparate00); - tolua_function(tolua_S, "stencilMask", tolua_Cocos2d_glStencilMask00); - tolua_function(tolua_S, "stencilMaskSeparate", tolua_Cocos2d_glStencilMaskSeparate00); - tolua_function(tolua_S, "stencilOp", tolua_Cocos2d_glStencilOp00); - tolua_function(tolua_S, "stencilOpSeparate", tolua_Cocos2d_glStencilOpSeparate00); - tolua_function(tolua_S, "_texImage2D", tolua_Cocos2d_glTexImage2D00); - tolua_function(tolua_S, "texParameterf", tolua_Cocos2d_glTexParameterf00); - tolua_function(tolua_S, "texParameteri", tolua_Cocos2d_glTexParameteri00); - tolua_function(tolua_S, "_texSubImage2D", tolua_Cocos2d_glTexSubImage2D00); - tolua_function(tolua_S, "uniform1f", tolua_Cocos2d_glUniform1f00); - tolua_function(tolua_S, "uniform1fv", tolua_Cocos2d_glUniform1fv00); - tolua_function(tolua_S, "uniform1i", tolua_Cocos2d_glUniform1i00); - tolua_function(tolua_S, "uniform1iv", tolua_Cocos2d_glUniform1iv00); - tolua_function(tolua_S, "uniform2f", tolua_Cocos2d_glUniform2f00); - tolua_function(tolua_S, "uniform2fv", tolua_Cocos2d_glUniform2fv00); - tolua_function(tolua_S, "uniform2i", tolua_Cocos2d_glUniform2i00); - tolua_function(tolua_S, "uniform2iv", tolua_Cocos2d_glUniform2iv00); - tolua_function(tolua_S, "uniform3f", tolua_Cocos2d_glUniform3f00); - tolua_function(tolua_S, "uniform3fv", tolua_Cocos2d_glUniform3fv00); - tolua_function(tolua_S, "uniform3i", tolua_Cocos2d_glUniform3i00); - tolua_function(tolua_S, "uniform3iv", tolua_Cocos2d_glUniform3iv00); - tolua_function(tolua_S, "uniform4f", tolua_Cocos2d_glUniform4f00); - tolua_function(tolua_S, "uniform4fv", tolua_Cocos2d_glUniform4fv00); - tolua_function(tolua_S, "uniform4i", tolua_Cocos2d_glUniform4i00); - tolua_function(tolua_S, "uniform4iv", tolua_Cocos2d_glUniform4iv00); - tolua_function(tolua_S, "uniformMatrix2fv", tolua_Cocos2d_glUniformMatrix2fv00); - tolua_function(tolua_S, "uniformMatrix3fv", tolua_Cocos2d_glUniformMatrix3fv00); - tolua_function(tolua_S, "uniformMatrix4fv", tolua_Cocos2d_glUniformMatrix4fv00); - tolua_function(tolua_S, "_useProgram", tolua_Cocos2d_glUseProgram00); - tolua_function(tolua_S, "_validateProgram", tolua_Cocos2d_glValidateProgram00); - tolua_function(tolua_S, "vertexAttrib1f", tolua_Cocos2d_glVertexAttrib1f00); - tolua_function(tolua_S, "vertexAttrib1fv", tolua_Cocos2d_glVertexAttrib1fv00); - tolua_function(tolua_S, "vertexAttrib2f", tolua_Cocos2d_glVertexAttrib2f00); - tolua_function(tolua_S, "vertexAttrib2fv", tolua_Cocos2d_glVertexAttrib2fv00); - tolua_function(tolua_S, "vertexAttrib3f", tolua_Cocos2d_glVertexAttrib3f00); - tolua_function(tolua_S, "vertexAttrib3fv", tolua_Cocos2d_glVertexAttrib3fv00); - tolua_function(tolua_S, "vertexAttrib4f", tolua_Cocos2d_glVertexAttrib4f00); - tolua_function(tolua_S, "vertexAttrib4fv", tolua_Cocos2d_glVertexAttrib4fv00); - tolua_function(tolua_S, "vertexAttribPointer", tolua_Cocos2d_glVertexAttribPointer00); - tolua_function(tolua_S, "viewport", tolua_Cocos2d_glViewport00); - tolua_function(tolua_S, "glEnableVertexAttribs", tolua_Cocos2d_glEnableVertexAttribs00); - tolua_endmodule(tolua_S); - return 1; -} - -static int tolua_Cocos2d_GLNode_registerScriptDrawHandler00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.GLNode",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !toluafix_isfunction(tolua_S,2,"LUA_FUNCTION",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err)) - goto tolua_lerror; - else -#endif - { - GLNode* glNode = (GLNode*) tolua_tousertype(tolua_S,1,0); - LUA_FUNCTION handler = ( toluafix_ref_function(tolua_S,2,0)); - ScriptHandlerMgr::getInstance()->addObjectHandler((void*)glNode, handler, ScriptHandlerMgr::HandlerType::GL_NODE_DRAW); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'registerScriptDrawHandler'.",&tolua_err); - return 0; -#endif -} - - -static int tolua_Cocos2d_GLNode_unregisterScriptDrawHandler00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.GLNode",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err)) - goto tolua_lerror; - else -#endif - { - GLNode* glNode = (GLNode*)tolua_tousertype(tolua_S,1,0); - ScriptHandlerMgr::getInstance()->removeObjectHandler((void*)glNode,ScriptHandlerMgr::HandlerType::GL_NODE_DRAW); - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'unregisterScriptDrawHandler'.",&tolua_err); - return 0; -#endif -} - -int register_glnode_manual(lua_State* tolua_S) -{ - if (nullptr == tolua_S) - return 0; - - lua_pushstring(tolua_S,"cc.GLNode"); - lua_rawget(tolua_S,LUA_REGISTRYINDEX); - if (lua_istable(tolua_S,-1)) - { - lua_pushstring(tolua_S,"registerScriptDrawHandler"); - lua_pushcfunction(tolua_S,tolua_Cocos2d_GLNode_registerScriptDrawHandler00); - lua_rawset(tolua_S,-3); - lua_pushstring(tolua_S,"unregisterScriptDrawHandler"); - lua_pushcfunction(tolua_S,tolua_Cocos2d_GLNode_unregisterScriptDrawHandler00); - lua_rawset(tolua_S,-3); - } - lua_pop(tolua_S, 1); - - return 1; -} diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.cpp b/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.cpp index 70a41f0e1b..f059e4caa1 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.cpp +++ b/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.cpp @@ -30,7 +30,6 @@ #include "scripting/lua-bindings/manual/CCLuaStack.h" #include "scripting/lua-bindings/manual/CCLuaValue.h" #include "scripting/lua-bindings/manual/CCLuaEngine.h" -#include "scripting/lua-bindings/manual/cocos2d/LuaOpengl.h" using namespace cocos2d; diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_deprecated.cpp b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_deprecated.cpp index 382731754d..730802404b 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_deprecated.cpp +++ b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_deprecated.cpp @@ -29,7 +29,7 @@ #include "scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h" #include "scripting/lua-bindings/manual/CCLuaValue.h" -#include "deprecated/CCDeprecated.h" +#include "scripting/deprecated/CCDeprecated.h" USING_NS_CC; @@ -1968,2397 +1968,6 @@ static int register_cocos2dx_deprecated_String(lua_State* tolua_S) return 1; } -static int lua_cocos2dx_LabelBMFont_setLineBreakWithoutSpace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_setLineBreakWithoutSpace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.LabelBMFont:setLineBreakWithoutSpace"); - if(!ok) - return 0; - cobj->setLineBreakWithoutSpace(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:setLineBreakWithoutSpace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_setLineBreakWithoutSpace'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_getBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_isOpacityModifyRGB(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_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; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:isOpacityModifyRGB",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_isOpacityModifyRGB'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_getLetter(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_getLetter'", 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.LabelBMFont:getLetter"); - if(!ok) - return 0; - cocos2d::Sprite* ret = cobj->getLetter(arg0); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:getLetter",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_getLetter'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_getString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_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; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:getString",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_getString'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_setBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - - if (argc == 1) - { - cocos2d::BlendFunc arg0; - - ok &= luaval_to_blendfunc(tolua_S, 2, &arg0, "cc.LabelBMFont:setBlendFunc"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_LabelBMFont_setBlendFunc'", nullptr); - return 0; - } - cobj->setBlendFunc(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:setBlendFunc",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_setBlendFunc'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_setString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_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.LabelBMFont:setString"); - if(!ok) - return 0; - cobj->setString(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:setString",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_setString'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_initWithString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_initWithString'", 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.LabelBMFont:initWithString"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelBMFont:initWithString"); - if(!ok) - return 0; - bool ret = cobj->initWithString(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - if (argc == 3) - { - std::string arg0; - std::string arg1; - double arg2; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelBMFont:initWithString"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1,"cc.LabelBMFont:initWithString"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelBMFont:initWithString"); - if(!ok) - return 0; - bool ret = cobj->initWithString(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - if (argc == 4) - { - std::string arg0; - std::string arg1; - double arg2; - cocos2d::TextHAlignment arg3; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelBMFont:initWithString"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelBMFont:initWithString"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelBMFont:initWithString"); - - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelBMFont:initWithString"); - if(!ok) - return 0; - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - if (argc == 5) - { - std::string arg0; - std::string arg1; - double arg2; - cocos2d::TextHAlignment arg3; - cocos2d::Vec2 arg4; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelBMFont:initWithString"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelBMFont:initWithString"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelBMFont:initWithString"); - - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelBMFont:initWithString"); - - ok &= luaval_to_vec2(tolua_S, 6, &arg4, "cc.LabelBMFont:initWithString"); - if(!ok) - return 0; - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:initWithString",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_initWithString'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_setOpacityModifyRGB(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_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.LabelBMFont:setOpacityModifyRGB"); - if(!ok) - return 0; - cobj->setOpacityModifyRGB(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:setOpacityModifyRGB",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_setOpacityModifyRGB'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_getFntFile(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_getFntFile'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const std::string& ret = cobj->getFntFile(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:getFntFile",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_getFntFile'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_setFntFile(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_setFntFile'", 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.LabelBMFont:setFntFile"); - if(!ok) - return 0; - cobj->setFntFile(arg0); - return 0; - } - if (argc == 2) - { - std::string arg0; - cocos2d::Vec2 arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelBMFont:setFntFile"); - - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.LabelBMFont:setFntFile"); - if(!ok) - return 0; - cobj->setFntFile(arg0, arg1); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:setFntFile",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_setFntFile'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_setAlignment(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_setAlignment'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::TextHAlignment arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.LabelBMFont:setAlignment"); - if(!ok) - return 0; - cobj->setAlignment(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:setAlignment",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_setAlignment'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_setWidth(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelBMFont*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelBMFont_setWidth'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.LabelBMFont:setWidth"); - if(!ok) - return 0; - cobj->setWidth(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:setWidth",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_setWidth'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelBMFont_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.LabelBMFont",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 0) - { - cocos2d::LabelBMFont* ret = cocos2d::LabelBMFont::create(); - object_to_luaval(tolua_S, "cc.LabelBMFont",(cocos2d::LabelBMFont*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelBMFont:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelBMFont:create"); - if (!ok) { break; } - cocos2d::LabelBMFont* ret = cocos2d::LabelBMFont::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.LabelBMFont",(cocos2d::LabelBMFont*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelBMFont:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelBMFont:create"); - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelBMFont:create"); - if (!ok) { break; } - cocos2d::LabelBMFont* ret = cocos2d::LabelBMFont::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.LabelBMFont",(cocos2d::LabelBMFont*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 4) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelBMFont:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelBMFont:create"); - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelBMFont:create"); - if (!ok) { break; } - cocos2d::TextHAlignment arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelBMFont:create"); - if (!ok) { break; } - cocos2d::LabelBMFont* ret = cocos2d::LabelBMFont::create(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.LabelBMFont",(cocos2d::LabelBMFont*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 5) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelBMFont:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelBMFont:create"); - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelBMFont:create"); - if (!ok) { break; } - cocos2d::TextHAlignment arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelBMFont:create"); - if (!ok) { break; } - cocos2d::Vec2 arg4; - ok &= luaval_to_vec2(tolua_S, 6, &arg4, "cc.LabelBMFont:create"); - if (!ok) { break; } - cocos2d::LabelBMFont* ret = cocos2d::LabelBMFont::create(arg0, arg1, arg2, arg3, arg4); - object_to_luaval(tolua_S, "cc.LabelBMFont",(cocos2d::LabelBMFont*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.LabelBMFont:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_LabelBMFont_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelBMFont* 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 (std::nothrow) cocos2d::LabelBMFont(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.LabelBMFont"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelBMFont:new",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelBMFont_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_LabelBMFont_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (LabelBMFont)"); - return 0; -} - -static int register_cocos2dx_deprecated_LabelBMFont(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.LabelBMFont"); - tolua_module(tolua_S,"cc",0); - tolua_beginmodule(tolua_S,"cc"); - tolua_cclass(tolua_S,"LabelBMFont","cc.LabelBMFont","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"LabelBMFont"); - tolua_function(tolua_S,"new",lua_cocos2dx_LabelBMFont_constructor); - tolua_function(tolua_S,"setLineBreakWithoutSpace",lua_cocos2dx_LabelBMFont_setLineBreakWithoutSpace); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_LabelBMFont_getBlendFunc); - tolua_function(tolua_S,"isOpacityModifyRGB",lua_cocos2dx_LabelBMFont_isOpacityModifyRGB); - tolua_function(tolua_S,"getLetter",lua_cocos2dx_LabelBMFont_getLetter); - tolua_function(tolua_S,"getString",lua_cocos2dx_LabelBMFont_getString); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_LabelBMFont_setBlendFunc); - tolua_function(tolua_S,"setString",lua_cocos2dx_LabelBMFont_setString); - tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelBMFont_initWithString); - tolua_function(tolua_S,"setOpacityModifyRGB",lua_cocos2dx_LabelBMFont_setOpacityModifyRGB); - tolua_function(tolua_S,"getFntFile",lua_cocos2dx_LabelBMFont_getFntFile); - tolua_function(tolua_S,"setFntFile",lua_cocos2dx_LabelBMFont_setFntFile); - tolua_function(tolua_S,"setAlignment",lua_cocos2dx_LabelBMFont_setAlignment); - tolua_function(tolua_S,"setWidth",lua_cocos2dx_LabelBMFont_setWidth); - tolua_function(tolua_S,"create", lua_cocos2dx_LabelBMFont_create); - tolua_endmodule(tolua_S); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::LabelBMFont).name(); - g_luaType[typeName] = "cc.LabelBMFont"; - g_typeCast["LabelBMFont"] = "cc.LabelBMFont"; - return 1; -} - -static int lua_cocos2dx_LabelTTF_enableShadow(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_enableShadow'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - cocos2d::Size arg0; - double arg1; - double arg2; - - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.LabelTTF:enableShadow"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.LabelTTF:enableShadow"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:enableShadow"); - if(!ok) - return 0; - cobj->enableShadow(arg0, arg1, arg2); - return 0; - } - if (argc == 4) - { - cocos2d::Size arg0; - double arg1; - double arg2; - bool arg3; - - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.LabelTTF:enableShadow"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.LabelTTF:enableShadow"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:enableShadow"); - - ok &= luaval_to_boolean(tolua_S, 5,&arg3, "cc.LabelTTF:enableShadow"); - if(!ok) - return 0; - cobj->enableShadow(arg0, arg1, arg2, arg3); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:enableShadow",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_enableShadow'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setDimensions(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setDimensions'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Size arg0; - - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.LabelTTF:setDimensions"); - if(!ok) - return 0; - cobj->setDimensions(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setDimensions",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setDimensions'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_getFontSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_getFontSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getFontSize(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:getFontSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_getFontSize'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_getString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_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; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:getString",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_getString'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setFlippedY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setFlippedY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.LabelTTF:setFlippedY"); - if(!ok) - return 0; - cobj->setFlippedY(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setFlippedY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setFlippedY'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setFlippedX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setFlippedX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.LabelTTF:setFlippedX"); - if(!ok) - return 0; - cobj->setFlippedX(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setFlippedX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setFlippedX'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setTextDefinition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setTextDefinition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::FontDefinition arg0; - - ok &= luaval_to_fontdefinition(tolua_S, 2, &arg0, "cc.LabelTTF:setTextDefinition"); - if(!ok) - return 0; - cobj->setTextDefinition(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setTextDefinition",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setTextDefinition'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setFontName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setFontName'", 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.LabelTTF:setFontName"); - if(!ok) - return 0; - cobj->setFontName(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setFontName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setFontName'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_getHorizontalAlignment(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_getHorizontalAlignment'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = (int)cobj->getHorizontalAlignment(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:getHorizontalAlignment",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_getHorizontalAlignment'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_initWithStringAndTextDefinition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_initWithStringAndTextDefinition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - std::string arg0; - cocos2d::FontDefinition arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:initWithStringAndTextDefinition"); - - ok &= luaval_to_fontdefinition(tolua_S, 3, &arg1, "cc.LabelTTF:initWithStringAndTextDefinition"); - if(!ok) - return 0; - bool ret = cobj->initWithStringAndTextDefinition(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:initWithStringAndTextDefinition",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_initWithStringAndTextDefinition'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_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.LabelTTF:setString"); - if(!ok) - return 0; - cobj->setString(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setString",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setString'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_initWithString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_initWithString'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - std::string arg0; - std::string arg1; - double arg2; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:initWithString"); - if(!ok) - return 0; - bool ret = cobj->initWithString(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - if (argc == 4) - { - std::string arg0; - std::string arg1; - double arg2; - cocos2d::Size arg3; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.LabelTTF:initWithString"); - if(!ok) - return 0; - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - if (argc == 5) - { - std::string arg0; - std::string arg1; - double arg2; - cocos2d::Size arg3; - cocos2d::TextHAlignment arg4; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelTTF:initWithString"); - if(!ok) - return 0; - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - if (argc == 6) - { - std::string arg0; - std::string arg1; - double arg2; - cocos2d::Size arg3; - cocos2d::TextHAlignment arg4; - cocos2d::TextVAlignment arg5; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelTTF:initWithString"); - - ok &= luaval_to_int32(tolua_S, 7,(int *)&arg5, "cc.LabelTTF:initWithString"); - if(!ok) - return 0; - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4, arg5); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:initWithString",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_initWithString'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setFontFillColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setFontFillColor'", 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.LabelTTF:setFontFillColor"); - if(!ok) - return 0; - cobj->setFontFillColor(arg0); - return 0; - } - if (argc == 2) - { - cocos2d::Color3B arg0; - bool arg1; - - ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.LabelTTF:setFontFillColor"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.LabelTTF:setFontFillColor"); - if(!ok) - return 0; - cobj->setFontFillColor(arg0, arg1); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setFontFillColor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setFontFillColor'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_getBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_enableStroke(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_enableStroke'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Color3B arg0; - double arg1; - - ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.LabelTTF:enableStroke"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.LabelTTF:enableStroke"); - if(!ok) - return 0; - cobj->enableStroke(arg0, arg1); - return 0; - } - if (argc == 3) - { - cocos2d::Color3B arg0; - double arg1; - bool arg2; - - ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.LabelTTF:enableStroke"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.LabelTTF:enableStroke"); - - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.LabelTTF:enableStroke"); - if(!ok) - return 0; - cobj->enableStroke(arg0, arg1, arg2); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:enableStroke",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_enableStroke'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_getDimensions(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_getDimensions'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Size& ret = cobj->getDimensions(); - size_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:getDimensions",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_getDimensions'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setVerticalAlignment(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setVerticalAlignment'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::TextVAlignment arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.LabelTTF:setVerticalAlignment"); - if(!ok) - return 0; - cobj->setVerticalAlignment(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setVerticalAlignment",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setVerticalAlignment'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setFontSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setFontSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.LabelTTF:setFontSize"); - if(!ok) - return 0; - cobj->setFontSize(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setFontSize",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setFontSize'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_getVerticalAlignment(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_getVerticalAlignment'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = (int)cobj->getVerticalAlignment(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:getVerticalAlignment",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_getVerticalAlignment'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_getTextDefinition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_getTextDefinition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::FontDefinition& ret = cobj->getTextDefinition(); - fontdefinition_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:getTextDefinition",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_getTextDefinition'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::BlendFunc arg0; - - ok &= luaval_to_blendfunc(tolua_S, 2, &arg0, "cc.LabelTTF:setBlendFunc"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_LabelTTF_setBlendFunc'", nullptr); - return 0; - } - cobj->setBlendFunc(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setBlendFunc",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setBlendFunc'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_getFontName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_getFontName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const std::string& ret = cobj->getFontName(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:getFontName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_getFontName'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_setHorizontalAlignment(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_setHorizontalAlignment'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::TextHAlignment arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.LabelTTF:setHorizontalAlignment"); - if(!ok) - return 0; - cobj->setHorizontalAlignment(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:setHorizontalAlignment",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_setHorizontalAlignment'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_disableShadow(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_disableShadow'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->disableShadow(); - return 0; - } - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.LabelTTF:disableShadow"); - if(!ok) - return 0; - cobj->disableShadow(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:disableShadow",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_disableShadow'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_disableStroke(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelTTF*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelTTF_disableStroke'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->disableStroke(); - return 0; - } - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.LabelTTF:disableStroke"); - if(!ok) - return 0; - cobj->disableStroke(arg0); - return 0; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:disableStroke",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_disableStroke'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_LabelTTF_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.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 0) - { - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(); - object_to_luaval(tolua_S, "cc.LabelTTF",(cocos2d::LabelTTF*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 3) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelTTF:create"); - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.LabelTTF",(cocos2d::LabelTTF*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 4) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelTTF:create"); - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::Size arg3; - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.LabelTTF",(cocos2d::LabelTTF*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 5) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelTTF:create"); - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::Size arg3; - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::TextHAlignment arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2, arg3, arg4); - object_to_luaval(tolua_S, "cc.LabelTTF",(cocos2d::LabelTTF*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 6) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelTTF:create"); - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::Size arg3; - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::TextHAlignment arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::TextVAlignment arg5; - ok &= luaval_to_int32(tolua_S, 7,(int *)&arg5, "cc.LabelTTF:create"); - if (!ok) { break; } - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::create(arg0, arg1, arg2, arg3, arg4, arg5); - object_to_luaval(tolua_S, "cc.LabelTTF",(cocos2d::LabelTTF*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.LabelTTF:create",argc, 3); - return 0; -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_LabelTTF_createWithFontDefinition(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.LabelTTF",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - std::string arg0; - cocos2d::FontDefinition arg1; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelTTF:createWithFontDefinition"); - ok &= luaval_to_fontdefinition(tolua_S, 3, &arg1, "cc.LabelTTF:createWithFontDefinition"); - if(!ok) - return 0; - cocos2d::LabelTTF* ret = cocos2d::LabelTTF::createWithFontDefinition(arg0, arg1); - object_to_luaval(tolua_S, "cc.LabelTTF",(cocos2d::LabelTTF*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.LabelTTF:createWithFontDefinition",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_createWithFontDefinition'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_LabelTTF_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelTTF* 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 (std::nothrow) cocos2d::LabelTTF(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.LabelTTF"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelTTF:new",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelTTF_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_LabelTTF_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (LabelTTF)"); - return 0; -} - -static int register_cocos2dx_deprecated_LabelTTF(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.LabelTTF"); - tolua_module(tolua_S,"cc",0); - tolua_beginmodule(tolua_S,"cc"); - tolua_cclass(tolua_S,"LabelTTF","cc.LabelTTF","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"LabelTTF"); - tolua_function(tolua_S,"new",lua_cocos2dx_LabelTTF_constructor); - tolua_function(tolua_S,"enableShadow",lua_cocos2dx_LabelTTF_enableShadow); - tolua_function(tolua_S,"setDimensions",lua_cocos2dx_LabelTTF_setDimensions); - tolua_function(tolua_S,"getFontSize",lua_cocos2dx_LabelTTF_getFontSize); - tolua_function(tolua_S,"getString",lua_cocos2dx_LabelTTF_getString); - tolua_function(tolua_S,"setFlippedY",lua_cocos2dx_LabelTTF_setFlippedY); - tolua_function(tolua_S,"setFlippedX",lua_cocos2dx_LabelTTF_setFlippedX); - tolua_function(tolua_S,"setTextDefinition",lua_cocos2dx_LabelTTF_setTextDefinition); - tolua_function(tolua_S,"setFontName",lua_cocos2dx_LabelTTF_setFontName); - tolua_function(tolua_S,"getHorizontalAlignment",lua_cocos2dx_LabelTTF_getHorizontalAlignment); - tolua_function(tolua_S,"initWithStringAndTextDefinition",lua_cocos2dx_LabelTTF_initWithStringAndTextDefinition); - tolua_function(tolua_S,"setString",lua_cocos2dx_LabelTTF_setString); - tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelTTF_initWithString); - tolua_function(tolua_S,"setFontFillColor",lua_cocos2dx_LabelTTF_setFontFillColor); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_LabelTTF_getBlendFunc); - tolua_function(tolua_S,"enableStroke",lua_cocos2dx_LabelTTF_enableStroke); - tolua_function(tolua_S,"getDimensions",lua_cocos2dx_LabelTTF_getDimensions); - tolua_function(tolua_S,"setVerticalAlignment",lua_cocos2dx_LabelTTF_setVerticalAlignment); - tolua_function(tolua_S,"setFontSize",lua_cocos2dx_LabelTTF_setFontSize); - tolua_function(tolua_S,"getVerticalAlignment",lua_cocos2dx_LabelTTF_getVerticalAlignment); - tolua_function(tolua_S,"getTextDefinition",lua_cocos2dx_LabelTTF_getTextDefinition); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_LabelTTF_setBlendFunc); - tolua_function(tolua_S,"getFontName",lua_cocos2dx_LabelTTF_getFontName); - tolua_function(tolua_S,"setHorizontalAlignment",lua_cocos2dx_LabelTTF_setHorizontalAlignment); - tolua_function(tolua_S,"disableShadow",lua_cocos2dx_LabelTTF_disableShadow); - tolua_function(tolua_S,"disableStroke",lua_cocos2dx_LabelTTF_disableStroke); - tolua_function(tolua_S,"create", lua_cocos2dx_LabelTTF_create); - tolua_function(tolua_S,"createWithFontDefinition", lua_cocos2dx_LabelTTF_createWithFontDefinition); - tolua_endmodule(tolua_S); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::LabelTTF).name(); - g_luaType[typeName] = "cc.LabelTTF"; - g_typeCast["LabelTTF"] = "cc.LabelTTF"; - return 1; -} - - int register_all_cocos2dx_deprecated(lua_State* tolua_S) { tolua_open(tolua_S); @@ -4370,8 +1979,6 @@ int register_all_cocos2dx_deprecated(lua_State* tolua_S) register_cocos2dx_deprecated_Size(tolua_S); register_cocos2dx_deprecated_Array(tolua_S); register_cocos2dx_deprecated_String(tolua_S); - register_cocos2dx_deprecated_LabelBMFont(tolua_S); - register_cocos2dx_deprecated_LabelTTF(tolua_S); tolua_function(tolua_S,"kmGLPushMatrix",tolua_cocos2d_kmGLPushMatrix00); tolua_function(tolua_S,"kmGLTranslatef",tolua_cocos2d_kmGLTranslatef00); tolua_function(tolua_S,"kmGLPopMatrix",tolua_cocos2d_kmGLPopMatrix00); @@ -4778,69 +2385,6 @@ static int extendLayerMultiplexDeprecated(lua_State* tolua_S) return 1; } -extern int lua_cocos2dx_Label_create(lua_State* tolua_S); - -static int lua_cocos2dx_Label_create_deprecated(lua_State* tolua_S) -{ - if (nullptr == tolua_S) - return 0; - - int argc = 0; - - tolua_Error tolua_err; - if (!tolua_isusertable(tolua_S,1,"cc.Label",0,&tolua_err)) goto tolua_lerror; - - argc = lua_gettop(tolua_S) - 1; - - if (argc >= 3 && argc <= 6) - { - if (!tolua_isstring(tolua_S, 2, 0, &tolua_err) || - !tolua_isstring(tolua_S, 3, 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 0, &tolua_err) || - !tolua_istable(tolua_S, 5, 1, &tolua_err) || - !tolua_isnumber(tolua_S, 6, 1, &tolua_err) || - !tolua_isnumber(tolua_S, 7, 1, &tolua_err) ) - { - goto tolua_lerror; - } - else - { - CCLOG("The create(text, ...) was deprecated,please use create createWithTTF(text, ...) instead"); - std::string text = tolua_tocppstring(tolua_S, 2, ""); - std::string fontFile = tolua_tocppstring(tolua_S, 3, ""); - float fontSize = tolua_tonumber(tolua_S, 4, 0); - cocos2d::Size dimensions = cocos2d::Size::ZERO; - if (lua_istable(tolua_S, 5)) - { - luaval_to_size(tolua_S, 5, &dimensions, "cc.Label:create"); - } - TextHAlignment hAlignment = static_cast((int)tolua_tonumber(tolua_S, 6, 0)); - TextVAlignment vAlignment = static_cast((int)tolua_tonumber(tolua_S, 7, 0)); - - cocos2d::Label* ret = cocos2d::Label::create(text, fontFile, fontSize, dimensions, hAlignment, vAlignment); - - int ID = ret ? (int)(ret->_ID) : -1; - int* luaID = ret ? &(ret->_luaID) : nullptr; - toluafix_pushusertype_ccobject(tolua_S,ID, luaID, (void*)ret,"cc.Label"); - return 1; - } - } - -tolua_lerror: - return lua_cocos2dx_Label_create(tolua_S); -} - -static void extendLabelDeprecated(lua_State* tolua_S) -{ - lua_pushstring(tolua_S,"cc.Label"); - lua_rawget(tolua_S,LUA_REGISTRYINDEX); - if (lua_istable(tolua_S,-1)) - { - tolua_function(tolua_S, "create", lua_cocos2dx_Label_create_deprecated); - } - lua_pop(tolua_S, 1); -} - int register_all_cocos2dx_manual_deprecated(lua_State* tolua_S) { diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp index 8d535f01fe..1319a4b082 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp @@ -56,8 +56,8 @@ #include "base/CCScheduler.h" #include "base/CCUserDefault.h" #include "base/ccUtils.h" -#include "deprecated/CCBool.h" -#include "deprecated/CCInteger.h" +#include "scripting/deprecated/CCBool.h" +#include "scripting/deprecated/CCInteger.h" #include "platform/CCApplication.h" #include "platform/CCDevice.h" #include "platform/CCFileUtils.h" @@ -3461,15 +3461,16 @@ static int tolua_cocos2dx_setBlendFunc(lua_State* tolua_S,const char* className) { CCLOG("setBlendFunc of %s will deprecate two int parameter form,please pass a table like {src = xx, dst = xx} as a parameter", className); - GLenum src, dst; - if (!luaval_to_int32(tolua_S, 2, (int32_t*)&src, StringUtils::format("%s%s",className, ":setBlendFunc").c_str())) - return 0; - - if (!luaval_to_int32(tolua_S, 3, (int32_t*)&dst, StringUtils::format("%s%s",className, ":setBlendFunc").c_str())) - return 0; - - BlendFunc blendFunc = {src, dst}; - self->setBlendFunc(blendFunc); +//TODO minggo +// GLenum src, dst; +// if (!luaval_to_int32(tolua_S, 2, (int32_t*)&src, StringUtils::format("%s%s",className, ":setBlendFunc").c_str())) +// return 0; +// +// if (!luaval_to_int32(tolua_S, 3, (int32_t*)&dst, StringUtils::format("%s%s",className, ":setBlendFunc").c_str())) +// return 0; +// +// BlendFunc blendFunc = {src, dst}; +// self->setBlendFunc(blendFunc); return 0; } @@ -3763,768 +3764,6 @@ tolua_lerror: #endif } -static int tolua_cocos2dx_GLProgram_create(lua_State* tolua_S) -{ - if (nullptr == tolua_S) - return 0; - - int argc = 0; - bool ok = false; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertable(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if(2 == argc) - { - const char *arg0, *arg1; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:create"); arg0 = arg0_tmp.c_str(); - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:create"); arg1 = arg1_tmp.c_str(); - - GLProgram* tolua_ret = new (std::nothrow) GLProgram(); - if (nullptr == tolua_ret) - return 0; - - tolua_ret->autorelease(); - tolua_ret->initWithFilenames(arg0, arg1); - int ID = (tolua_ret) ? (int)tolua_ret->_ID : -1; - int* luaID = (tolua_ret) ? &tolua_ret->_luaID : NULL; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)tolua_ret,"cc.GLProgram"); - return 1; - - } - - luaL_error(tolua_S, "%s wrong number of arguments: %d, was expecting %d\n", "cc.GLProgram:create", argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2dx_GLProgram_create'.",&tolua_err); - return 0; -#endif -} - - -static int tolua_cocos2d_GLProgram_getProgram(lua_State* tolua_S) -{ - if (nullptr == tolua_S) - return 0; - - int argc = 0; - GLProgram* self = nullptr; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - self = (GLProgram*) tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (nullptr == self) - { - tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_GLProgram_getProgram'\n", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S) - 1; - if (0 == argc) - { - unsigned const int tolua_ret = ( unsigned const int) self->getProgram(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - return 1; - } - - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n", "cc.GLProgram:getProgram",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_GLProgram_getProgram'.",&tolua_err); - return 0; -#endif -} - -static int tolua_cocos2dx_GLProgram_setUniformLocationF32(lua_State* tolua_S) -{ - if (nullptr == tolua_S) - return 0; - - int argc = 0; - GLProgram* self = nullptr; - int location = 0; - float f1 = 0.0; - float f2 = 0.0; - float f3 = 0.0; - float f4 = 0.0; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - self = (GLProgram*) tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (nullptr == self) - { - tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_GLProgram_getProgram'\n", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc >= 2 && argc <= 5) - { -#if COCOS2D_DEBUG >= 1 - if (!tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err)) - { - goto tolua_lerror; - } -#endif - - location = (int) tolua_tonumber(tolua_S,2,0); - f1 = (float) tolua_tonumber(tolua_S,3,0); - - if (2 == argc) - { - self->setUniformLocationWith1f(location,f1); - return 0; - } - - if (argc >= 3) - { -#if COCOS2D_DEBUG >= 1 - if (!tolua_isnumber(tolua_S,4,0,&tolua_err)) - goto tolua_lerror; -#endif - - f2 = (float) tolua_tonumber(tolua_S,4,0); - if (3 == argc) - { - self->setUniformLocationWith2f(location, f1, f2); - return 0; - } - } - - if (argc >= 4) - { -#if COCOS2D_DEBUG >= 1 - if (!tolua_isnumber(tolua_S,5,0,&tolua_err)) - goto tolua_lerror; -#endif - - f3 = (float) tolua_tonumber(tolua_S,5,0); - if (4 == argc) - { - self->setUniformLocationWith3f(location, f1, f2, f3); - return 0; - } - } - - if (argc == 5) - { -#if COCOS2D_DEBUG >= 1 - if (!tolua_isnumber(tolua_S,6,0,&tolua_err)) - goto tolua_lerror; -#endif - - f4 = (float) tolua_tonumber(tolua_S,6,0); - if (5 == argc) - { - self->setUniformLocationWith4f(location, f1, f2, f3, f4); - return 0; - } - - } - } - - luaL_error(tolua_S, " %s has wrong number of arguments: %d, was expecting %d\n", "cc.GLProgram:setUniformLocationF32",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_GLProgram_getProgram'.",&tolua_err); - return 0; -#endif -} - - -static int lua_cocos2dx_GLProgram_getUniform(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_getUniform'", 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:getUniform"); - if(!ok) - return 0; - cocos2d::Uniform* ret = cobj->getUniform(arg0); - if (nullptr == ret) - { - lua_pushnil(tolua_S); - } - else - { - uniform_to_luaval(tolua_S, *ret); - } - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getUniform:getUniform",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getUniform'.",&tolua_err); -#endif - - return 0; -} - -int lua_cocos2dx_GLProgram_setUniformLocationWithMatrix2fv(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_setUniformLocationWithMatrix2fv'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - GLint arg0; - GLfloat* arg1; - unsigned int arg2; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWithMatrix2fv"); - - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.GLProgram:setUniformLocationWithMatrix2fv"); - - if(!ok) - { - luaL_error(tolua_S, "Parse params error in the lua_cocos2dx_GLProgram_setUniformLocationWithMatrix2fv"); - return 0; - } - -#if COCOS2D_DEBUG >= 1 - if (!tolua_istable(tolua_S, 3, 0, &tolua_err)) - goto tolua_lerror; -#endif - arg1 = new (std::nothrow) GLfloat[sizeof(GLfloat) * 4 * arg2]; - if (nullptr == arg1) - { - luaL_error(tolua_S, "Allocate matrixArry in the lua_cocos2dx_GLProgram_setUniformLocationWithMatrix2fv failed!"); - return 0; - } - - for (int i = 1; i <= arg2 * 4; i++) - { - arg1[i - 1] = (GLfloat)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - - cobj->setUniformLocationWithMatrix2fv(arg0, arg1, arg2); - CC_SAFE_DELETE_ARRAY(arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWithMatrix2fv",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWithMatrix2fv'.",&tolua_err); -#endif - - return 0; -} - -int lua_cocos2dx_GLProgram_setUniformLocationWithMatrix3fv(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_setUniformLocationWithMatrix3fv'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - GLint arg0; - GLfloat* arg1; - unsigned int arg2; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWithMatrix3fv"); - - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.GLProgram:setUniformLocationWithMatrix3fv"); - - if(!ok) - { - luaL_error(tolua_S, "Parse params error in the lua_cocos2dx_GLProgram_setUniformLocationWithMatrix3fv"); - return 0; - } - -#if COCOS2D_DEBUG >= 1 - if (!tolua_istable(tolua_S, 3, 0, &tolua_err)) - goto tolua_lerror; -#endif - arg1 = new (std::nothrow) GLfloat[sizeof(GLfloat) * 9 * arg2]; - if (nullptr == arg1) - { - luaL_error(tolua_S, "Allocate matrixArry in the lua_cocos2dx_GLProgram_setUniformLocationWithMatrix3fv failed!"); - return 0; - } - - for (int i = 1; i <= arg2 * 9; i++) - { - arg1[i - 1] = (GLfloat)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - - cobj->setUniformLocationWithMatrix3fv(arg0, arg1, arg2); - CC_SAFE_DELETE_ARRAY(arg1); - - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWithMatrix3fv",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWithMatrix3fv'.",&tolua_err); -#endif - - return 0; -} - -int lua_cocos2dx_GLProgram_setUniformLocationWithMatrix4fv(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_setUniformLocationWithMatrix4fv'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - GLint arg0; - GLfloat* arg1; - unsigned int arg2; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWithMatrix4fv"); - - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.GLProgram:setUniformLocationWithMatrix4fv"); - - if(!ok) - { - luaL_error(tolua_S, "Parse params error in the lua_cocos2dx_GLProgram_setUniformLocationWithMatrix4fv"); - return 0; - } - -#if COCOS2D_DEBUG >= 1 - if (!tolua_istable(tolua_S, 3, 0, &tolua_err)) - goto tolua_lerror; -#endif - arg1 = new (std::nothrow) GLfloat[sizeof(GLfloat) * 16 * arg2]; - if (nullptr == arg1) - { - luaL_error(tolua_S, "Allocate matrixArry in the lua_cocos2dx_GLProgram_setUniformLocationWithMatrix4fv failed!"); - return 0; - } - - for (int i = 1; i <= arg2 * 16; i++) - { - arg1[i - 1] = (GLfloat)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - - cobj->setUniformLocationWithMatrix4fv(arg0, arg1, arg2); - - CC_SAFE_DELETE_ARRAY(arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWithMatrix4fv",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWithMatrix4fv'.",&tolua_err); - return 0; -#endif -} - -int lua_cocos2dx_GLProgram_setUniformLocationWith3iv(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_setUniformLocationWith3iv'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - GLint arg0; - GLint* arg1; - unsigned int arg2; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWith3iv"); - - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.GLProgram:setUniformLocationWith3iv"); - if(!ok) - { - luaL_error(tolua_S, "Parse params error in the lua_cocos2dx_GLProgram_setUniformLocationWith3iv"); - return 0; - } - -#if COCOS2D_DEBUG >= 1 - if (!tolua_istable(tolua_S, 3, 0, &tolua_err)) - goto tolua_lerror; -#endif - arg1 = new (std::nothrow) GLint[sizeof(GLint) * 3 * arg2]; - if (nullptr == arg1) - { - luaL_error(tolua_S, "Allocate intArray in the lua_cocos2dx_GLProgram_setUniformLocationWith3iv failed!"); - return 0; - } - - for (int i = 1; i <= arg2 * 3; i++) - { - arg1[i - 1] = (GLint)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - - cobj->setUniformLocationWith3iv(arg0, arg1, arg2); - - CC_SAFE_DELETE_ARRAY(arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWith3iv",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWith3iv'.",&tolua_err); -#endif - - return 0; -} - -int lua_cocos2dx_GLProgram_setUniformLocationWith4iv(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_setUniformLocationWith4iv'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - GLint arg0; - GLint* arg1; - unsigned int arg2; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWith4iv"); - - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.GLProgram:setUniformLocationWith4iv"); - - if(!ok) - { - luaL_error(tolua_S, "Parse params error in the lua_cocos2dx_GLProgram_setUniformLocationWith4iv"); - return 0; - } - -#if COCOS2D_DEBUG >= 1 - if (!tolua_istable(tolua_S, 3, 0, &tolua_err)) - goto tolua_lerror; -#endif - arg1 = new (std::nothrow) GLint[sizeof(GLint) * 4 * arg2]; - if (nullptr == arg1) - { - luaL_error(tolua_S, "Allocate intArray in the lua_cocos2dx_GLProgram_setUniformLocationWith4iv failed!"); - return 0; - } - - for (int i = 1; i <= arg2 * 4; i++) - { - arg1[i - 1] = (GLint)tolua_tofieldnumber(tolua_S, 3, i, 0); - } - cobj->setUniformLocationWith4iv(arg0, arg1, arg2); - CC_SAFE_DELETE_ARRAY(arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWith4iv",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWith4iv'.",&tolua_err); -#endif - - return 0; -} - -int lua_cocos2dx_GLProgram_setUniformLocationWith2iv(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_setUniformLocationWith2iv'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - GLint arg0; - GLint* arg1; - unsigned int arg2; - - ok &= luaval_to_int32(tolua_S, 2,(GLint *)&arg0, "cc.GLProgram:setUniformLocationWith2iv"); - - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.GLProgram:setUniformLocationWith2iv"); - - if(!ok) - { - luaL_error(tolua_S, "Parse params error in the lua_cocos2dx_GLProgram_setUniformLocationWith2iv"); - return 0; - } - -#if COCOS2D_DEBUG >= 1 - if (!tolua_istable(tolua_S, 3, 0, &tolua_err)) - goto tolua_lerror; -#endif - arg1 = new (std::nothrow) GLint[sizeof(GLint) * 2 * arg2]; - if (nullptr == arg1) - { - luaL_error(tolua_S, "Allocate intArray in the lua_cocos2dx_GLProgram_setUniformLocationWith2iv failed!"); - return 0; - } - - cobj->setUniformLocationWith2iv(arg0, arg1, arg2); - - CC_SAFE_DELETE_ARRAY(arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWith2iv",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWith2iv'.",&tolua_err); -#endif - - return 0; -} - -int lua_cocos2dx_GLProgram_getVertexAttrib(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_getVertexAttrib'", 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:getVertexAttrib"); - if(!ok) - return 0; - cocos2d::VertexAttrib* ret = cobj->getVertexAttrib(arg0); - if (nullptr == ret) - { - lua_pushnil(tolua_S); - } - else - { - vertexattrib_to_luaval(tolua_S, *ret); - } - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getVertexAttrib",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getVertexAttrib'.",&tolua_err); -#endif - - return 0; -} - -static void extendGLProgram(lua_State* tolua_S) -{ - lua_pushstring(tolua_S, "cc.GLProgram"); - lua_rawget(tolua_S, LUA_REGISTRYINDEX); - if (lua_istable(tolua_S,-1)) - { - tolua_function(tolua_S, "create", tolua_cocos2dx_GLProgram_create); - tolua_function(tolua_S, "getProgram", tolua_cocos2d_GLProgram_getProgram); - tolua_function(tolua_S, "setUniformLocationF32", tolua_cocos2dx_GLProgram_setUniformLocationF32); - tolua_function(tolua_S, "getUniform", lua_cocos2dx_GLProgram_getUniform); - tolua_function(tolua_S, "setUniformLocationWithMatrix2fv", lua_cocos2dx_GLProgram_setUniformLocationWithMatrix2fv); - tolua_function(tolua_S, "setUniformLocationWithMatrix3fv", lua_cocos2dx_GLProgram_setUniformLocationWithMatrix3fv); - tolua_function(tolua_S, "setUniformLocationWithMatrix4fv", lua_cocos2dx_GLProgram_setUniformLocationWithMatrix4fv); - tolua_function(tolua_S, "setUniformLocationWith2iv", lua_cocos2dx_GLProgram_setUniformLocationWith2iv); - tolua_function(tolua_S, "setUniformLocationWith3iv", lua_cocos2dx_GLProgram_setUniformLocationWith3iv); - tolua_function(tolua_S, "setUniformLocationWith4iv", lua_cocos2dx_GLProgram_setUniformLocationWith4iv); - tolua_function(tolua_S, "getVertexAttrib", lua_cocos2dx_GLProgram_getVertexAttrib); - }; - lua_pop(tolua_S, 1); -} - static int tolua_cocos2dx_Texture2D_setTexParameters(lua_State* tolua_S) { if (nullptr == tolua_S) @@ -6990,81 +6229,6 @@ static void extendConsole(lua_State* tolua_S) lua_pop(tolua_S, 1); } -static int lua_cocos2dx_GLProgramState_setVertexAttribPointer(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_setVertexAttribPointer'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 6) - { - std::string arg0; - int arg1; - unsigned int arg2; - bool arg3; - int arg4; - long arg5; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setVertexAttribPointer"); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setVertexAttribPointer"); - - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.GLProgramState:setVertexAttribPointer"); - - ok &= luaval_to_boolean(tolua_S, 5, &arg3, "cc.GLProgramState:setVertexAttribPointer"); - - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.GLProgramState:setVertexAttribPointer"); - - ok &= luaval_to_long(tolua_S, 7, (long *)&arg5, "cc.GLProgramState:setVertexAttribPointer"); - - if(!ok) - return 0; - cobj->setVertexAttribPointer(arg0, arg1, arg2, arg3, arg4, (void*)arg5); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setVertexAttribPointer",argc, 6); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setVertexAttribPointer'.",&tolua_err); -#endif - - return 0; -} - -static void extendGLProgramState(lua_State* tolua_S) -{ - lua_pushstring(tolua_S, "cc.GLProgramState"); - lua_rawget(tolua_S, LUA_REGISTRYINDEX); - if (lua_istable(tolua_S,-1)) - { - tolua_function(tolua_S,"setVertexAttribPointer", lua_cocos2dx_GLProgramState_setVertexAttribPointer); - } - lua_pop(tolua_S, 1); -} - static int lua_cocos2dx_OrbitCamera_sphericalRadius(lua_State* tolua_S) { int argc = 0; @@ -7986,7 +7150,6 @@ int register_all_cocos2dx_manual(lua_State* tolua_S) extendParticleSystem(tolua_S); extendFileUtils(tolua_S); extendUserDefault(tolua_S); - extendGLProgram(tolua_S); extendTexture2D(tolua_S); extendSpriteBatchNode(tolua_S); extendEventListenerKeyboard(tolua_S); @@ -8004,7 +7167,6 @@ int register_all_cocos2dx_manual(lua_State* tolua_S) extendLabel(tolua_S); extendTMXTiledMap(tolua_S); extendConsole(tolua_S); - extendGLProgramState(tolua_S); extendOrbitCamera(tolua_S); extendTMXLayer(tolua_S); extendApplication(tolua_S); diff --git a/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.cpp b/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.cpp deleted file mode 100644 index 26e0efaa33..0000000000 --- a/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - 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 "scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h" -#include "scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h" -#include "deprecated/CCString.h" - -CCBReader* CCBProxy::createCCBReader() -{ - NodeLoaderLibrary *ccNodeLoaderLibrary = NodeLoaderLibrary::getInstance(); - CCBReader * pCCBReader = new (std::nothrow) CCBReader(ccNodeLoaderLibrary); - pCCBReader->autorelease(); - - return pCCBReader; -} -Node* CCBProxy::readCCBFromFile(const char *pszFileName,CCBReader* pCCBReader,bool bSetOwner) -{ - if (NULL == pCCBReader || NULL == pszFileName || 0 == strlen(pszFileName)) { - return NULL; - } - Node *pNode = NULL; - if (bSetOwner) { - pNode = pCCBReader->readNodeGraphFromFile(pszFileName,this); - } - else - { - pNode = pCCBReader->readNodeGraphFromFile(pszFileName); - } - - - return pNode; -} - -const char* CCBProxy::getNodeTypeName(Node* pNode) -{ - if (NULL == pNode) { - return NULL; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.Label"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.Sprite"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.ControlButton"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.LayerGradient"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.LayerColor"; - } - - if (NULL != dynamic_cast(pNode)) { - return "ccui.Scale9Sprite"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.Menu"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.MenuItemAtlasFont"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.MenuItemFont"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.MenuItemLabel"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.MenuItemImage"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.MenuItemToggle"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.MenuItemSprite"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.MenuItem"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.Layer"; - } - - if (NULL != dynamic_cast<__String*>(pNode)) { - return "cc.String"; - } - - if (NULL != dynamic_cast(pNode)) { - return "cc.ParticleSystemQuad"; - } - - return "No Support"; -} - -void CCBProxy::setCallback(Node* node,int handle, int controlEvents) -{ - if (nullptr == node) { - return; - } - - if (nullptr != dynamic_cast(node)) - { - MenuItem *menuItem = dynamic_cast(node); - if (nullptr != menuItem) { - ScriptHandlerMgr::getInstance()->addObjectHandler((void*)menuItem, handle, ScriptHandlerMgr::HandlerType::MENU_CLICKED); - } - } - else if (NULL != dynamic_cast(node)) - { - Control* control = dynamic_cast(node); - if (nullptr != control) - { - for (int i = 0; i < kControlEventTotalNumber; i++) - { - if ((controlEvents & (1 << i))) - { - ScriptHandlerMgr::HandlerType handlerType = ScriptHandlerMgr::HandlerType((int)ScriptHandlerMgr::HandlerType::CONTROL_TOUCH_DOWN + i); - ScriptHandlerMgr::getInstance()->addObjectHandler((void*)control, handle, handlerType); - } - } - } - } -} - diff --git a/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h b/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h deleted file mode 100644 index 3f738e72d0..0000000000 --- a/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - 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 __CCBPROXY_H_ -#define __CCBPROXY_H_ - - -#include "scripting/lua-bindings/manual/CCLuaEngine.h" -#include "audio/include/SimpleAudioEngine.h" -#include "extensions/cocos-ext.h" -#include "editor-support/cocosbuilder/CocosBuilder.h" - -USING_NS_CC; -USING_NS_CC_EXT; -using namespace cocosbuilder; - -/** - * @addtogroup lua - * @{ - */ - -/** - * CCBProxy is a proxy for cocosbuilder. - * By using CCBProxy we could create a CCBReader object conveniently and set the Lua callback function when some events triggered should be passed onto Lua. - */ -class CCBProxy : public Layer{ -public: - /** - * Default constructor,do nothing. - * - * @lua NA - * @js NA - */ - CCBProxy() { } - - /** - * Destructor. - * - * @lua NA - * @js NA - */ - virtual ~ CCBProxy(){ } - - /** - * Create a CCBProxy object. - * - * @return a CCBProxy object. - * - * @lua NA - * @js NA - */ - CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(CCBProxy, create); - - /** - * Create a CCBReader object. - * - * @return a CCBReader object. - * - * @lua NA - * @js NA - */ - CCBReader* createCCBReader(); - - /** - * Read a ccb file. - * - * @param pszFileName the string pointer point to the file name. - * @param pCCBReader the CCBreader object pointer. - * @param bSetOwner whether to set the owner or not. - * @return a Node object pointer. - * @js NA - */ - Node* readCCBFromFile(const char *pszFileName,CCBReader* pCCBReader,bool bSetOwner = false); - - /** - * Get the true type name of pNode. - * By using the dynamic_cast function, we could get the true type name of pNode. - * - * @param pNode the Node object used to query. - * @return a string pointer point to the true type name otherwise return "No Support". - * @js NA - */ - const char* getNodeTypeName(Node* pNode); - - /** - * Set relationship between the Lua callback function reference index handle and the node. - * According to the different controlEvents values,we would choose different ScriptHandlerMgr::HandlerTyp. - * When node receive the events information should be passed on to Lua, it would find the Lua callback function by the Lua callback function reference index. - * - * @param node the node object should pass on the events information to Lua,when the events are triggered. - * @param handle the Lua callback function reference index. - * @param controlEvents the combination value of Control::EventType, default 0. - * @js NA - */ - void setCallback(Node* node,int handle, int controlEvents = 0); -}; - -// end group -/// @} - -/// @cond -class CCBLayerLoader:public LayerLoader{ -public: - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCBLayerLoader, loader); -}; -/// @endcond - -#endif // __CCBPROXY_H_ diff --git a/cocos/scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.cpp b/cocos/scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.cpp deleted file mode 100644 index bc29d50bcb..0000000000 --- a/cocos/scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.cpp +++ /dev/null @@ -1,470 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - 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 "scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.h" -#include "scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.hpp" - -#include "scripting/lua-bindings/manual/tolua_fix.h" -#include "scripting/lua-bindings/manual/LuaBasicConversions.h" -#include "scripting/lua-bindings/manual/CCLuaEngine.h" -#include "scripting/lua-bindings/manual/CCLuaValue.h" -#include "scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h" - -USING_NS_CC; -USING_NS_CC_EXT; - -static int tolua_cocos2d_CCBProxy_create(lua_State* tolua_S) -{ - if (NULL == tolua_S) - return 0; - - int argc = 0; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertable(tolua_S,1,"cc.CCBProxy",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (0 == argc) - { - CCBProxy* tolua_ret = (CCBProxy*)CCBProxy::create(); - int nID = (tolua_ret) ? (int)tolua_ret->_ID : -1; - int *pLuaID = (tolua_ret) ? &tolua_ret->_luaID : NULL; - toluafix_pushusertype_ccobject(tolua_S, nID, pLuaID, (void*)tolua_ret,"cc.CCBProxy"); - return 1; - } - - luaL_error(tolua_S, "%s function of CCBProxy has wrong number of arguments: %d, was expecting %d\n", "cc.CCBProxy:create", argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_CCBProxy_create'.",&tolua_err); - return 0; -#endif -} - - -static int tolua_cocos2d_CCBProxy_createCCBReader(lua_State* tolua_S) -{ - if (NULL == tolua_S) - return 0; - - int argc = 0; - CCBProxy* self = nullptr; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.CCBProxy",0,&tolua_err)) goto tolua_lerror; -#endif - - self = static_cast(tolua_tousertype(tolua_S,1,0)); - -#if COCOS2D_DEBUG >= 1 - if (nullptr == self) { - tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_CCBProxy_createCCBReader'\n", NULL); - return 0; - } -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (0 == argc) - { - CCBReader* tolua_ret = (CCBReader*) self->createCCBReader(); - int nID = (tolua_ret) ? (int)tolua_ret->_ID : -1; - int* pLuaID = (tolua_ret) ? &tolua_ret->_luaID : NULL; - toluafix_pushusertype_ccobject(tolua_S, nID, pLuaID, (void*)tolua_ret,"cc.CCBReader"); - return 1; - } - - luaL_error(tolua_S, "%s function of CCBProxy has wrong number of arguments: %d, was expecting %d\n", "cc.CCBProxy:createCCBReader", argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_CCBProxy_createCCBReader'.",&tolua_err); - return 0; -#endif -} - -static int tolua_cocos2d_CCBProxy_readCCBFromFile(lua_State* tolua_S) -{ - if (NULL == tolua_S) - return 0; - - int argc = 0; - CCBProxy* self = nullptr; - const char* ccbFilePath = nullptr; - CCBReader* ccbReader = nullptr; - bool setOwner = false; - Node* tolua_ret = nullptr; - int ID = 0; - int* luaID = nullptr; - - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.CCBProxy",0,&tolua_err)) goto tolua_lerror; -#endif - - self = static_cast(tolua_tousertype(tolua_S,1,0)); - -#if COCOS2D_DEBUG >= 1 - if (nullptr == self) { - tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_CCBProxy_readCCBFromFile'\n", NULL); - return 0; - } -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (2 == argc || 3 == argc) - { -#if COCOS2D_DEBUG >= 1 - if (!tolua_isstring(tolua_S, 2, 0, &tolua_err)|| - !tolua_isusertype(tolua_S,3,"cc.CCBReader",0,&tolua_err)|| - !tolua_isboolean(tolua_S,4,1,&tolua_err ) - ) - goto tolua_lerror; -#endif - ccbFilePath = ((const char*) tolua_tostring(tolua_S,2,0)); - ccbReader = ((CCBReader*) tolua_tousertype(tolua_S,3,0)); - setOwner = (bool) tolua_toboolean(tolua_S,4,-1); - tolua_ret = (Node*) self->readCCBFromFile(ccbFilePath, ccbReader, setOwner); - ID = (tolua_ret) ? (int)tolua_ret->_ID : -1; - luaID = (tolua_ret) ? &tolua_ret->_luaID : NULL; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)tolua_ret,"cc.Node"); - return 1; - } - - luaL_error(tolua_S, "%s function of CCBProxy has wrong number of arguments: %d, was expecting %d\n", "cc.CCBReader:readCCBFromFile", argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_CCBProxy_readCCBFromFile'.",&tolua_err); - return 0; -#endif -} - - -static int tolua_cocos2d_CCBProxy_getNodeTypeName(lua_State* tolua_S) -{ - if (nullptr == tolua_S) - return 0; - - int argc = 0; - CCBProxy* self = nullptr; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.CCBProxy",0,&tolua_err)) goto tolua_lerror; -#endif - - self = static_cast(tolua_tousertype(tolua_S,1,0)); - -#if COCOS2D_DEBUG >= 1 - if (nullptr == self) { - tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_CCBProxy_getNodeTypeName'\n", NULL); - return 0; - } -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (1 == argc) - { -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - Node* node = static_cast(tolua_tousertype(tolua_S,2,0)); - const char* tolua_ret = (const char*)self->getNodeTypeName(node); - tolua_pushstring(tolua_S,(const char*)tolua_ret); - return 1; - } - - luaL_error(tolua_S, " %s has wrong number of arguments: %d, was expecting %d\n", "cc.CCBProxy:getNodeTypeName", argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_CCBProxy_getNodeTypeName'.",&tolua_err); - return 0; -#endif -} - -static int tolua_cocos2d_CCBProxy_setCallback(lua_State* tolua_S) -{ - if (nullptr == tolua_S) - return 0; - - int argc = 0; - CCBProxy* self = nullptr; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.CCBProxy",0,&tolua_err)) goto tolua_lerror; -#endif - - self = static_cast(tolua_tousertype(tolua_S,1,0)); -#if COCOS2D_DEBUG >= 1 - if (nullptr == self) { - tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_CCBProxy_setCallback'\n", NULL); - return 0; - } -#endif - - argc = lua_gettop(tolua_S) - 1; - - if ( argc >= 2 && argc <= 3 ) - { -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,2,"cc.Node",0,&tolua_err) || - !toluafix_isfunction(tolua_S, 3, "LUA_FUNCTION", 0, &tolua_err) || - !tolua_isnumber(tolua_S, 4, 1, &tolua_err) - ) - goto tolua_lerror; -#endif - - Node* node = ((Node*)tolua_tousertype(tolua_S,2,0)); - LUA_FUNCTION funID = ( toluafix_ref_function(tolua_S,3,0)); - int controlEvents = (int)tolua_tonumber(tolua_S, 4, 1); - self->setCallback(node, funID, controlEvents); - return 0; - } - - luaL_error(tolua_S, " %s has wrong number of arguments: %d, was expecting %d\n", "cc.CCBProxy:setCallback", argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_CCBProxy_setCallback'.",&tolua_err); - return 0; -#endif -} - -int register_cocos2dx_extension_CCBProxy(lua_State* tolua_S) -{ - tolua_module(tolua_S,"cc",0); - tolua_beginmodule(tolua_S,"cc"); - tolua_usertype(tolua_S,"cc.CCBProxy"); - tolua_cclass(tolua_S,"CCBProxy","cc.CCBProxy","cc.Layer",NULL); - tolua_beginmodule(tolua_S,"CCBProxy"); - tolua_function(tolua_S, "create", tolua_cocos2d_CCBProxy_create); - tolua_function(tolua_S, "createCCBReader", tolua_cocos2d_CCBProxy_createCCBReader); - tolua_function(tolua_S, "readCCBFromFile", tolua_cocos2d_CCBProxy_readCCBFromFile); - tolua_function(tolua_S, "getNodeTypeName", tolua_cocos2d_CCBProxy_getNodeTypeName); - tolua_function(tolua_S, "setCallback", tolua_cocos2d_CCBProxy_setCallback); - tolua_endmodule(tolua_S); - tolua_endmodule(tolua_S); - - std::string typeName = typeid(CCBProxy).name(); - g_luaType[typeName] = "cc.CCBProxy"; - return 1; -} - -static int tolua_cocos2d_CCBReader_load(lua_State* tolua_S) -{ - if (nullptr == tolua_S) - return 0; - - int argc = 0; - CCBReader* self = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.CCBReader",0,&tolua_err)) goto tolua_lerror; -#endif - - self = static_cast(tolua_tousertype(tolua_S,1,0)); -#if COCOS2D_DEBUG >= 1 - if (nullptr == self) { - tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_CCBReader_load'\n", NULL); - return 0; - } -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc >= 1 && argc <= 3) - { - const char* fileName = nullptr; - std::string fileName_tmp = ""; - ok &= luaval_to_std_string(tolua_S, 2, &fileName_tmp, "cc.CCBReader:load"); - fileName = fileName_tmp.c_str(); - if (!ok) - return 0; - - if (1 == argc) - { - Node* tolua_ret = (Node*) self->readNodeGraphFromFile(fileName); - int ID = (tolua_ret) ? (int)tolua_ret->_ID : -1; - int* luaID = (tolua_ret) ? &tolua_ret->_luaID : NULL; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)tolua_ret,"cc.Node"); - return 1; - } - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S, 3, "cc.Ref", 0, &tolua_err)) - goto tolua_lerror; -#endif - Ref* owner = static_cast(tolua_tousertype(tolua_S, 3, 0)); - //In lua owner always define in lua script by table, so owner is always nullptr - if (2 == argc) - { - Node* tolua_ret = (Node*) self->readNodeGraphFromFile(fileName,owner); - int ID = (tolua_ret) ? (int)tolua_ret->_ID : -1; - int* luaID = (tolua_ret) ? &tolua_ret->_luaID : NULL; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)tolua_ret,"cc.Node"); - return 1; - } - - Size size; - ok &= luaval_to_size(tolua_S, 4, &size, "cc.CCBReader:load"); - if (!ok) - return 0; - - Node* tolua_ret = (Node*) self->readNodeGraphFromFile(fileName,owner,size); - int ID = (tolua_ret) ? (int)tolua_ret->_ID : -1; - int* luaID = (tolua_ret) ? &tolua_ret->_luaID : NULL; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)tolua_ret,"cc.Node"); - return 1; - - } - - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n", "cc.CCBReader:load",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_CCBReader_load'.",&tolua_err); - return 0; -#endif -} - -static void extendCCBReader(lua_State* tolua_S) -{ - lua_pushstring(tolua_S, "cc.CCBReader"); - lua_rawget(tolua_S, LUA_REGISTRYINDEX); - if (lua_istable(tolua_S,-1)) - { - lua_pushstring(tolua_S,"load"); - lua_pushcfunction(tolua_S,tolua_cocos2d_CCBReader_load ); - lua_rawset(tolua_S,-3); - } - lua_pop(tolua_S, 1); -} - - -static int tolua_cocos2d_CCBAnimationManager_setCallFuncForLuaCallbackNamed(lua_State* tolua_S) -{ - if (nullptr == tolua_S) - return 0; - - int argc = 0; - CCBAnimationManager* self = nullptr; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; - if (!tolua_isusertype(tolua_S,1,"cc.CCBAnimationManager",0,&tolua_err)) goto tolua_lerror; -#endif - - self = static_cast(tolua_tousertype(tolua_S,1,0)); -#if COCOS2D_DEBUG >= 1 - if (nullptr == self) { - tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_CCBAnimationManager_setCallFuncForLuaCallbackNamed'\n", NULL); - return 0; - } -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (2 == argc) - { - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,2, "cc.CallFunc", 0, &tolua_err) || - !tolua_isstring(tolua_S, 3, 0, &tolua_err) ) - goto tolua_lerror; -#endif - - CallFunc* pCallFunc = static_cast(tolua_tousertype(tolua_S,2,0)); - const char* keyframeCallback = ((const char*) tolua_tostring(tolua_S,3,0)); - std::string strKey = ""; - if (NULL != keyframeCallback) { - strKey = keyframeCallback; - } - self->setCallFunc(pCallFunc, strKey); - - return 0; - } - - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n", "cc.CCBAnimationManager:setCallFuncForLuaCallbackNamed",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_CCBAnimationManager_setCallFuncForLuaCallbackNamed'.",&tolua_err); - return 0; -#endif -} - -static void extendCCBAnimationManager(lua_State* tolua_S) -{ - lua_pushstring(tolua_S, "cc.CCBAnimationManager"); - lua_rawget(tolua_S, LUA_REGISTRYINDEX); - if (lua_istable(tolua_S,-1)) - { - lua_pushstring(tolua_S,"setCallFuncForLuaCallbackNamed"); - lua_pushcfunction(tolua_S,tolua_cocos2d_CCBAnimationManager_setCallFuncForLuaCallbackNamed ); - lua_rawset(tolua_S,-3); - } - lua_pop(tolua_S, 1); -} - -int register_all_cocos2dx_cocosbuilder_manual(lua_State* tolua_S) -{ - register_cocos2dx_extension_CCBProxy(tolua_S); - extendCCBReader(tolua_S); - extendCCBAnimationManager(tolua_S); - return 0; -} - - -int register_cocosbuilder_module(lua_State* tolua_S) -{ - lua_getglobal(tolua_S, "_G"); - if (lua_istable(tolua_S,-1))//stack:...,_G, - { - register_all_cocos2dx_cocosbuilder(tolua_S); - register_all_cocos2dx_cocosbuilder_manual(tolua_S); - } - lua_pop(tolua_S, 1); - return 1; -} diff --git a/cocos/scripting/lua-bindings/manual/cocostudio/lua_cocos2dx_coco_studio_manual.cpp b/cocos/scripting/lua-bindings/manual/cocostudio/lua_cocos2dx_coco_studio_manual.cpp index 925bb5b688..cfe727f2eb 100644 --- a/cocos/scripting/lua-bindings/manual/cocostudio/lua_cocos2dx_coco_studio_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/cocostudio/lua_cocos2dx_coco_studio_manual.cpp @@ -262,7 +262,7 @@ static int lua_cocos2dx_ArmatureDataManager_addArmatureFileInfoAsyncCallFunc(lua ScriptHandlerMgr::getInstance()->addObjectHandler((void*)wrapper, handler, ScriptHandlerMgr::HandlerType::ARMATURE_EVENT); - self->addArmatureFileInfoAsync(configFilePath, wrapper, schedule_selector(LuaArmatureWrapper::addArmatureFileInfoAsyncCallback)); + self->addArmatureFileInfoAsync(configFilePath, wrapper, CC_SCHEDULE_SELECTOR(LuaArmatureWrapper::addArmatureFileInfoAsyncCallback)); return 0; } @@ -288,7 +288,7 @@ static int lua_cocos2dx_ArmatureDataManager_addArmatureFileInfoAsyncCallFunc(lua ScriptHandlerMgr::getInstance()->addObjectHandler((void*)wrapper, handler, ScriptHandlerMgr::HandlerType::ARMATURE_EVENT); - self->addArmatureFileInfoAsync(imagePath, plistPath,configFilePath,wrapper, schedule_selector(LuaArmatureWrapper::addArmatureFileInfoAsyncCallback)); + self->addArmatureFileInfoAsync(imagePath, plistPath,configFilePath,wrapper, CC_SCHEDULE_SELECTOR(LuaArmatureWrapper::addArmatureFileInfoAsyncCallback)); return 0; } diff --git a/cocos/scripting/lua-bindings/manual/lua_module_register.cpp b/cocos/scripting/lua-bindings/manual/lua_module_register.cpp index 0efb42d09d..5f9b35577e 100644 --- a/cocos/scripting/lua-bindings/manual/lua_module_register.cpp +++ b/cocos/scripting/lua-bindings/manual/lua_module_register.cpp @@ -26,7 +26,6 @@ #include "scripting/lua-bindings/manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.h" #include "scripting/lua-bindings/manual/network/lua_cocos2dx_network_manual.h" -#include "scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.h" #include "scripting/lua-bindings/manual/cocostudio/lua_cocos2dx_coco_studio_manual.hpp" #include "scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.h" #include "scripting/lua-bindings/manual/ui/lua_cocos2dx_ui_manual.hpp" @@ -42,12 +41,12 @@ int lua_module_register(lua_State* L) // Don't change the module register order unless you know what your are doing register_cocosdenshion_module(L); register_network_module(L); - register_cocosbuilder_module(L); register_cocostudio_module(L); register_ui_module(L); - register_extension_module(L); - register_spine_module(L); - register_cocos3d_module(L); + //TODO minggo +// register_extension_module(L); +// register_spine_module(L); +// register_cocos3d_module(L); register_audioengine_module(L); #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION register_physics3d_module(L); diff --git a/cocos/scripting/lua-bindings/manual/network/Lua_web_socket.cpp b/cocos/scripting/lua-bindings/manual/network/Lua_web_socket.cpp index 5f2e7c5b12..c7f1f2cb6b 100644 --- a/cocos/scripting/lua-bindings/manual/network/Lua_web_socket.cpp +++ b/cocos/scripting/lua-bindings/manual/network/Lua_web_socket.cpp @@ -34,7 +34,7 @@ #include "scripting/lua-bindings/manual/CCLuaEngine.h" #include "scripting/lua-bindings/manual/LuaBasicConversions.h" #include "scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h" -#include "deprecated/CCString.h" +#include "scripting/deprecated/CCString.h" using namespace cocos2d; diff --git a/cocos/scripting/lua-bindings/manual/network/lua_downloader.cpp b/cocos/scripting/lua-bindings/manual/network/lua_downloader.cpp index e987d20484..c7f8624da4 100644 --- a/cocos/scripting/lua-bindings/manual/network/lua_downloader.cpp +++ b/cocos/scripting/lua-bindings/manual/network/lua_downloader.cpp @@ -311,7 +311,7 @@ static int lua_downloader_tostring(lua_State *L) return 1; } -static const struct luaL_reg downloaderStaticFns[] = { +static const struct luaL_Reg downloaderStaticFns[] = { { "new", lua_downloader_new }, /* * cocos2d::Downloader is not a subclass of cocos2d::Ref, @@ -322,7 +322,7 @@ static const struct luaL_reg downloaderStaticFns[] = { }; -static const struct luaL_reg downloaderMemberFns[] = { +static const struct luaL_Reg downloaderMemberFns[] = { { "createDownloadDataTask", lua_downloader_createDownloadDataTask }, { "createDownloadFileTask", lua_downloader_createDownloadFileTask }, { "setOnFileTaskSuccess", lua_downloader_setOnFileTaskSuccess }, diff --git a/cocos/scripting/lua-bindings/manual/spine/lua_cocos2dx_spine_manual.cpp b/cocos/scripting/lua-bindings/manual/spine/lua_cocos2dx_spine_manual.cpp index 347e159b2d..4aa4ff086c 100644 --- a/cocos/scripting/lua-bindings/manual/spine/lua_cocos2dx_spine_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/spine/lua_cocos2dx_spine_manual.cpp @@ -65,8 +65,9 @@ static int tolua_cocos2dx_setBlendFunc(lua_State* tolua_S,const char* className) if (!luaval_to_int32(tolua_S, 3, (int32_t*)&dst,StringUtils::format("%s%s",className,":setBlendFunc").c_str())) return 0; - BlendFunc blendFunc = {src, dst}; - self->setBlendFunc(blendFunc); +//TODO minggo +// BlendFunc blendFunc = {src, dst}; +// self->setBlendFunc(blendFunc); return 0; } diff --git a/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/project.pbxproj b/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/project.pbxproj index 4d40a4e945..28d5f83932 100644 --- a/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/project.pbxproj +++ b/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/project.pbxproj @@ -25,11 +25,8 @@ 150983E01B1C4860007F3818 /* lua_cocos2dx_navmesh_conversions.h in Headers */ = {isa = PBXBuildFile; fileRef = 150983DC1B1C4860007F3818 /* lua_cocos2dx_navmesh_conversions.h */; }; 15415A7019A71768004F1E71 /* lua_cocos2dx_extension_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74C18BC45C200215002 /* lua_cocos2dx_extension_auto.cpp */; }; 15415A7119A71782004F1E71 /* lua_cocos2dx_extension_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74C18BC45C200215002 /* lua_cocos2dx_extension_auto.cpp */; }; - 15415A7219A718FB004F1E71 /* lua_cocos2dx_3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1516227F19A0F3E3006099B8 /* lua_cocos2dx_3d_auto.cpp */; }; - 15415A7319A718FB004F1E71 /* lua_cocos2dx_cocosbuilder_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCC019864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.cpp */; }; 15415A7519A718FB004F1E71 /* lua_cocos2dx_experimental_video_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 156EADF11977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.cpp */; }; 15415A7619A718FB004F1E71 /* lua_cocos2dx_ui_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */; }; - 15415A7719A718FB004F1E71 /* lua_cocos2dx_spine_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75518BC45C200215002 /* lua_cocos2dx_spine_auto.cpp */; }; 15415A7819A718FB004F1E71 /* lua_cocos2dx_studio_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75818BC45C200215002 /* lua_cocos2dx_studio_auto.cpp */; }; 15415AA519A71A53004F1E71 /* auxiliar.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A8719A71A53004F1E71 /* auxiliar.c */; }; 15415AA619A71A53004F1E71 /* auxiliar.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A8719A71A53004F1E71 /* auxiliar.c */; }; @@ -91,16 +88,9 @@ 15415ADE19A71A53004F1E71 /* usocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415AA319A71A53004F1E71 /* usocket.c */; }; 15415ADF19A71A53004F1E71 /* usocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 15415AA419A71A53004F1E71 /* usocket.h */; }; 15415AE019A71A53004F1E71 /* usocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 15415AA419A71A53004F1E71 /* usocket.h */; }; - 155C7DEA19A71BDA00F08B25 /* lua_cocos2dx_3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1516227F19A0F3E3006099B8 /* lua_cocos2dx_3d_auto.cpp */; }; - 155C7DEB19A71BE900F08B25 /* lua_cocos2dx_cocosbuilder_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCC019864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.cpp */; }; - 155C7DEC19A71BF200F08B25 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCC219864D8700A46ACC /* lua_cocos2dx_cocosdenshion_auto.cpp */; }; - 155C7DED19A71BF400F08B25 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCC219864D8700A46ACC /* lua_cocos2dx_cocosdenshion_auto.cpp */; }; 155C7DEE19A71BFC00F08B25 /* lua_cocos2dx_experimental_video_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 156EADF11977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.cpp */; }; 155C7DEF19A71C0900F08B25 /* lua_cocos2dx_ui_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */; }; - 155C7DF019A71C1E00F08B25 /* lua_cocos2dx_spine_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75518BC45C200215002 /* lua_cocos2dx_spine_auto.cpp */; }; 155C7DF119A71C2300F08B25 /* lua_cocos2dx_studio_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75818BC45C200215002 /* lua_cocos2dx_studio_auto.cpp */; }; - 155C7DF219A71C3200F08B25 /* lua_cocos2dx_3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 158C128519A0FA1300781A76 /* lua_cocos2dx_3d_manual.cpp */; }; - 155C7DF319A71C3400F08B25 /* lua_cocos2dx_3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 158C128519A0FA1300781A76 /* lua_cocos2dx_3d_manual.cpp */; }; 155C7DF419A71C3700F08B25 /* lua_cocos2dx_3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 158C128619A0FA1300781A76 /* lua_cocos2dx_3d_manual.h */; }; 155C7DF519A71C3900F08B25 /* lua_cocos2dx_3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 158C128619A0FA1300781A76 /* lua_cocos2dx_3d_manual.h */; }; 155C7DF619A71C3E00F08B25 /* lua_cocos2dx_cocosdenshion_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15427D42198F73F700DC375D /* lua_cocos2dx_cocosdenshion_manual.cpp */; }; @@ -111,16 +101,6 @@ 155C7DFB19A71C4E00F08B25 /* lua_cocos2dx_coco_studio_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15EFA401198B2AB2000C57D3 /* lua_cocos2dx_coco_studio_manual.cpp */; }; 155C7DFC19A71C5300F08B25 /* lua_cocos2dx_coco_studio_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15EFA402198B2AB2000C57D3 /* lua_cocos2dx_coco_studio_manual.hpp */; }; 155C7DFD19A71C5400F08B25 /* lua_cocos2dx_coco_studio_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15EFA402198B2AB2000C57D3 /* lua_cocos2dx_coco_studio_manual.hpp */; }; - 155C7DFE19A71C5A00F08B25 /* CCBProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCF21986526C00A46ACC /* CCBProxy.cpp */; }; - 155C7DFF19A71C5C00F08B25 /* CCBProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCF21986526C00A46ACC /* CCBProxy.cpp */; }; - 155C7E0019A71C6000F08B25 /* CCBProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCF31986526C00A46ACC /* CCBProxy.h */; }; - 155C7E0119A71C6300F08B25 /* CCBProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCF31986526C00A46ACC /* CCBProxy.h */; }; - 155C7E0219A71C6700F08B25 /* lua_cocos2dx_cocosbuilder_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCF41986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.cpp */; }; - 155C7E0319A71C6900F08B25 /* lua_cocos2dx_cocosbuilder_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCF41986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.cpp */; }; - 155C7E0419A71C6D00F08B25 /* lua_cocos2dx_cocosbuilder_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCF51986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.h */; }; - 155C7E0519A71C6F00F08B25 /* lua_cocos2dx_cocosbuilder_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCF51986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.h */; }; - 155C7E0619A71C7600F08B25 /* lua_cocos2dx_extension_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCFE1986526C00A46ACC /* lua_cocos2dx_extension_manual.cpp */; }; - 155C7E0719A71C7800F08B25 /* lua_cocos2dx_extension_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCFE1986526C00A46ACC /* lua_cocos2dx_extension_manual.cpp */; }; 155C7E0819A71C7B00F08B25 /* lua_cocos2dx_extension_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCFF1986526C00A46ACC /* lua_cocos2dx_extension_manual.h */; }; 155C7E0919A71C8500F08B25 /* lua_cocos2dx_extension_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCFF1986526C00A46ACC /* lua_cocos2dx_extension_manual.h */; }; 155C7E0A19A71C8B00F08B25 /* lua_cocos2dx_network_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15EFA694198B668C000C57D3 /* lua_cocos2dx_network_manual.cpp */; }; @@ -139,12 +119,8 @@ 155C7E1719A71CAF00F08B25 /* lua_xml_http_request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BD051986526C00A46ACC /* lua_xml_http_request.cpp */; }; 155C7E1819A71CB300F08B25 /* lua_xml_http_request.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BD061986526C00A46ACC /* lua_xml_http_request.h */; }; 155C7E1919A71CB500F08B25 /* lua_xml_http_request.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BD061986526C00A46ACC /* lua_xml_http_request.h */; }; - 155C7E1A19A71CBC00F08B25 /* lua_cocos2dx_spine_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BD151986526C00A46ACC /* lua_cocos2dx_spine_manual.cpp */; }; - 155C7E1B19A71CBE00F08B25 /* lua_cocos2dx_spine_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BD151986526C00A46ACC /* lua_cocos2dx_spine_manual.cpp */; }; 155C7E1C19A71CC200F08B25 /* lua_cocos2dx_spine_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BD161986526C00A46ACC /* lua_cocos2dx_spine_manual.hpp */; }; 155C7E1D19A71CC300F08B25 /* lua_cocos2dx_spine_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BD161986526C00A46ACC /* lua_cocos2dx_spine_manual.hpp */; }; - 155C7E1E19A71CC700F08B25 /* LuaSkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BD171986526C00A46ACC /* LuaSkeletonAnimation.cpp */; }; - 155C7E1F19A71CC800F08B25 /* LuaSkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BD171986526C00A46ACC /* LuaSkeletonAnimation.cpp */; }; 155C7E2019A71CCC00F08B25 /* LuaSkeletonAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BD181986526C00A46ACC /* LuaSkeletonAnimation.h */; }; 155C7E2119A71CCE00F08B25 /* LuaSkeletonAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BD181986526C00A46ACC /* LuaSkeletonAnimation.h */; }; 155C7E2219A71CD300F08B25 /* lua_cocos2dx_experimental_video_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1C24B1987473200A46ACC /* lua_cocos2dx_experimental_video_manual.cpp */; }; @@ -163,12 +139,8 @@ 159552411A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1595523E1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.cpp */; }; 159552421A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1595523F1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp */; }; 159552431A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1595523F1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp */; }; - 15A561E51B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */; }; - 15A561E61B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */; }; 15A561E71B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */; }; 15A561E81B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */; }; - 15A561EC1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */; }; - 15A561ED1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */; }; 15A561EE1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */; }; 15A561EF1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */; }; 15AC69D519876E9300D17520 /* lua_cocos2dx_physics_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75218BC45C200215002 /* lua_cocos2dx_physics_auto.cpp */; }; @@ -190,14 +162,12 @@ 15B575511A6F4D1500041C20 /* lua-cocos-studio-conversions.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B5754E1A6F4D1500041C20 /* lua-cocos-studio-conversions.h */; }; 15B575521A6F4D1500041C20 /* lua-cocos-studio-conversions.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B5754E1A6F4D1500041C20 /* lua-cocos-studio-conversions.h */; }; 15C1C2CD1987495500A46ACC /* lua_cocos2dx_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74918BC45C200215002 /* lua_cocos2dx_auto.cpp */; }; - 15C1C2CE1987498B00A46ACC /* LuaOpengl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1C24F198747E400A46ACC /* LuaOpengl.cpp */; }; 15C1C2CF1987498B00A46ACC /* lua_cocos2dx_deprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD31986525900A46ACC /* lua_cocos2dx_deprecated.cpp */; }; 15C1C2D01987498B00A46ACC /* lua_cocos2dx_experimental_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD51986525900A46ACC /* lua_cocos2dx_experimental_manual.cpp */; }; 15C1C2D11987498B00A46ACC /* lua_cocos2dx_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD71986525900A46ACC /* lua_cocos2dx_manual.cpp */; }; 15C1C2D21987498B00A46ACC /* lua_cocos2dx_physics_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD91986525900A46ACC /* lua_cocos2dx_physics_manual.cpp */; }; 15C1C2D31987498B00A46ACC /* LuaScriptHandlerMgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCDB1986525900A46ACC /* LuaScriptHandlerMgr.cpp */; }; 15C1C2D41987499F00A46ACC /* lua_cocos2dx_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE74A18BC45C200215002 /* lua_cocos2dx_auto.hpp */; }; - 15C1C2D5198749BC00A46ACC /* LuaOpengl.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1C250198747E400A46ACC /* LuaOpengl.h */; }; 15C1C2D6198749BC00A46ACC /* lua_cocos2dx_deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCD41986525900A46ACC /* lua_cocos2dx_deprecated.h */; }; 15C1C2D7198749BC00A46ACC /* lua_cocos2dx_experimental_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCD61986525900A46ACC /* lua_cocos2dx_experimental_manual.hpp */; }; 15C1C2D8198749BC00A46ACC /* lua_cocos2dx_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCD81986525900A46ACC /* lua_cocos2dx_manual.hpp */; }; @@ -225,22 +195,18 @@ 15C9A10F1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C9A10D1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.hpp */; }; 15C9A1121AE4973400C15443 /* lua_cocos2dx_experimental_webview_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C9A1101AE4973400C15443 /* lua_cocos2dx_experimental_webview_manual.cpp */; }; 15C9A1131AE4973400C15443 /* lua_cocos2dx_experimental_webview_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C9A1111AE4973400C15443 /* lua_cocos2dx_experimental_webview_manual.hpp */; }; - 15EFA1F61989E528000C57D3 /* lua_cocos2dx_experimental_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */; }; 15EFA1F71989E582000C57D3 /* lua_cocos2dx_experimental_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15622968197780DE009C9067 /* lua_cocos2dx_experimental_auto.hpp */; }; 15EFA5D9198B2DAA000C57D3 /* libluajit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1ABCA1F318CD8F540087CE3A /* libluajit.a */; }; - 15EFA617198B2E2B000C57D3 /* lua_cocos2dx_experimental_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */; }; 15EFA618198B2E2B000C57D3 /* lua_cocos2dx_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74918BC45C200215002 /* lua_cocos2dx_auto.cpp */; }; 15EFA619198B2E2B000C57D3 /* lua_cocos2dx_physics_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75218BC45C200215002 /* lua_cocos2dx_physics_auto.cpp */; }; 15EFA622198B2E74000C57D3 /* lua_cocos2dx_experimental_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15622968197780DE009C9067 /* lua_cocos2dx_experimental_auto.hpp */; }; 15EFA623198B2E74000C57D3 /* lua_cocos2dx_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE74A18BC45C200215002 /* lua_cocos2dx_auto.hpp */; }; 15EFA624198B2E74000C57D3 /* lua_cocos2dx_physics_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE75318BC45C200215002 /* lua_cocos2dx_physics_auto.hpp */; }; - 15EFA625198B31FB000C57D3 /* LuaOpengl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1C24F198747E400A46ACC /* LuaOpengl.cpp */; }; 15EFA626198B31FB000C57D3 /* lua_cocos2dx_deprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD31986525900A46ACC /* lua_cocos2dx_deprecated.cpp */; }; 15EFA627198B31FB000C57D3 /* lua_cocos2dx_experimental_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD51986525900A46ACC /* lua_cocos2dx_experimental_manual.cpp */; }; 15EFA628198B31FB000C57D3 /* lua_cocos2dx_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD71986525900A46ACC /* lua_cocos2dx_manual.cpp */; }; 15EFA629198B31FB000C57D3 /* lua_cocos2dx_physics_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD91986525900A46ACC /* lua_cocos2dx_physics_manual.cpp */; }; 15EFA62A198B31FB000C57D3 /* LuaScriptHandlerMgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCDB1986525900A46ACC /* LuaScriptHandlerMgr.cpp */; }; - 15EFA62B198B3220000C57D3 /* LuaOpengl.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1C250198747E400A46ACC /* LuaOpengl.h */; }; 15EFA62C198B3220000C57D3 /* lua_cocos2dx_deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCD41986525900A46ACC /* lua_cocos2dx_deprecated.h */; }; 15EFA62D198B3220000C57D3 /* lua_cocos2dx_experimental_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCD61986525900A46ACC /* lua_cocos2dx_experimental_manual.hpp */; }; 15EFA62E198B3220000C57D3 /* lua_cocos2dx_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCD81986525900A46ACC /* lua_cocos2dx_manual.hpp */; }; @@ -279,9 +245,46 @@ 3E2BDB0619C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3E2BDB0419C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.hpp */; }; 3E2BDB0A19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2BDB0819C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp */; }; 3E2BDB0B19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E2BDB0919C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h */; }; + 46624644222678D70008FC75 /* CCDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624633222678D70008FC75 /* CCDictionary.h */; }; + 46624645222678D70008FC75 /* CCDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624633222678D70008FC75 /* CCDictionary.h */; }; + 46624646222678D70008FC75 /* CCDouble.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624634222678D70008FC75 /* CCDouble.h */; }; + 46624647222678D70008FC75 /* CCDouble.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624634222678D70008FC75 /* CCDouble.h */; }; + 46624648222678D70008FC75 /* CCBool.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624635222678D70008FC75 /* CCBool.h */; }; + 46624649222678D70008FC75 /* CCBool.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624635222678D70008FC75 /* CCBool.h */; }; + 4662464A222678D70008FC75 /* CCSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46624637222678D70008FC75 /* CCSet.cpp */; }; + 4662464B222678D70008FC75 /* CCSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46624637222678D70008FC75 /* CCSet.cpp */; }; + 4662464C222678D70008FC75 /* CCDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624638222678D70008FC75 /* CCDeprecated.h */; }; + 4662464D222678D70008FC75 /* CCDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624638222678D70008FC75 /* CCDeprecated.h */; }; + 4662464E222678D70008FC75 /* CCNotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624639222678D70008FC75 /* CCNotificationCenter.h */; }; + 4662464F222678D70008FC75 /* CCNotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624639222678D70008FC75 /* CCNotificationCenter.h */; }; + 46624650222678D70008FC75 /* CCString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4662463A222678D70008FC75 /* CCString.cpp */; }; + 46624651222678D70008FC75 /* CCString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4662463A222678D70008FC75 /* CCString.cpp */; }; + 46624652222678D70008FC75 /* CCString.h in Headers */ = {isa = PBXBuildFile; fileRef = 4662463B222678D70008FC75 /* CCString.h */; }; + 46624653222678D70008FC75 /* CCString.h in Headers */ = {isa = PBXBuildFile; fileRef = 4662463B222678D70008FC75 /* CCString.h */; }; + 46624654222678D70008FC75 /* CCFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 4662463C222678D70008FC75 /* CCFloat.h */; }; + 46624655222678D70008FC75 /* CCFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 4662463C222678D70008FC75 /* CCFloat.h */; }; + 46624656222678D70008FC75 /* CCDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4662463D222678D70008FC75 /* CCDictionary.cpp */; }; + 46624657222678D70008FC75 /* CCDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4662463D222678D70008FC75 /* CCDictionary.cpp */; }; + 46624658222678D70008FC75 /* CCSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 4662463E222678D70008FC75 /* CCSet.h */; }; + 46624659222678D70008FC75 /* CCSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 4662463E222678D70008FC75 /* CCSet.h */; }; + 4662465A222678D70008FC75 /* CCDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4662463F222678D70008FC75 /* CCDeprecated.cpp */; }; + 4662465B222678D70008FC75 /* CCDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4662463F222678D70008FC75 /* CCDeprecated.cpp */; }; + 4662465C222678D70008FC75 /* CCNotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46624640222678D70008FC75 /* CCNotificationCenter.cpp */; }; + 4662465D222678D70008FC75 /* CCNotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46624640222678D70008FC75 /* CCNotificationCenter.cpp */; }; + 4662465E222678D70008FC75 /* CCInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624641222678D70008FC75 /* CCInteger.h */; }; + 4662465F222678D70008FC75 /* CCInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624641222678D70008FC75 /* CCInteger.h */; }; + 46624660222678D70008FC75 /* CCArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46624642222678D70008FC75 /* CCArray.cpp */; }; + 46624661222678D70008FC75 /* CCArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46624642222678D70008FC75 /* CCArray.cpp */; }; + 46624662222678D70008FC75 /* CCArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624643222678D70008FC75 /* CCArray.h */; }; + 46624663222678D70008FC75 /* CCArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624643222678D70008FC75 /* CCArray.h */; }; + 46624666222679D70008FC75 /* CCDataVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46624664222679D60008FC75 /* CCDataVisitor.cpp */; }; + 46624667222679D70008FC75 /* CCDataVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46624664222679D60008FC75 /* CCDataVisitor.cpp */; }; + 46624668222679D70008FC75 /* CCDataVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624665222679D60008FC75 /* CCDataVisitor.h */; }; + 46624669222679D70008FC75 /* CCDataVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 46624665222679D60008FC75 /* CCDataVisitor.h */; }; + 4662466C2227720E0008FC75 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4662466B2227720E0008FC75 /* lua_cocos2dx_cocosdenshion_auto.cpp */; }; + 4662466D2227720E0008FC75 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4662466B2227720E0008FC75 /* lua_cocos2dx_cocosdenshion_auto.cpp */; }; 507B42BD1C31FA0C0067B53E /* lua_module_register.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADD1C0D21C196B9500733781 /* lua_module_register.cpp */; }; 507B42BE1C31FA0C0067B53E /* select.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A9719A71A53004F1E71 /* select.c */; }; - 507B42BF1C31FA0C0067B53E /* lua_cocos2dx_physics3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */; }; 507B42C01C31FA0C0067B53E /* tolua_event.c in Sources */ = {isa = PBXBuildFile; fileRef = 1ABCA1F918CD8F6E0087CE3A /* tolua_event.c */; }; 507B42C11C31FA0C0067B53E /* lua_cocos2dx_audioengine_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2BDB0819C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp */; }; 507B42C21C31FA0C0067B53E /* auxiliar.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A8719A71A53004F1E71 /* auxiliar.c */; }; @@ -299,7 +302,6 @@ 507B42CE1C31FA0C0067B53E /* CCLuaStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE76418BC45C200215002 /* CCLuaStack.cpp */; }; 507B42CF1C31FA0C0067B53E /* CCLuaValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE76618BC45C200215002 /* CCLuaValue.cpp */; }; 507B42D01C31FA0C0067B53E /* Cocos2dxLuaLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE76818BC45C200215002 /* Cocos2dxLuaLoader.cpp */; }; - 507B42D11C31FA0C0067B53E /* lua_cocos2dx_cocosbuilder_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCC019864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.cpp */; }; 507B42D21C31FA0C0067B53E /* lua_cocos2dx_navmesh_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 150983DB1B1C4860007F3818 /* lua_cocos2dx_navmesh_conversions.cpp */; }; 507B42D31C31FA0C0067B53E /* LuaBasicConversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE77E18BC45C200215002 /* LuaBasicConversions.cpp */; }; 507B42D41C31FA0C0067B53E /* CCLuaObjcBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE78F18BC45C200215002 /* CCLuaObjcBridge.mm */; }; @@ -308,29 +310,19 @@ 507B42D71C31FA0C0067B53E /* timeout.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A9D19A71A53004F1E71 /* timeout.c */; }; 507B42D81C31FA0C0067B53E /* luasocket_scripts.c in Sources */ = {isa = PBXBuildFile; fileRef = F4FE0D5519ECD00100B8B12B /* luasocket_scripts.c */; }; 507B42D91C31FA0C0067B53E /* tolua_fix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A262AB718BEEF5900D2DB92 /* tolua_fix.cpp */; }; - 507B42DA1C31FA0C0067B53E /* lua_cocos2dx_physics3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */; }; - 507B42DB1C31FA0C0067B53E /* CCBProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCF21986526C00A46ACC /* CCBProxy.cpp */; }; 507B42DC1C31FA0C0067B53E /* lua_cocos2dx_csloader_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 159552381A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.cpp */; }; 507B42DD1C31FA0C0067B53E /* lua_cocos2dx_experimental_webview_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C9A1101AE4973400C15443 /* lua_cocos2dx_experimental_webview_manual.cpp */; }; - 507B42DE1C31FA0C0067B53E /* lua_cocos2dx_spine_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75518BC45C200215002 /* lua_cocos2dx_spine_auto.cpp */; }; - 507B42DF1C31FA0C0067B53E /* lua_cocos2dx_extension_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCFE1986526C00A46ACC /* lua_cocos2dx_extension_manual.cpp */; }; - 507B42E01C31FA0C0067B53E /* LuaOpengl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1C24F198747E400A46ACC /* LuaOpengl.cpp */; }; 507B42E11C31FA0C0067B53E /* lua_cocos2dx_deprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD31986525900A46ACC /* lua_cocos2dx_deprecated.cpp */; }; 507B42E21C31FA0C0067B53E /* lua_cocos2dx_experimental_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD51986525900A46ACC /* lua_cocos2dx_experimental_manual.cpp */; }; - 507B42E31C31FA0C0067B53E /* lua_cocos2dx_cocosbuilder_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCF41986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.cpp */; }; 507B42E41C31FA0C0067B53E /* mime.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A9319A71A53004F1E71 /* mime.c */; }; 507B42E51C31FA0C0067B53E /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415AA119A71A53004F1E71 /* unix.c */; }; - 507B42E61C31FA0C0067B53E /* lua_cocos2dx_3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 158C128519A0FA1300781A76 /* lua_cocos2dx_3d_manual.cpp */; }; 507B42E71C31FA0C0067B53E /* usocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415AA319A71A53004F1E71 /* usocket.c */; }; - 507B42E81C31FA0C0067B53E /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCC219864D8700A46ACC /* lua_cocos2dx_cocosdenshion_auto.cpp */; }; 507B42E91C31FA0C0067B53E /* lua_cocos2dx_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD71986525900A46ACC /* lua_cocos2dx_manual.cpp */; }; 507B42EA1C31FA0C0067B53E /* lua_extensions.c in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BD011986526C00A46ACC /* lua_extensions.c */; }; 507B42EB1C31FA0C0067B53E /* CCComponentLua.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA0CBB5C1BB0756F00003364 /* CCComponentLua.cpp */; }; 507B42EC1C31FA0C0067B53E /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A9F19A71A53004F1E71 /* udp.c */; }; 507B42ED1C31FA0C0067B53E /* luasocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A9119A71A53004F1E71 /* luasocket.c */; }; - 507B42EE1C31FA0C0067B53E /* LuaSkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BD171986526C00A46ACC /* LuaSkeletonAnimation.cpp */; }; 507B42EF1C31FA0C0067B53E /* serial.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A9919A71A53004F1E71 /* serial.c */; }; - 507B42F01C31FA0C0067B53E /* lua_cocos2dx_3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1516227F19A0F3E3006099B8 /* lua_cocos2dx_3d_auto.cpp */; }; 507B42F11C31FA0C0067B53E /* CustomGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 566F015D19B5EB0F00FCA620 /* CustomGUIReader.cpp */; }; 507B42F21C31FA0C0067B53E /* lua_cocos2dx_studio_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75818BC45C200215002 /* lua_cocos2dx_studio_auto.cpp */; }; 507B42F31C31FA0C0067B53E /* lua_cocos2dx_audioengine_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2BDB0319C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.cpp */; }; @@ -345,11 +337,9 @@ 507B42FC1C31FA0C0067B53E /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A8F19A71A53004F1E71 /* io.c */; }; 507B42FD1C31FA0C0067B53E /* lua_cocos2dx_cocosdenshion_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15427D42198F73F700DC375D /* lua_cocos2dx_cocosdenshion_manual.cpp */; }; 507B42FE1C31FA0C0067B53E /* lua_cocos2dx_ui_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */; }; - 507B42FF1C31FA0C0067B53E /* lua_cocos2dx_spine_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BD151986526C00A46ACC /* lua_cocos2dx_spine_manual.cpp */; }; 507B43001C31FA0C0067B53E /* lua_cocos2dx_extension_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74C18BC45C200215002 /* lua_cocos2dx_extension_auto.cpp */; }; 507B43011C31FA0C0067B53E /* lua_cocos2dx_physics_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCD91986525900A46ACC /* lua_cocos2dx_physics_manual.cpp */; }; 507B43021C31FA0C0067B53E /* LuaScriptHandlerMgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C1BCDB1986525900A46ACC /* LuaScriptHandlerMgr.cpp */; }; - 507B43031C31FA0C0067B53E /* lua_cocos2dx_experimental_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */; }; 507B43041C31FA0C0067B53E /* lua_cocos2dx_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74918BC45C200215002 /* lua_cocos2dx_auto.cpp */; }; 507B43051C31FA0C0067B53E /* lua_cocos2dx_physics_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75218BC45C200215002 /* lua_cocos2dx_physics_auto.cpp */; }; 507B43061C31FA0C0067B53E /* inet.c in Sources */ = {isa = PBXBuildFile; fileRef = 15415A8D19A71A53004F1E71 /* inet.c */; }; @@ -380,7 +370,6 @@ 507B43211C31FA0C0067B53E /* lua_cocos2dx_cocosdenshion_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15427D43198F73F700DC375D /* lua_cocos2dx_cocosdenshion_manual.h */; }; 507B43221C31FA0C0067B53E /* except.h in Headers */ = {isa = PBXBuildFile; fileRef = 15415A8C19A71A53004F1E71 /* except.h */; }; 507B43231C31FA0C0067B53E /* lua_cocos2dx_audioengine_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E2BDB0919C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h */; }; - 507B43241C31FA0C0067B53E /* lua_cocos2dx_cocosbuilder_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCF51986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.h */; }; 507B43251C31FA0C0067B53E /* socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 15415A9A19A71A53004F1E71 /* socket.h */; }; 507B43261C31FA0C0067B53E /* usocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 15415AA419A71A53004F1E71 /* usocket.h */; }; 507B43271C31FA0C0067B53E /* options.h in Headers */ = {isa = PBXBuildFile; fileRef = 15415A9619A71A53004F1E71 /* options.h */; }; @@ -401,7 +390,6 @@ 507B43361C31FA0C0067B53E /* lua_cocos2dx_csloader_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 159552391A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.hpp */; }; 507B43371C31FA0C0067B53E /* io.h in Headers */ = {isa = PBXBuildFile; fileRef = 15415A9019A71A53004F1E71 /* io.h */; }; 507B43381C31FA0C0067B53E /* CustomGUIReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 566F015E19B5EB0F00FCA620 /* CustomGUIReader.h */; }; - 507B43391C31FA0C0067B53E /* LuaOpengl.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1C250198747E400A46ACC /* LuaOpengl.h */; }; 507B433A1C31FA0C0067B53E /* timeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 15415A9E19A71A53004F1E71 /* timeout.h */; }; 507B433B1C31FA0C0067B53E /* lua_cocos2dx_deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCD41986525900A46ACC /* lua_cocos2dx_deprecated.h */; }; 507B433C1C31FA0C0067B53E /* lua_cocos2dx_ui_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BD1B1986526C00A46ACC /* lua_cocos2dx_ui_manual.hpp */; }; @@ -417,7 +405,6 @@ 507B43461C31FA0C0067B53E /* LuaScriptHandlerMgr.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCDC1986525900A46ACC /* LuaScriptHandlerMgr.h */; }; 507B43471C31FA0C0067B53E /* lua_cocos2dx_experimental_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15622968197780DE009C9067 /* lua_cocos2dx_experimental_auto.hpp */; }; 507B43481C31FA0C0067B53E /* lua_cocos2dx_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE74A18BC45C200215002 /* lua_cocos2dx_auto.hpp */; }; - 507B43491C31FA0C0067B53E /* CCBProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BCF31986526C00A46ACC /* CCBProxy.h */; }; 507B434A1C31FA0C0067B53E /* lua_cocos2dx_physics3d_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */; }; 507B434B1C31FA0C0067B53E /* select.h in Headers */ = {isa = PBXBuildFile; fileRef = 15415A9819A71A53004F1E71 /* select.h */; }; 507B434C1C31FA0C0067B53E /* lua_cocos2dx_spine_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15C1BD161986526C00A46ACC /* lua_cocos2dx_spine_manual.hpp */; }; @@ -507,9 +494,6 @@ 15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lua_cocos2dx_physics3d_manual.h; path = physics3d/lua_cocos2dx_physics3d_manual.h; sourceTree = ""; }; 15B5754D1A6F4D1500041C20 /* lua-cocos-studio-conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "lua-cocos-studio-conversions.cpp"; sourceTree = ""; }; 15B5754E1A6F4D1500041C20 /* lua-cocos-studio-conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "lua-cocos-studio-conversions.h"; sourceTree = ""; }; - 15C1BCC019864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosbuilder_auto.cpp; sourceTree = ""; }; - 15C1BCC119864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_cocosbuilder_auto.hpp; sourceTree = ""; }; - 15C1BCC219864D8700A46ACC /* lua_cocos2dx_cocosdenshion_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosdenshion_auto.cpp; sourceTree = ""; }; 15C1BCC319864D8700A46ACC /* lua_cocos2dx_cocosdenshion_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_cocosdenshion_auto.hpp; sourceTree = ""; }; 15C1BCD31986525900A46ACC /* lua_cocos2dx_deprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_deprecated.cpp; sourceTree = ""; }; 15C1BCD41986525900A46ACC /* lua_cocos2dx_deprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_deprecated.h; sourceTree = ""; }; @@ -521,10 +505,6 @@ 15C1BCDA1986525900A46ACC /* lua_cocos2dx_physics_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_physics_manual.hpp; sourceTree = ""; }; 15C1BCDB1986525900A46ACC /* LuaScriptHandlerMgr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LuaScriptHandlerMgr.cpp; sourceTree = ""; }; 15C1BCDC1986525900A46ACC /* LuaScriptHandlerMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LuaScriptHandlerMgr.h; sourceTree = ""; }; - 15C1BCF21986526C00A46ACC /* CCBProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBProxy.cpp; sourceTree = ""; }; - 15C1BCF31986526C00A46ACC /* CCBProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBProxy.h; sourceTree = ""; }; - 15C1BCF41986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosbuilder_manual.cpp; sourceTree = ""; }; - 15C1BCF51986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_cocosbuilder_manual.h; sourceTree = ""; }; 15C1BCFE1986526C00A46ACC /* lua_cocos2dx_extension_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_extension_manual.cpp; sourceTree = ""; }; 15C1BCFF1986526C00A46ACC /* lua_cocos2dx_extension_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_extension_manual.h; sourceTree = ""; }; 15C1BD011986526C00A46ACC /* lua_extensions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lua_extensions.c; sourceTree = ""; }; @@ -541,8 +521,6 @@ 15C1BD1B1986526C00A46ACC /* lua_cocos2dx_ui_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_ui_manual.hpp; sourceTree = ""; }; 15C1C24B1987473200A46ACC /* lua_cocos2dx_experimental_video_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_experimental_video_manual.cpp; sourceTree = ""; }; 15C1C24C1987473200A46ACC /* lua_cocos2dx_experimental_video_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_experimental_video_manual.hpp; sourceTree = ""; }; - 15C1C24F198747E400A46ACC /* LuaOpengl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LuaOpengl.cpp; sourceTree = ""; }; - 15C1C250198747E400A46ACC /* LuaOpengl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LuaOpengl.h; sourceTree = ""; }; 15C1C2CC198748D200A46ACC /* libluacocos2d Mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libluacocos2d Mac.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 15C9A10C1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_experimental_webview_auto.cpp; sourceTree = ""; }; 15C9A10D1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_experimental_webview_auto.hpp; sourceTree = ""; }; @@ -598,6 +576,26 @@ 3E2BDB0419C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_audioengine_auto.hpp; sourceTree = ""; }; 3E2BDB0819C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_audioengine_manual.cpp; sourceTree = ""; }; 3E2BDB0919C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_audioengine_manual.h; sourceTree = ""; }; + 46624633222678D70008FC75 /* CCDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDictionary.h; sourceTree = ""; }; + 46624634222678D70008FC75 /* CCDouble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDouble.h; sourceTree = ""; }; + 46624635222678D70008FC75 /* CCBool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBool.h; sourceTree = ""; }; + 46624636222678D70008FC75 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; + 46624637222678D70008FC75 /* CCSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSet.cpp; sourceTree = ""; }; + 46624638222678D70008FC75 /* CCDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDeprecated.h; sourceTree = ""; }; + 46624639222678D70008FC75 /* CCNotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNotificationCenter.h; sourceTree = ""; }; + 4662463A222678D70008FC75 /* CCString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCString.cpp; sourceTree = ""; }; + 4662463B222678D70008FC75 /* CCString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCString.h; sourceTree = ""; }; + 4662463C222678D70008FC75 /* CCFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFloat.h; sourceTree = ""; }; + 4662463D222678D70008FC75 /* CCDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDictionary.cpp; sourceTree = ""; }; + 4662463E222678D70008FC75 /* CCSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSet.h; sourceTree = ""; }; + 4662463F222678D70008FC75 /* CCDeprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDeprecated.cpp; sourceTree = ""; }; + 46624640222678D70008FC75 /* CCNotificationCenter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNotificationCenter.cpp; sourceTree = ""; }; + 46624641222678D70008FC75 /* CCInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCInteger.h; sourceTree = ""; }; + 46624642222678D70008FC75 /* CCArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArray.cpp; sourceTree = ""; }; + 46624643222678D70008FC75 /* CCArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArray.h; sourceTree = ""; }; + 46624664222679D60008FC75 /* CCDataVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDataVisitor.cpp; sourceTree = ""; }; + 46624665222679D60008FC75 /* CCDataVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDataVisitor.h; sourceTree = ""; }; + 4662466B2227720E0008FC75 /* lua_cocos2dx_cocosdenshion_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosdenshion_auto.cpp; sourceTree = ""; }; 507B43531C31FA0C0067B53E /* libluacocos2d tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libluacocos2d tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 566F015D19B5EB0F00FCA620 /* CustomGUIReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomGUIReader.cpp; sourceTree = ""; }; 566F015E19B5EB0F00FCA620 /* CustomGUIReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomGUIReader.h; sourceTree = ""; }; @@ -675,6 +673,7 @@ isa = PBXGroup; children = ( C0D9BAFA1974D30000EC35BB /* liblua.a */, + 46624632222678D70008FC75 /* deprecated */, 1ABCA1E218CD8F230087CE3A /* external */, 1AACE74818BC45C200215002 /* auto */, 1AACE75B18BC45C200215002 /* manual */, @@ -705,8 +704,6 @@ 15C1BCD21986525900A46ACC /* cocos2d */ = { isa = PBXGroup; children = ( - 15C1C24F198747E400A46ACC /* LuaOpengl.cpp */, - 15C1C250198747E400A46ACC /* LuaOpengl.h */, 15C1BCD31986525900A46ACC /* lua_cocos2dx_deprecated.cpp */, 15C1BCD41986525900A46ACC /* lua_cocos2dx_deprecated.h */, 15C1BCD51986525900A46ACC /* lua_cocos2dx_experimental_manual.cpp */, @@ -721,17 +718,6 @@ path = cocos2d; sourceTree = ""; }; - 15C1BCF11986526C00A46ACC /* cocosbuilder */ = { - isa = PBXGroup; - children = ( - 15C1BCF21986526C00A46ACC /* CCBProxy.cpp */, - 15C1BCF31986526C00A46ACC /* CCBProxy.h */, - 15C1BCF41986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.cpp */, - 15C1BCF51986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.h */, - ); - path = cocosbuilder; - sourceTree = ""; - }; 15C1BCFD1986526C00A46ACC /* extension */ = { isa = PBXGroup; children = ( @@ -812,10 +798,8 @@ 3E2BDB0419C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.hpp */, 1516227F19A0F3E3006099B8 /* lua_cocos2dx_3d_auto.cpp */, 1516228019A0F3E3006099B8 /* lua_cocos2dx_3d_auto.hpp */, - 15C1BCC019864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.cpp */, - 15C1BCC119864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.hpp */, - 15C1BCC219864D8700A46ACC /* lua_cocos2dx_cocosdenshion_auto.cpp */, 15C1BCC319864D8700A46ACC /* lua_cocos2dx_cocosdenshion_auto.hpp */, + 4662466B2227720E0008FC75 /* lua_cocos2dx_cocosdenshion_auto.cpp */, 156EADF11977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.cpp */, 156EADF21977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.hpp */, 15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */, @@ -846,7 +830,6 @@ 158C128419A0FA1300781A76 /* 3d */, 15427D41198F73F700DC375D /* cocosdenshion */, 15EFA400198B2AB2000C57D3 /* cocostudio */, - 15C1BCF11986526C00A46ACC /* cocosbuilder */, 15C1BCFD1986526C00A46ACC /* extension */, 15C1BD001986526C00A46ACC /* network */, 15C1BD141986526C00A46ACC /* spine */, @@ -1008,6 +991,33 @@ path = audioengine; sourceTree = ""; }; + 46624632222678D70008FC75 /* deprecated */ = { + isa = PBXGroup; + children = ( + 46624633222678D70008FC75 /* CCDictionary.h */, + 46624634222678D70008FC75 /* CCDouble.h */, + 46624664222679D60008FC75 /* CCDataVisitor.cpp */, + 46624665222679D60008FC75 /* CCDataVisitor.h */, + 46624635222678D70008FC75 /* CCBool.h */, + 46624636222678D70008FC75 /* CMakeLists.txt */, + 46624637222678D70008FC75 /* CCSet.cpp */, + 46624638222678D70008FC75 /* CCDeprecated.h */, + 46624639222678D70008FC75 /* CCNotificationCenter.h */, + 4662463A222678D70008FC75 /* CCString.cpp */, + 4662463B222678D70008FC75 /* CCString.h */, + 4662463C222678D70008FC75 /* CCFloat.h */, + 4662463D222678D70008FC75 /* CCDictionary.cpp */, + 4662463E222678D70008FC75 /* CCSet.h */, + 4662463F222678D70008FC75 /* CCDeprecated.cpp */, + 46624640222678D70008FC75 /* CCNotificationCenter.cpp */, + 46624641222678D70008FC75 /* CCInteger.h */, + 46624642222678D70008FC75 /* CCArray.cpp */, + 46624643222678D70008FC75 /* CCArray.h */, + ); + name = deprecated; + path = ../../deprecated; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -1015,7 +1025,9 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 46624668222679D70008FC75 /* CCDataVisitor.h in Headers */, 15EFA1F71989E582000C57D3 /* lua_cocos2dx_experimental_auto.hpp in Headers */, + 46624646222678D70008FC75 /* CCDouble.h in Headers */, 15415AA719A71A53004F1E71 /* auxiliar.h in Headers */, 155C7E1019A71C9D00F08B25 /* lua_extensions.h in Headers */, 15A561E71B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */, @@ -1025,27 +1037,33 @@ 15AC69E31987712500D17520 /* tolua++.h in Headers */, 15415ADB19A71A53004F1E71 /* unix.h in Headers */, 155C7DF419A71C3700F08B25 /* lua_cocos2dx_3d_manual.h in Headers */, + 4662464C222678D70008FC75 /* CCDeprecated.h in Headers */, 15415ABB19A71A53004F1E71 /* luasocket.h in Headers */, + 46624652222678D70008FC75 /* CCString.h in Headers */, 159552421A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp in Headers */, 155C7E2419A71CD800F08B25 /* lua_cocos2dx_experimental_video_manual.hpp in Headers */, 15415ACF19A71A53004F1E71 /* tcp.h in Headers */, 15415AAB19A71A53004F1E71 /* buffer.h in Headers */, + 46624654222678D70008FC75 /* CCFloat.h in Headers */, 15AC69DE1987711400D17520 /* lauxlib.h in Headers */, + 46624648222678D70008FC75 /* CCBool.h in Headers */, 155C7E1419A71CA800F08B25 /* Lua_web_socket.h in Headers */, ADD1C0D61C196B9500733781 /* lua_module_register.h in Headers */, 15AC69DF1987711400D17520 /* lua.h in Headers */, + 46624662222678D70008FC75 /* CCArray.h in Headers */, + 46624644222678D70008FC75 /* CCDictionary.h in Headers */, 15AC69E01987711400D17520 /* luaconf.h in Headers */, 155C7DF819A71C4400F08B25 /* lua_cocos2dx_cocosdenshion_manual.h in Headers */, 15415AAF19A71A53004F1E71 /* except.h in Headers */, 150906F319D556D1002C4D97 /* lua_cocos2dx_audioengine_manual.h in Headers */, ED1AA90B215DF5F3004ABA9F /* lua_downloader.h in Headers */, - 155C7E0419A71C6D00F08B25 /* lua_cocos2dx_cocosbuilder_manual.h in Headers */, 15415ACB19A71A53004F1E71 /* socket.h in Headers */, 15415ADF19A71A53004F1E71 /* usocket.h in Headers */, 15415AC319A71A53004F1E71 /* options.h in Headers */, 15AC69E11987711400D17520 /* lualib.h in Headers */, 15C1C2E719874CBE00A46ACC /* CCLuaBridge.h in Headers */, 15C1C2E819874CBE00A46ACC /* CCLuaEngine.h in Headers */, + 4662464E222678D70008FC75 /* CCNotificationCenter.h in Headers */, 15C1C2E919874CBE00A46ACC /* CCLuaStack.h in Headers */, 15B575511A6F4D1500041C20 /* lua-cocos-studio-conversions.h in Headers */, 15C1C2EA19874CBE00A46ACC /* CCLuaValue.h in Headers */, @@ -1059,15 +1077,16 @@ 150983D91B1C3F3E007F3818 /* lua_cocos2dx_navmesh_manual.h in Headers */, 1595523C1A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.hpp in Headers */, 15415AB719A71A53004F1E71 /* io.h in Headers */, + 46624658222678D70008FC75 /* CCSet.h in Headers */, 150983DF1B1C4860007F3818 /* lua_cocos2dx_navmesh_conversions.h in Headers */, 566F016119B5EB0F00FCA620 /* CustomGUIReader.h in Headers */, 15C1C2DC19874B4400A46ACC /* xxtea.h in Headers */, 15415AD319A71A53004F1E71 /* timeout.h in Headers */, - 15C1C2D5198749BC00A46ACC /* LuaOpengl.h in Headers */, 15A561EE1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */, ADD1C0D71C196B9500733781 /* Lua-BindingsExport.h in Headers */, 155C7E2819A71CE600F08B25 /* lua_cocos2dx_ui_manual.hpp in Headers */, 15C1C2D6198749BC00A46ACC /* lua_cocos2dx_deprecated.h in Headers */, + 4662465E222678D70008FC75 /* CCInteger.h in Headers */, 15C1C2D7198749BC00A46ACC /* lua_cocos2dx_experimental_manual.hpp in Headers */, 15C1C2D8198749BC00A46ACC /* lua_cocos2dx_manual.hpp in Headers */, 155C7E0819A71C7B00F08B25 /* lua_cocos2dx_extension_manual.h in Headers */, @@ -1077,7 +1096,6 @@ 15C1C2D9198749BC00A46ACC /* lua_cocos2dx_physics_manual.hpp in Headers */, 15C1C2DA198749BC00A46ACC /* LuaScriptHandlerMgr.h in Headers */, 15AC69D619876EA200D17520 /* lua_cocos2dx_physics_auto.hpp in Headers */, - 155C7E0019A71C6000F08B25 /* CCBProxy.h in Headers */, 15415AC719A71A53004F1E71 /* select.h in Headers */, 155C7E1C19A71CC200F08B25 /* lua_cocos2dx_spine_manual.hpp in Headers */, BA0CBB601BB0756F00003364 /* CCComponentLua.h in Headers */, @@ -1091,7 +1109,9 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 46624669222679D70008FC75 /* CCDataVisitor.h in Headers */, 150983E01B1C4860007F3818 /* lua_cocos2dx_navmesh_conversions.h in Headers */, + 46624647222678D70008FC75 /* CCDouble.h in Headers */, 15EFA64D198B3342000C57D3 /* lauxlib.h in Headers */, 15415AA819A71A53004F1E71 /* auxiliar.h in Headers */, 155C7E1119A71C9F00F08B25 /* lua_extensions.h in Headers */, @@ -1101,27 +1121,33 @@ 15EFA64F198B3342000C57D3 /* luaconf.h in Headers */, 15415ADC19A71A53004F1E71 /* unix.h in Headers */, 155C7DF519A71C3900F08B25 /* lua_cocos2dx_3d_manual.h in Headers */, + 4662464D222678D70008FC75 /* CCDeprecated.h in Headers */, 15415ABC19A71A53004F1E71 /* luasocket.h in Headers */, + 46624653222678D70008FC75 /* CCString.h in Headers */, 159552431A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp in Headers */, 155C7E2519A71CDA00F08B25 /* lua_cocos2dx_experimental_video_manual.hpp in Headers */, 15415AD019A71A53004F1E71 /* tcp.h in Headers */, BA0CBB611BB0756F00003364 /* CCComponentLua.h in Headers */, + 46624655222678D70008FC75 /* CCFloat.h in Headers */, 15415AAC19A71A53004F1E71 /* buffer.h in Headers */, + 46624649222678D70008FC75 /* CCBool.h in Headers */, 15EFA650198B3342000C57D3 /* lualib.h in Headers */, 155C7E1519A71CAA00F08B25 /* Lua_web_socket.h in Headers */, 15EFA64B198B3320000C57D3 /* tolua_event.h in Headers */, + 46624663222678D70008FC75 /* CCArray.h in Headers */, + 46624645222678D70008FC75 /* CCDictionary.h in Headers */, 15A561EF1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */, 15EFA64C198B3320000C57D3 /* tolua++.h in Headers */, 155C7DF919A71C4500F08B25 /* lua_cocos2dx_cocosdenshion_manual.h in Headers */, 15415AB019A71A53004F1E71 /* except.h in Headers */, ED1AA90C215DF5F3004ABA9F /* lua_downloader.h in Headers */, 3E2BDB0B19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h in Headers */, - 155C7E0519A71C6F00F08B25 /* lua_cocos2dx_cocosbuilder_manual.h in Headers */, 15415ACC19A71A53004F1E71 /* socket.h in Headers */, 15415AE019A71A53004F1E71 /* usocket.h in Headers */, 15415AC419A71A53004F1E71 /* options.h in Headers */, 15EFA644198B32D5000C57D3 /* xxtea.h in Headers */, 15EFA63B198B32BB000C57D3 /* CCLuaBridge.h in Headers */, + 4662464F222678D70008FC75 /* CCNotificationCenter.h in Headers */, 15EFA63C198B32BB000C57D3 /* CCLuaEngine.h in Headers */, 15EFA63D198B32BB000C57D3 /* CCLuaStack.h in Headers */, 15B575521A6F4D1500041C20 /* lua-cocos-studio-conversions.h in Headers */, @@ -1135,15 +1161,16 @@ 15EFA642198B32BB000C57D3 /* tolua_fix.h in Headers */, 155C7E2119A71CCE00F08B25 /* LuaSkeletonAnimation.h in Headers */, 1595523D1A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.hpp in Headers */, + 46624659222678D70008FC75 /* CCSet.h in Headers */, 15415AB819A71A53004F1E71 /* io.h in Headers */, 566F016219B5EB0F00FCA620 /* CustomGUIReader.h in Headers */, - 15EFA62B198B3220000C57D3 /* LuaOpengl.h in Headers */, 15415AD419A71A53004F1E71 /* timeout.h in Headers */, 15EFA62C198B3220000C57D3 /* lua_cocos2dx_deprecated.h in Headers */, 155C7E2919A71CE800F08B25 /* lua_cocos2dx_ui_manual.hpp in Headers */, 15EFA62D198B3220000C57D3 /* lua_cocos2dx_experimental_manual.hpp in Headers */, 15C9A1131AE4973400C15443 /* lua_cocos2dx_experimental_webview_manual.hpp in Headers */, 15EFA62E198B3220000C57D3 /* lua_cocos2dx_manual.hpp in Headers */, + 4662465F222678D70008FC75 /* CCInteger.h in Headers */, 15C9A10F1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.hpp in Headers */, 150983DA1B1C3F3E007F3818 /* lua_cocos2dx_navmesh_manual.h in Headers */, 15EFA62F198B3220000C57D3 /* lua_cocos2dx_physics_manual.hpp in Headers */, @@ -1153,7 +1180,6 @@ 15EFA630198B3220000C57D3 /* LuaScriptHandlerMgr.h in Headers */, 15EFA622198B2E74000C57D3 /* lua_cocos2dx_experimental_auto.hpp in Headers */, 15EFA623198B2E74000C57D3 /* lua_cocos2dx_auto.hpp in Headers */, - 155C7E0119A71C6300F08B25 /* CCBProxy.h in Headers */, 15A561E81B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */, 15415AC819A71A53004F1E71 /* select.h in Headers */, 155C7E1D19A71CC300F08B25 /* lua_cocos2dx_spine_manual.hpp in Headers */, @@ -1192,7 +1218,6 @@ 507B43221C31FA0C0067B53E /* except.h in Headers */, ED1AA90D215DF5F3004ABA9F /* lua_downloader.h in Headers */, 507B43231C31FA0C0067B53E /* lua_cocos2dx_audioengine_manual.h in Headers */, - 507B43241C31FA0C0067B53E /* lua_cocos2dx_cocosbuilder_manual.h in Headers */, 507B43251C31FA0C0067B53E /* socket.h in Headers */, 507B43261C31FA0C0067B53E /* usocket.h in Headers */, 507B43271C31FA0C0067B53E /* options.h in Headers */, @@ -1213,7 +1238,6 @@ 507B43361C31FA0C0067B53E /* lua_cocos2dx_csloader_auto.hpp in Headers */, 507B43371C31FA0C0067B53E /* io.h in Headers */, 507B43381C31FA0C0067B53E /* CustomGUIReader.h in Headers */, - 507B43391C31FA0C0067B53E /* LuaOpengl.h in Headers */, 507B433A1C31FA0C0067B53E /* timeout.h in Headers */, 507B433B1C31FA0C0067B53E /* lua_cocos2dx_deprecated.h in Headers */, 507B433C1C31FA0C0067B53E /* lua_cocos2dx_ui_manual.hpp in Headers */, @@ -1229,7 +1253,6 @@ 507B43461C31FA0C0067B53E /* LuaScriptHandlerMgr.h in Headers */, 507B43471C31FA0C0067B53E /* lua_cocos2dx_experimental_auto.hpp in Headers */, 507B43481C31FA0C0067B53E /* lua_cocos2dx_auto.hpp in Headers */, - 507B43491C31FA0C0067B53E /* CCBProxy.h in Headers */, 507B434A1C31FA0C0067B53E /* lua_cocos2dx_physics3d_auto.hpp in Headers */, 507B434B1C31FA0C0067B53E /* select.h in Headers */, 507B434C1C31FA0C0067B53E /* lua_cocos2dx_spine_manual.hpp in Headers */, @@ -1326,17 +1349,17 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 15415A7219A718FB004F1E71 /* lua_cocos2dx_3d_auto.cpp in Sources */, - 15415A7319A718FB004F1E71 /* lua_cocos2dx_cocosbuilder_auto.cpp in Sources */, + 4662464A222678D70008FC75 /* CCSet.cpp in Sources */, + 46624660222678D70008FC75 /* CCArray.cpp in Sources */, + 4662465C222678D70008FC75 /* CCNotificationCenter.cpp in Sources */, 150906F219D556CE002C4D97 /* lua_cocos2dx_audioengine_manual.cpp in Sources */, 15415A7519A718FB004F1E71 /* lua_cocos2dx_experimental_video_auto.cpp in Sources */, 150983DD1B1C4860007F3818 /* lua_cocos2dx_navmesh_conversions.cpp in Sources */, 15B5754F1A6F4D1500041C20 /* lua-cocos-studio-conversions.cpp in Sources */, 15415A7619A718FB004F1E71 /* lua_cocos2dx_ui_auto.cpp in Sources */, - 15415A7719A718FB004F1E71 /* lua_cocos2dx_spine_auto.cpp in Sources */, - 15A561E51B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */, + 4662465A222678D70008FC75 /* CCDeprecated.cpp in Sources */, + 46624666222679D70008FC75 /* CCDataVisitor.cpp in Sources */, 15415A7819A718FB004F1E71 /* lua_cocos2dx_studio_auto.cpp in Sources */, - 155C7DEC19A71BF200F08B25 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */, 15AC69D91987710400D17520 /* tolua_event.c in Sources */, 15AC69DA1987710400D17520 /* tolua_is.c in Sources */, 15415ACD19A71A53004F1E71 /* tcp.c in Sources */, @@ -1355,28 +1378,22 @@ 15C1C2E419874C7C00A46ACC /* tolua_fix.cpp in Sources */, 15C1C2E219874BA100A46ACC /* LuaBasicConversions.cpp in Sources */, F4FE0D5719ECD00100B8B12B /* luasocket_scripts.c in Sources */, + 4662466C2227720E0008FC75 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */, 15415AC519A71A53004F1E71 /* select.c in Sources */, - 155C7DFE19A71C5A00F08B25 /* CCBProxy.cpp in Sources */, 1595523A1A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.cpp in Sources */, 15415AD919A71A53004F1E71 /* unix.c in Sources */, - 155C7E0619A71C7600F08B25 /* lua_cocos2dx_extension_manual.cpp in Sources */, 15C1C2DD19874B8800A46ACC /* CCLuaBridge.cpp in Sources */, 15C1C2DE19874B8800A46ACC /* CCLuaEngine.cpp in Sources */, 15415AC919A71A53004F1E71 /* serial.c in Sources */, BA0CBB5E1BB0756F00003364 /* CCComponentLua.cpp in Sources */, - 155C7E0219A71C6700F08B25 /* lua_cocos2dx_cocosbuilder_manual.cpp in Sources */, 15C1C2DF19874B8800A46ACC /* CCLuaStack.cpp in Sources */, 15C1C2E019874B8800A46ACC /* CCLuaValue.cpp in Sources */, - 155C7DF219A71C3200F08B25 /* lua_cocos2dx_3d_manual.cpp in Sources */, 15415AB119A71A53004F1E71 /* inet.c in Sources */, 15C1C2E119874B8800A46ACC /* Cocos2dxLuaLoader.cpp in Sources */, 15C1C2DB19874B3D00A46ACC /* xxtea.cpp in Sources */, 155C7E0E19A71C9600F08B25 /* lua_extensions.c in Sources */, - 15EFA1F61989E528000C57D3 /* lua_cocos2dx_experimental_auto.cpp in Sources */, 15AC69D519876E9300D17520 /* lua_cocos2dx_physics_auto.cpp in Sources */, - 155C7E1E19A71CC700F08B25 /* LuaSkeletonAnimation.cpp in Sources */, 15415AB519A71A53004F1E71 /* io.c in Sources */, - 15C1C2CE1987498B00A46ACC /* LuaOpengl.cpp in Sources */, 566F015F19B5EB0F00FCA620 /* CustomGUIReader.cpp in Sources */, 15415AC119A71A53004F1E71 /* options.c in Sources */, 150906F019D556C5002C4D97 /* lua_cocos2dx_audioengine_auto.cpp in Sources */, @@ -1390,12 +1407,12 @@ 15415A7019A71768004F1E71 /* lua_cocos2dx_extension_auto.cpp in Sources */, 155C7DF619A71C3E00F08B25 /* lua_cocos2dx_cocosdenshion_manual.cpp in Sources */, 15415AA519A71A53004F1E71 /* auxiliar.c in Sources */, - 155C7E1A19A71CBC00F08B25 /* lua_cocos2dx_spine_manual.cpp in Sources */, - 15A561EC1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */, 15C1C2D01987498B00A46ACC /* lua_cocos2dx_experimental_manual.cpp in Sources */, + 46624656222678D70008FC75 /* CCDictionary.cpp in Sources */, 15C1C2D11987498B00A46ACC /* lua_cocos2dx_manual.cpp in Sources */, 15C1C2D21987498B00A46ACC /* lua_cocos2dx_physics_manual.cpp in Sources */, 15C1C2D31987498B00A46ACC /* LuaScriptHandlerMgr.cpp in Sources */, + 46624650222678D70008FC75 /* CCString.cpp in Sources */, 15415AA919A71A53004F1E71 /* buffer.c in Sources */, 15C1C2CD1987495500A46ACC /* lua_cocos2dx_auto.cpp in Sources */, 15415AB919A71A53004F1E71 /* luasocket.c in Sources */, @@ -1410,7 +1427,7 @@ files = ( ADAC23ED1C2044A60049A6A2 /* lua_module_register.cpp in Sources */, 15415AC619A71A53004F1E71 /* select.c in Sources */, - 15A561ED1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */, + 4662464B222678D70008FC75 /* CCSet.cpp in Sources */, 15EFA646198B3311000C57D3 /* tolua_event.c in Sources */, 3E2BDB0A19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp in Sources */, 15415AA619A71A53004F1E71 /* auxiliar.c in Sources */, @@ -1428,7 +1445,6 @@ 15EFA634198B328B000C57D3 /* CCLuaStack.cpp in Sources */, 15EFA635198B328B000C57D3 /* CCLuaValue.cpp in Sources */, 15EFA636198B328B000C57D3 /* Cocos2dxLuaLoader.cpp in Sources */, - 155C7DEB19A71BE900F08B25 /* lua_cocos2dx_cocosbuilder_auto.cpp in Sources */, 150983DE1B1C4860007F3818 /* lua_cocos2dx_navmesh_conversions.cpp in Sources */, 15EFA637198B328B000C57D3 /* LuaBasicConversions.cpp in Sources */, 15EFA638198B328B000C57D3 /* CCLuaObjcBridge.mm in Sources */, @@ -1437,29 +1453,21 @@ 15415AD219A71A53004F1E71 /* timeout.c in Sources */, F4FE0D5819ECD00100B8B12B /* luasocket_scripts.c in Sources */, 15EFA639198B328B000C57D3 /* tolua_fix.cpp in Sources */, - 15A561E61B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */, - 155C7DFF19A71C5C00F08B25 /* CCBProxy.cpp in Sources */, 1595523B1A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.cpp in Sources */, 15C9A1121AE4973400C15443 /* lua_cocos2dx_experimental_webview_manual.cpp in Sources */, - 155C7DF019A71C1E00F08B25 /* lua_cocos2dx_spine_auto.cpp in Sources */, - 155C7E0719A71C7800F08B25 /* lua_cocos2dx_extension_manual.cpp in Sources */, - 15EFA625198B31FB000C57D3 /* LuaOpengl.cpp in Sources */, + 46624651222678D70008FC75 /* CCString.cpp in Sources */, 15EFA626198B31FB000C57D3 /* lua_cocos2dx_deprecated.cpp in Sources */, 15EFA627198B31FB000C57D3 /* lua_cocos2dx_experimental_manual.cpp in Sources */, - 155C7E0319A71C6900F08B25 /* lua_cocos2dx_cocosbuilder_manual.cpp in Sources */, 15415ABE19A71A53004F1E71 /* mime.c in Sources */, 15415ADA19A71A53004F1E71 /* unix.c in Sources */, - 155C7DF319A71C3400F08B25 /* lua_cocos2dx_3d_manual.cpp in Sources */, 15415ADE19A71A53004F1E71 /* usocket.c in Sources */, - 155C7DED19A71BF400F08B25 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */, 15EFA628198B31FB000C57D3 /* lua_cocos2dx_manual.cpp in Sources */, 155C7E0F19A71C9800F08B25 /* lua_extensions.c in Sources */, BA0CBB5F1BB0756F00003364 /* CCComponentLua.cpp in Sources */, 15415AD619A71A53004F1E71 /* udp.c in Sources */, + 4662465D222678D70008FC75 /* CCNotificationCenter.cpp in Sources */, 15415ABA19A71A53004F1E71 /* luasocket.c in Sources */, - 155C7E1F19A71CC800F08B25 /* LuaSkeletonAnimation.cpp in Sources */, 15415ACA19A71A53004F1E71 /* serial.c in Sources */, - 155C7DEA19A71BDA00F08B25 /* lua_cocos2dx_3d_auto.cpp in Sources */, 566F016019B5EB0F00FCA620 /* CustomGUIReader.cpp in Sources */, 155C7DF119A71C2300F08B25 /* lua_cocos2dx_studio_auto.cpp in Sources */, 3E2BDB0519C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.cpp in Sources */, @@ -1470,17 +1478,20 @@ 155C7E2319A71CD500F08B25 /* lua_cocos2dx_experimental_video_manual.cpp in Sources */, 150983D81B1C3F3E007F3818 /* lua_cocos2dx_navmesh_manual.cpp in Sources */, 155C7DFB19A71C4E00F08B25 /* lua_cocos2dx_coco_studio_manual.cpp in Sources */, + 46624657222678D70008FC75 /* CCDictionary.cpp in Sources */, + 46624661222678D70008FC75 /* CCArray.cpp in Sources */, 155C7E2719A71CDE00F08B25 /* lua_cocos2dx_ui_manual.cpp in Sources */, 15415AB619A71A53004F1E71 /* io.c in Sources */, 155C7DF719A71C4000F08B25 /* lua_cocos2dx_cocosdenshion_manual.cpp in Sources */, 155C7DEF19A71C0900F08B25 /* lua_cocos2dx_ui_auto.cpp in Sources */, - 155C7E1B19A71CBE00F08B25 /* lua_cocos2dx_spine_manual.cpp in Sources */, + 46624667222679D70008FC75 /* CCDataVisitor.cpp in Sources */, 15415A7119A71782004F1E71 /* lua_cocos2dx_extension_auto.cpp in Sources */, 15EFA629198B31FB000C57D3 /* lua_cocos2dx_physics_manual.cpp in Sources */, 15EFA62A198B31FB000C57D3 /* LuaScriptHandlerMgr.cpp in Sources */, - 15EFA617198B2E2B000C57D3 /* lua_cocos2dx_experimental_auto.cpp in Sources */, + 4662465B222678D70008FC75 /* CCDeprecated.cpp in Sources */, ED1AA90F215DF5F3004ABA9F /* lua_downloader.cpp in Sources */, 15EFA618198B2E2B000C57D3 /* lua_cocos2dx_auto.cpp in Sources */, + 4662466D2227720E0008FC75 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */, 15EFA619198B2E2B000C57D3 /* lua_cocos2dx_physics_auto.cpp in Sources */, 15415AB219A71A53004F1E71 /* inet.c in Sources */, 159552411A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.cpp in Sources */, @@ -1494,7 +1505,6 @@ files = ( 507B42BD1C31FA0C0067B53E /* lua_module_register.cpp in Sources */, 507B42BE1C31FA0C0067B53E /* select.c in Sources */, - 507B42BF1C31FA0C0067B53E /* lua_cocos2dx_physics3d_manual.cpp in Sources */, 507B42C01C31FA0C0067B53E /* tolua_event.c in Sources */, 507B42C11C31FA0C0067B53E /* lua_cocos2dx_audioengine_manual.cpp in Sources */, 507B42C21C31FA0C0067B53E /* auxiliar.c in Sources */, @@ -1512,7 +1522,6 @@ 507B42CE1C31FA0C0067B53E /* CCLuaStack.cpp in Sources */, 507B42CF1C31FA0C0067B53E /* CCLuaValue.cpp in Sources */, 507B42D01C31FA0C0067B53E /* Cocos2dxLuaLoader.cpp in Sources */, - 507B42D11C31FA0C0067B53E /* lua_cocos2dx_cocosbuilder_auto.cpp in Sources */, 507B42D21C31FA0C0067B53E /* lua_cocos2dx_navmesh_conversions.cpp in Sources */, 507B42D31C31FA0C0067B53E /* LuaBasicConversions.cpp in Sources */, 507B42D41C31FA0C0067B53E /* CCLuaObjcBridge.mm in Sources */, @@ -1521,29 +1530,19 @@ 507B42D71C31FA0C0067B53E /* timeout.c in Sources */, 507B42D81C31FA0C0067B53E /* luasocket_scripts.c in Sources */, 507B42D91C31FA0C0067B53E /* tolua_fix.cpp in Sources */, - 507B42DA1C31FA0C0067B53E /* lua_cocos2dx_physics3d_auto.cpp in Sources */, - 507B42DB1C31FA0C0067B53E /* CCBProxy.cpp in Sources */, 507B42DC1C31FA0C0067B53E /* lua_cocos2dx_csloader_auto.cpp in Sources */, 507B42DD1C31FA0C0067B53E /* lua_cocos2dx_experimental_webview_manual.cpp in Sources */, - 507B42DE1C31FA0C0067B53E /* lua_cocos2dx_spine_auto.cpp in Sources */, - 507B42DF1C31FA0C0067B53E /* lua_cocos2dx_extension_manual.cpp in Sources */, - 507B42E01C31FA0C0067B53E /* LuaOpengl.cpp in Sources */, 507B42E11C31FA0C0067B53E /* lua_cocos2dx_deprecated.cpp in Sources */, 507B42E21C31FA0C0067B53E /* lua_cocos2dx_experimental_manual.cpp in Sources */, - 507B42E31C31FA0C0067B53E /* lua_cocos2dx_cocosbuilder_manual.cpp in Sources */, 507B42E41C31FA0C0067B53E /* mime.c in Sources */, 507B42E51C31FA0C0067B53E /* unix.c in Sources */, - 507B42E61C31FA0C0067B53E /* lua_cocos2dx_3d_manual.cpp in Sources */, 507B42E71C31FA0C0067B53E /* usocket.c in Sources */, - 507B42E81C31FA0C0067B53E /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */, 507B42E91C31FA0C0067B53E /* lua_cocos2dx_manual.cpp in Sources */, 507B42EA1C31FA0C0067B53E /* lua_extensions.c in Sources */, 507B42EB1C31FA0C0067B53E /* CCComponentLua.cpp in Sources */, 507B42EC1C31FA0C0067B53E /* udp.c in Sources */, 507B42ED1C31FA0C0067B53E /* luasocket.c in Sources */, - 507B42EE1C31FA0C0067B53E /* LuaSkeletonAnimation.cpp in Sources */, 507B42EF1C31FA0C0067B53E /* serial.c in Sources */, - 507B42F01C31FA0C0067B53E /* lua_cocos2dx_3d_auto.cpp in Sources */, 507B42F11C31FA0C0067B53E /* CustomGUIReader.cpp in Sources */, 507B42F21C31FA0C0067B53E /* lua_cocos2dx_studio_auto.cpp in Sources */, 507B42F31C31FA0C0067B53E /* lua_cocos2dx_audioengine_auto.cpp in Sources */, @@ -1558,11 +1557,9 @@ 507B42FC1C31FA0C0067B53E /* io.c in Sources */, 507B42FD1C31FA0C0067B53E /* lua_cocos2dx_cocosdenshion_manual.cpp in Sources */, 507B42FE1C31FA0C0067B53E /* lua_cocos2dx_ui_auto.cpp in Sources */, - 507B42FF1C31FA0C0067B53E /* lua_cocos2dx_spine_manual.cpp in Sources */, 507B43001C31FA0C0067B53E /* lua_cocos2dx_extension_auto.cpp in Sources */, 507B43011C31FA0C0067B53E /* lua_cocos2dx_physics_manual.cpp in Sources */, 507B43021C31FA0C0067B53E /* LuaScriptHandlerMgr.cpp in Sources */, - 507B43031C31FA0C0067B53E /* lua_cocos2dx_experimental_auto.cpp in Sources */, ED1AA910215DF5F3004ABA9F /* lua_downloader.cpp in Sources */, 507B43041C31FA0C0067B53E /* lua_cocos2dx_auto.cpp in Sources */, 507B43051C31FA0C0067B53E /* lua_cocos2dx_physics_auto.cpp in Sources */, diff --git a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dEnum.lua b/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dEnum.lua index e28ae3ebbe..995e7a7062 100644 --- a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dEnum.lua +++ b/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dEnum.lua @@ -73,299 +73,4 @@ _G.kTargetIphone = cc.PLATFORM_OS_IPHONE _G.kTargetIpad = cc.PLATFORM_OS_IPAD _G.kTargetBlackBerry = cc.PLATFORM_OS_BLACKBERRY -_G.GL_ZERO = gl.ZERO -_G.GL_ONE = gl.ONE -_G.GL_SRC_COLOR = gl.SRC_COLOR -_G.GL_ONE_MINUS_SRC_COLOR = gl.ONE_MINUS_SRC_COLOR -_G.GL_SRC_ALPHA = gl.SRC_ALPHA -_G.GL_ONE_MINUS_SRC_ALPHA = gl.ONE_MINUS_SRC_ALPHA -_G.GL_DST_ALPHA = gl.DST_ALPHA -_G.GL_ONE_MINUS_DST_ALPHA = gl.ONE_MINUS_DST_ALPHA -_G.GL_DST_COLOR = gl.DST_COLOR -_G.GL_ONE_MINUS_DST_COLOR = gl.ONE_MINUS_DST_COLOR -_G.GL_RENDERBUFFER_INTERNAL_FORMAT = gl.RENDERBUFFER_INTERNAL_FORMAT -_G.GL_LINE_WIDTH = gl.LINE_WIDTH -_G.GL_CONSTANT_ALPHA = gl.CONSTANT_ALPHA -_G.GL_BLEND_SRC_ALPHA = gl.BLEND_SRC_ALPHA -_G.GL_GREEN_BITS = gl.GREEN_BITS -_G.GL_STENCIL_REF = gl.STENCIL_REF -_G.GL_ONE_MINUS_SRC_ALPHA = gl.ONE_MINUS_SRC_ALPHA -_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE -_G.GL_CCW = gl.CCW -_G.GL_MAX_TEXTURE_IMAGE_UNITS = gl.MAX_TEXTURE_IMAGE_UNITS -_G.GL_BACK = gl.BACK -_G.GL_ACTIVE_ATTRIBUTES = gl.ACTIVE_ATTRIBUTES -_G.GL_TEXTURE_CUBE_MAP_POSITIVE_X = gl.TEXTURE_CUBE_MAP_POSITIVE_X -_G.GL_STENCIL_BACK_VALUE_MASK = gl.STENCIL_BACK_VALUE_MASK -_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Z = gl.TEXTURE_CUBE_MAP_POSITIVE_Z -_G.GL_ONE = gl.ONE -_G.GL_TRUE = gl.TRUE -_G.GL_TEXTURE12 = gl.TEXTURE12 -_G.GL_LINK_STATUS = gl.LINK_STATUS -_G.GL_BLEND = gl.BLEND -_G.GL_LESS = gl.LESS -_G.GL_TEXTURE16 = gl.TEXTURE16 -_G.GL_BOOL_VEC2 = gl.BOOL_VEC2 -_G.GL_KEEP = gl.KEEP -_G.GL_DST_COLOR = gl.DST_COLOR -_G.GL_VERTEX_ATTRIB_ARRAY_ENABLED = gl.VERTEX_ATTRIB_ARRAY_ENABLED -_G.GL_EXTENSIONS = gl.EXTENSIONS -_G.GL_FRONT = gl.FRONT -_G.GL_DST_ALPHA = gl.DST_ALPHA -_G.GL_ATTACHED_SHADERS = gl.ATTACHED_SHADERS -_G.GL_STENCIL_BACK_FUNC = gl.STENCIL_BACK_FUNC -_G.GL_ONE_MINUS_DST_COLOR = gl.ONE_MINUS_DST_COLOR -_G.GL_BLEND_EQUATION = gl.BLEND_EQUATION -_G.GL_RENDERBUFFER_DEPTH_SIZE = gl.RENDERBUFFER_DEPTH_SIZE -_G.GL_PACK_ALIGNMENT = gl.PACK_ALIGNMENT -_G.GL_VENDOR = gl.VENDOR -_G.GL_NEAREST_MIPMAP_LINEAR = gl.NEAREST_MIPMAP_LINEAR -_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Y = gl.TEXTURE_CUBE_MAP_POSITIVE_Y -_G.GL_NEAREST = gl.NEAREST -_G.GL_RENDERBUFFER_WIDTH = gl.RENDERBUFFER_WIDTH -_G.GL_ARRAY_BUFFER_BINDING = gl.ARRAY_BUFFER_BINDING -_G.GL_ARRAY_BUFFER = gl.ARRAY_BUFFER -_G.GL_LEQUAL = gl.LEQUAL -_G.GL_VERSION = gl.VERSION -_G.GL_COLOR_CLEAR_VALUE = gl.COLOR_CLEAR_VALUE -_G.GL_RENDERER = gl.RENDERER -_G.GL_STENCIL_BACK_PASS_DEPTH_PASS = gl.STENCIL_BACK_PASS_DEPTH_PASS -_G.GL_STENCIL_BACK_PASS_DEPTH_FAIL = gl.STENCIL_BACK_PASS_DEPTH_FAIL -_G.GL_STENCIL_BACK_WRITEMASK = gl.STENCIL_BACK_WRITEMASK -_G.GL_BOOL = gl.BOOL -_G.GL_VIEWPORT = gl.VIEWPORT -_G.GL_FRAGMENT_SHADER = gl.FRAGMENT_SHADER -_G.GL_LUMINANCE = gl.LUMINANCE -_G.GL_DECR_WRAP = gl.DECR_WRAP -_G.GL_FUNC_ADD = gl.FUNC_ADD -_G.GL_ONE_MINUS_DST_ALPHA = gl.ONE_MINUS_DST_ALPHA -_G.GL_OUT_OF_MEMORY = gl.OUT_OF_MEMORY -_G.GL_BOOL_VEC4 = gl.BOOL_VEC4 -_G.GL_POLYGON_OFFSET_FACTOR = gl.POLYGON_OFFSET_FACTOR -_G.GL_STATIC_DRAW = gl.STATIC_DRAW -_G.GL_DITHER = gl.DITHER -_G.GL_TEXTURE31 = gl.TEXTURE31 -_G.GL_TEXTURE30 = gl.TEXTURE30 -_G.GL_UNSIGNED_BYTE = gl.UNSIGNED_BYTE -_G.GL_DEPTH_COMPONENT16 = gl.DEPTH_COMPONENT16 -_G.GL_TEXTURE23 = gl.TEXTURE23 -_G.GL_DEPTH_TEST = gl.DEPTH_TEST -_G.GL_STENCIL_PASS_DEPTH_FAIL = gl.STENCIL_PASS_DEPTH_FAIL -_G.GL_BOOL_VEC3 = gl.BOOL_VEC3 -_G.GL_POLYGON_OFFSET_UNITS = gl.POLYGON_OFFSET_UNITS -_G.GL_TEXTURE_BINDING_2D = gl.TEXTURE_BINDING_2D -_G.GL_TEXTURE21 = gl.TEXTURE21 -_G.GL_UNPACK_ALIGNMENT = gl.UNPACK_ALIGNMENT -_G.GL_DONT_CARE = gl.DONT_CARE -_G.GL_BUFFER_SIZE = gl.BUFFER_SIZE -_G.GL_FLOAT_MAT3 = gl.FLOAT_MAT3 -_G.GL_UNSIGNED_SHORT_5_6_5 = gl.UNSIGNED_SHORT_5_6_5 -_G.GL_INT_VEC2 = gl.INT_VEC2 -_G.GL_UNSIGNED_SHORT_4_4_4_4 = gl.UNSIGNED_SHORT_4_4_4_4 -_G.GL_NONE = gl.NONE -_G.GL_BLEND_DST_ALPHA = gl.BLEND_DST_ALPHA -_G.GL_VERTEX_ATTRIB_ARRAY_SIZE = gl.VERTEX_ATTRIB_ARRAY_SIZE -_G.GL_SRC_COLOR = gl.SRC_COLOR -_G.GL_COMPRESSED_TEXTURE_FORMATS = gl.COMPRESSED_TEXTURE_FORMATS -_G.GL_STENCIL_ATTACHMENT = gl.STENCIL_ATTACHMENT -_G.GL_MAX_VERTEX_ATTRIBS = gl.MAX_VERTEX_ATTRIBS -_G.GL_NUM_COMPRESSED_TEXTURE_FORMATS = gl.NUM_COMPRESSED_TEXTURE_FORMATS -_G.GL_BLEND_EQUATION_RGB = gl.BLEND_EQUATION_RGB -_G.GL_TEXTURE = gl.TEXTURE -_G.GL_LINEAR_MIPMAP_LINEAR = gl.LINEAR_MIPMAP_LINEAR -_G.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING -_G.GL_CURRENT_PROGRAM = gl.CURRENT_PROGRAM -_G.GL_COLOR_BUFFER_BIT = gl.COLOR_BUFFER_BIT -_G.GL_TEXTURE20 = gl.TEXTURE20 -_G.GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = gl.ACTIVE_ATTRIBUTE_MAX_LENGTH -_G.GL_TEXTURE28 = gl.TEXTURE28 -_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE -_G.GL_TEXTURE22 = gl.TEXTURE22 -_G.GL_ELEMENT_ARRAY_BUFFER_BINDING = gl.ELEMENT_ARRAY_BUFFER_BINDING -_G.GL_STREAM_DRAW = gl.STREAM_DRAW -_G.GL_SCISSOR_BOX = gl.SCISSOR_BOX -_G.GL_TEXTURE26 = gl.TEXTURE26 -_G.GL_TEXTURE27 = gl.TEXTURE27 -_G.GL_TEXTURE24 = gl.TEXTURE24 -_G.GL_TEXTURE25 = gl.TEXTURE25 -_G.GL_NO_ERROR = gl.NO_ERROR -_G.GL_TEXTURE29 = gl.TEXTURE29 -_G.GL_FLOAT_MAT4 = gl.FLOAT_MAT4 -_G.GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = gl.VERTEX_ATTRIB_ARRAY_NORMALIZED -_G.GL_SAMPLE_COVERAGE_INVERT = gl.SAMPLE_COVERAGE_INVERT -_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL -_G.GL_FLOAT_VEC3 = gl.FLOAT_VEC3 -_G.GL_STENCIL_CLEAR_VALUE = gl.STENCIL_CLEAR_VALUE -_G.GL_UNSIGNED_SHORT_5_5_5_1 = gl.UNSIGNED_SHORT_5_5_5_1 -_G.GL_ACTIVE_UNIFORMS = gl.ACTIVE_UNIFORMS -_G.GL_INVALID_OPERATION = gl.INVALID_OPERATION -_G.GL_DEPTH_ATTACHMENT = gl.DEPTH_ATTACHMENT -_G.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS -_G.GL_FRAMEBUFFER_COMPLETE = gl.FRAMEBUFFER_COMPLETE -_G.GL_ONE_MINUS_CONSTANT_COLOR = gl.ONE_MINUS_CONSTANT_COLOR -_G.GL_TEXTURE2 = gl.TEXTURE2 -_G.GL_TEXTURE1 = gl.TEXTURE1 -_G.GL_GEQUAL = gl.GEQUAL -_G.GL_TEXTURE7 = gl.TEXTURE7 -_G.GL_TEXTURE6 = gl.TEXTURE6 -_G.GL_TEXTURE5 = gl.TEXTURE5 -_G.GL_TEXTURE4 = gl.TEXTURE4 -_G.GL_GENERATE_MIPMAP_HINT = gl.GENERATE_MIPMAP_HINT -_G.GL_ONE_MINUS_SRC_COLOR = gl.ONE_MINUS_SRC_COLOR -_G.GL_TEXTURE9 = gl.TEXTURE9 -_G.GL_STENCIL_TEST = gl.STENCIL_TEST -_G.GL_COLOR_WRITEMASK = gl.COLOR_WRITEMASK -_G.GL_DEPTH_COMPONENT = gl.DEPTH_COMPONENT -_G.GL_STENCIL_INDEX8 = gl.STENCIL_INDEX8 -_G.GL_VERTEX_ATTRIB_ARRAY_TYPE = gl.VERTEX_ATTRIB_ARRAY_TYPE -_G.GL_FLOAT_VEC2 = gl.FLOAT_VEC2 -_G.GL_BLUE_BITS = gl.BLUE_BITS -_G.GL_VERTEX_SHADER = gl.VERTEX_SHADER -_G.GL_SUBPIXEL_BITS = gl.SUBPIXEL_BITS -_G.GL_STENCIL_WRITEMASK = gl.STENCIL_WRITEMASK -_G.GL_FLOAT_VEC4 = gl.FLOAT_VEC4 -_G.GL_TEXTURE17 = gl.TEXTURE17 -_G.GL_ONE_MINUS_CONSTANT_ALPHA = gl.ONE_MINUS_CONSTANT_ALPHA -_G.GL_TEXTURE15 = gl.TEXTURE15 -_G.GL_TEXTURE14 = gl.TEXTURE14 -_G.GL_TEXTURE13 = gl.TEXTURE13 -_G.GL_SAMPLES = gl.SAMPLES -_G.GL_TEXTURE11 = gl.TEXTURE11 -_G.GL_TEXTURE10 = gl.TEXTURE10 -_G.GL_FUNC_SUBTRACT = gl.FUNC_SUBTRACT -_G.GL_STENCIL_BUFFER_BIT = gl.STENCIL_BUFFER_BIT -_G.GL_TEXTURE19 = gl.TEXTURE19 -_G.GL_TEXTURE18 = gl.TEXTURE18 -_G.GL_NEAREST_MIPMAP_NEAREST = gl.NEAREST_MIPMAP_NEAREST -_G.GL_SHORT = gl.SHORT -_G.GL_RENDERBUFFER_BINDING = gl.RENDERBUFFER_BINDING -_G.GL_REPEAT = gl.REPEAT -_G.GL_TEXTURE_MIN_FILTER = gl.TEXTURE_MIN_FILTER -_G.GL_RED_BITS = gl.RED_BITS -_G.GL_FRONT_FACE = gl.FRONT_FACE -_G.GL_BLEND_COLOR = gl.BLEND_COLOR -_G.GL_MIRRORED_REPEAT = gl.MIRRORED_REPEAT -_G.GL_INT_VEC4 = gl.INT_VEC4 -_G.GL_MAX_CUBE_MAP_TEXTURE_SIZE = gl.MAX_CUBE_MAP_TEXTURE_SIZE -_G.GL_RENDERBUFFER_BLUE_SIZE = gl.RENDERBUFFER_BLUE_SIZE -_G.GL_SAMPLE_COVERAGE = gl.SAMPLE_COVERAGE -_G.GL_SRC_ALPHA = gl.SRC_ALPHA -_G.GL_FUNC_REVERSE_SUBTRACT = gl.FUNC_REVERSE_SUBTRACT -_G.GL_DEPTH_WRITEMASK = gl.DEPTH_WRITEMASK -_G.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT -_G.GL_POLYGON_OFFSET_FILL = gl.POLYGON_OFFSET_FILL -_G.GL_STENCIL_FUNC = gl.STENCIL_FUNC -_G.GL_REPLACE = gl.REPLACE -_G.GL_LUMINANCE_ALPHA = gl.LUMINANCE_ALPHA -_G.GL_DEPTH_RANGE = gl.DEPTH_RANGE -_G.GL_FASTEST = gl.FASTEST -_G.GL_STENCIL_FAIL = gl.STENCIL_FAIL -_G.GL_UNSIGNED_SHORT = gl.UNSIGNED_SHORT -_G.GL_RENDERBUFFER_HEIGHT = gl.RENDERBUFFER_HEIGHT -_G.GL_STENCIL_BACK_FAIL = gl.STENCIL_BACK_FAIL -_G.GL_BLEND_SRC_RGB = gl.BLEND_SRC_RGB -_G.GL_TEXTURE3 = gl.TEXTURE3 -_G.GL_RENDERBUFFER = gl.RENDERBUFFER -_G.GL_RGB5_A1 = gl.RGB5_A1 -_G.GL_RENDERBUFFER_ALPHA_SIZE = gl.RENDERBUFFER_ALPHA_SIZE -_G.GL_RENDERBUFFER_STENCIL_SIZE = gl.RENDERBUFFER_STENCIL_SIZE -_G.GL_NOTEQUAL = gl.NOTEQUAL -_G.GL_BLEND_DST_RGB = gl.BLEND_DST_RGB -_G.GL_FRONT_AND_BACK = gl.FRONT_AND_BACK -_G.GL_TEXTURE_BINDING_CUBE_MAP = gl.TEXTURE_BINDING_CUBE_MAP -_G.GL_MAX_RENDERBUFFER_SIZE = gl.MAX_RENDERBUFFER_SIZE -_G.GL_ZERO = gl.ZERO -_G.GL_TEXTURE0 = gl.TEXTURE0 -_G.GL_SAMPLE_ALPHA_TO_COVERAGE = gl.SAMPLE_ALPHA_TO_COVERAGE -_G.GL_BUFFER_USAGE = gl.BUFFER_USAGE -_G.GL_ACTIVE_TEXTURE = gl.ACTIVE_TEXTURE -_G.GL_BYTE = gl.BYTE -_G.GL_CW = gl.CW -_G.GL_DYNAMIC_DRAW = gl.DYNAMIC_DRAW -_G.GL_RENDERBUFFER_RED_SIZE = gl.RENDERBUFFER_RED_SIZE -_G.GL_FALSE = gl.FALSE -_G.GL_GREATER = gl.GREATER -_G.GL_RGBA4 = gl.RGBA4 -_G.GL_VALIDATE_STATUS = gl.VALIDATE_STATUS -_G.GL_STENCIL_BITS = gl.STENCIL_BITS -_G.GL_RGB = gl.RGB -_G.GL_INT = gl.INT -_G.GL_DEPTH_FUNC = gl.DEPTH_FUNC -_G.GL_SAMPLER_2D = gl.SAMPLER_2D -_G.GL_NICEST = gl.NICEST -_G.GL_MAX_VIEWPORT_DIMS = gl.MAX_VIEWPORT_DIMS -_G.GL_CULL_FACE = gl.CULL_FACE -_G.GL_INT_VEC3 = gl.INT_VEC3 -_G.GL_ALIASED_POINT_SIZE_RANGE = gl.ALIASED_POINT_SIZE_RANGE -_G.GL_INVALID_ENUM = gl.INVALID_ENUM -_G.GL_INVERT = gl.INVERT -_G.GL_CULL_FACE_MODE = gl.CULL_FACE_MODE -_G.GL_TEXTURE8 = gl.TEXTURE8 -_G.GL_VERTEX_ATTRIB_ARRAY_POINTER = gl.VERTEX_ATTRIB_ARRAY_POINTER -_G.GL_TEXTURE_WRAP_S = gl.TEXTURE_WRAP_S -_G.GL_VERTEX_ATTRIB_ARRAY_STRIDE = gl.VERTEX_ATTRIB_ARRAY_STRIDE -_G.GL_LINES = gl.LINES -_G.GL_EQUAL = gl.EQUAL -_G.GL_LINE_LOOP = gl.LINE_LOOP -_G.GL_TEXTURE_WRAP_T = gl.TEXTURE_WRAP_T -_G.GL_DEPTH_BUFFER_BIT = gl.DEPTH_BUFFER_BIT -_G.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS -_G.GL_SHADER_TYPE = gl.SHADER_TYPE -_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME -_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_X = gl.TEXTURE_CUBE_MAP_NEGATIVE_X -_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = gl.TEXTURE_CUBE_MAP_NEGATIVE_Y -_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = gl.TEXTURE_CUBE_MAP_NEGATIVE_Z -_G.GL_DECR = gl.DECR -_G.GL_DELETE_STATUS = gl.DELETE_STATUS -_G.GL_DEPTH_BITS = gl.DEPTH_BITS -_G.GL_INCR = gl.INCR -_G.GL_SAMPLE_COVERAGE_VALUE = gl.SAMPLE_COVERAGE_VALUE -_G.GL_ALPHA_BITS = gl.ALPHA_BITS -_G.GL_FLOAT_MAT2 = gl.FLOAT_MAT2 -_G.GL_LINE_STRIP = gl.LINE_STRIP -_G.GL_SHADER_SOURCE_LENGTH = gl.SHADER_SOURCE_LENGTH -_G.GL_INVALID_VALUE = gl.INVALID_VALUE -_G.GL_NEVER = gl.NEVER -_G.GL_INCR_WRAP = gl.INCR_WRAP -_G.GL_BLEND_EQUATION_ALPHA = gl.BLEND_EQUATION_ALPHA -_G.GL_TEXTURE_MAG_FILTER = gl.TEXTURE_MAG_FILTER -_G.GL_POINTS = gl.POINTS -_G.GL_COLOR_ATTACHMENT0 = gl.COLOR_ATTACHMENT0 -_G.GL_RGBA = gl.RGBA -_G.GL_SRC_ALPHA_SATURATE = gl.SRC_ALPHA_SATURATE -_G.GL_SAMPLER_CUBE = gl.SAMPLER_CUBE -_G.GL_FRAMEBUFFER = gl.FRAMEBUFFER -_G.GL_TEXTURE_CUBE_MAP = gl.TEXTURE_CUBE_MAP -_G.GL_SAMPLE_BUFFERS = gl.SAMPLE_BUFFERS -_G.GL_LINEAR = gl.LINEAR -_G.GL_LINEAR_MIPMAP_NEAREST = gl.LINEAR_MIPMAP_NEAREST -_G.GL_ACTIVE_UNIFORM_MAX_LENGTH = gl.ACTIVE_UNIFORM_MAX_LENGTH -_G.GL_STENCIL_BACK_REF = gl.STENCIL_BACK_REF -_G.GL_ELEMENT_ARRAY_BUFFER = gl.ELEMENT_ARRAY_BUFFER -_G.GL_CLAMP_TO_EDGE = gl.CLAMP_TO_EDGE -_G.GL_TRIANGLE_STRIP = gl.TRIANGLE_STRIP -_G.GL_CONSTANT_COLOR = gl.CONSTANT_COLOR -_G.GL_COMPILE_STATUS = gl.COMPILE_STATUS -_G.GL_RENDERBUFFER_GREEN_SIZE = gl.RENDERBUFFER_GREEN_SIZE -_G.GL_UNSIGNED_INT = gl.UNSIGNED_INT -_G.GL_DEPTH_CLEAR_VALUE = gl.DEPTH_CLEAR_VALUE -_G.GL_ALIASED_LINE_WIDTH_RANGE = gl.ALIASED_LINE_WIDTH_RANGE -_G.GL_SHADING_LANGUAGE_VERSION = gl.SHADING_LANGUAGE_VERSION -_G.GL_FRAMEBUFFER_UNSUPPORTED = gl.FRAMEBUFFER_UNSUPPORTED -_G.GL_INFO_LOG_LENGTH = gl.INFO_LOG_LENGTH -_G.GL_STENCIL_PASS_DEPTH_PASS = gl.STENCIL_PASS_DEPTH_PASS -_G.GL_STENCIL_VALUE_MASK = gl.STENCIL_VALUE_MASK -_G.GL_ALWAYS = gl.ALWAYS -_G.GL_MAX_TEXTURE_SIZE = gl.MAX_TEXTURE_SIZE -_G.GL_FLOAT = gl.FLOAT -_G.GL_FRAMEBUFFER_BINDING = gl.FRAMEBUFFER_BINDING -_G.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT -_G.GL_TRIANGLE_FAN = gl.TRIANGLE_FAN -_G.GL_INVALID_FRAMEBUFFER_OPERATION = gl.INVALID_FRAMEBUFFER_OPERATION -_G.GL_TEXTURE_2D = gl.TEXTURE_2D -_G.GL_ALPHA = gl.ALPHA -_G.GL_CURRENT_VERTEX_ATTRIB = gl.CURRENT_VERTEX_ATTRIB -_G.GL_SCISSOR_TEST = gl.SCISSOR_TEST -_G.GL_TRIANGLES = gl.TRIANGLES - cc.TEXTURE_PIXELFORMAT_DEFAULT = cc.TEXTURE2_D_PIXEL_FORMAT_DEFAULT diff --git a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua b/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua index 7a5793d876..bdc6a529d4 100644 --- a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua +++ b/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua @@ -1000,22 +1000,4 @@ cc.Node.ignoreAnchorPointForPosition = NodeDeprecated.ignoreAnchorPointForPositi --functions of cc.Node will be deprecated end --functions of cc.GLProgram will be deprecated begin -local GLProgram = { } -function GLProgram.initWithVertexShaderByteArray(self,vShaderByteArray, fShaderByteArray) - deprecatedTip("cc.GLProgram:initWithVertexShaderByteArray","cc.GLProgram:initWithByteArrays") - return self:initWithByteArrays(vShaderByteArray, fShaderByteArray) -end -cc.GLProgram.initWithVertexShaderByteArray = GLProgram.initWithVertexShaderByteArray - -function GLProgram.initWithVertexShaderFilename(self,vShaderByteArray, fShaderByteArray) - deprecatedTip("cc.GLProgram:initWithVertexShaderFilename","cc.GLProgram:initWithFilenames") - return self:initWithFilenames(vShaderByteArray, fShaderByteArray) -end -cc.GLProgram.initWithVertexShaderFilename = GLProgram.initWithVertexShaderFilename - -function GLProgram.addAttribute(self, attributeName, index) - deprecatedTip("cc.GLProgram:addAttribute","cc.GLProgram:bindAttribLocation") - return self:bindAttribLocation(attributeName, index) -end -cc.GLProgram.addAttribute = GLProgram.addAttribute --functions of cc.GLProgram will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedOpenglEnum.lua b/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedOpenglEnum.lua deleted file mode 100644 index 1235e8dcc3..0000000000 --- a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedOpenglEnum.lua +++ /dev/null @@ -1,288 +0,0 @@ --- This is the DeprecatedEnum - -DeprecatedClass = {} or DeprecatedClass - -_G.GL_RENDERBUFFER_INTERNAL_FORMAT = gl.RENDERBUFFER_INTERNAL_FORMAT -_G.GL_LINE_WIDTH = gl.LINE_WIDTH -_G.GL_CONSTANT_ALPHA = gl.CONSTANT_ALPHA -_G.GL_BLEND_SRC_ALPHA = gl.BLEND_SRC_ALPHA -_G.GL_GREEN_BITS = gl.GREEN_BITS -_G.GL_STENCIL_REF = gl.STENCIL_REF -_G.GL_ONE_MINUS_SRC_ALPHA = gl.ONE_MINUS_SRC_ALPHA -_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE -_G.GL_CCW = gl.CCW -_G.GL_MAX_TEXTURE_IMAGE_UNITS = gl.MAX_TEXTURE_IMAGE_UNITS -_G.GL_BACK = gl.BACK -_G.GL_ACTIVE_ATTRIBUTES = gl.ACTIVE_ATTRIBUTES -_G.GL_TEXTURE_CUBE_MAP_POSITIVE_X = gl.TEXTURE_CUBE_MAP_POSITIVE_X -_G.GL_STENCIL_BACK_VALUE_MASK = gl.STENCIL_BACK_VALUE_MASK -_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Z = gl.TEXTURE_CUBE_MAP_POSITIVE_Z -_G.GL_ONE = gl.ONE -_G.GL_TRUE = gl.TRUE -_G.GL_TEXTURE12 = gl.TEXTURE12 -_G.GL_LINK_STATUS = gl.LINK_STATUS -_G.GL_BLEND = gl.BLEND -_G.GL_LESS = gl.LESS -_G.GL_TEXTURE16 = gl.TEXTURE16 -_G.GL_BOOL_VEC2 = gl.BOOL_VEC2 -_G.GL_KEEP = gl.KEEP -_G.GL_DST_COLOR = gl.DST_COLOR -_G.GL_VERTEX_ATTRIB_ARRAY_ENABLED = gl.VERTEX_ATTRIB_ARRAY_ENABLED -_G.GL_EXTENSIONS = gl.EXTENSIONS -_G.GL_FRONT = gl.FRONT -_G.GL_DST_ALPHA = gl.DST_ALPHA -_G.GL_ATTACHED_SHADERS = gl.ATTACHED_SHADERS -_G.GL_STENCIL_BACK_FUNC = gl.STENCIL_BACK_FUNC -_G.GL_ONE_MINUS_DST_COLOR = gl.ONE_MINUS_DST_COLOR -_G.GL_BLEND_EQUATION = gl.BLEND_EQUATION -_G.GL_RENDERBUFFER_DEPTH_SIZE = gl.RENDERBUFFER_DEPTH_SIZE -_G.GL_PACK_ALIGNMENT = gl.PACK_ALIGNMENT -_G.GL_VENDOR = gl.VENDOR -_G.GL_NEAREST_MIPMAP_LINEAR = gl.NEAREST_MIPMAP_LINEAR -_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Y = gl.TEXTURE_CUBE_MAP_POSITIVE_Y -_G.GL_NEAREST = gl.NEAREST -_G.GL_RENDERBUFFER_WIDTH = gl.RENDERBUFFER_WIDTH -_G.GL_ARRAY_BUFFER_BINDING = gl.ARRAY_BUFFER_BINDING -_G.GL_ARRAY_BUFFER = gl.ARRAY_BUFFER -_G.GL_LEQUAL = gl.LEQUAL -_G.GL_VERSION = gl.VERSION -_G.GL_COLOR_CLEAR_VALUE = gl.COLOR_CLEAR_VALUE -_G.GL_RENDERER = gl.RENDERER -_G.GL_STENCIL_BACK_PASS_DEPTH_PASS = gl.STENCIL_BACK_PASS_DEPTH_PASS -_G.GL_STENCIL_BACK_PASS_DEPTH_FAIL = gl.STENCIL_BACK_PASS_DEPTH_FAIL -_G.GL_STENCIL_BACK_WRITEMASK = gl.STENCIL_BACK_WRITEMASK -_G.GL_BOOL = gl.BOOL -_G.GL_VIEWPORT = gl.VIEWPORT -_G.GL_FRAGMENT_SHADER = gl.FRAGMENT_SHADER -_G.GL_LUMINANCE = gl.LUMINANCE -_G.GL_DECR_WRAP = gl.DECR_WRAP -_G.GL_FUNC_ADD = gl.FUNC_ADD -_G.GL_ONE_MINUS_DST_ALPHA = gl.ONE_MINUS_DST_ALPHA -_G.GL_OUT_OF_MEMORY = gl.OUT_OF_MEMORY -_G.GL_BOOL_VEC4 = gl.BOOL_VEC4 -_G.GL_POLYGON_OFFSET_FACTOR = gl.POLYGON_OFFSET_FACTOR -_G.GL_STATIC_DRAW = gl.STATIC_DRAW -_G.GL_DITHER = gl.DITHER -_G.GL_TEXTURE31 = gl.TEXTURE31 -_G.GL_TEXTURE30 = gl.TEXTURE30 -_G.GL_UNSIGNED_BYTE = gl.UNSIGNED_BYTE -_G.GL_DEPTH_COMPONENT16 = gl.DEPTH_COMPONENT16 -_G.GL_TEXTURE23 = gl.TEXTURE23 -_G.GL_DEPTH_TEST = gl.DEPTH_TEST -_G.GL_STENCIL_PASS_DEPTH_FAIL = gl.STENCIL_PASS_DEPTH_FAIL -_G.GL_BOOL_VEC3 = gl.BOOL_VEC3 -_G.GL_POLYGON_OFFSET_UNITS = gl.POLYGON_OFFSET_UNITS -_G.GL_TEXTURE_BINDING_2D = gl.TEXTURE_BINDING_2D -_G.GL_TEXTURE21 = gl.TEXTURE21 -_G.GL_UNPACK_ALIGNMENT = gl.UNPACK_ALIGNMENT -_G.GL_DONT_CARE = gl.DONT_CARE -_G.GL_BUFFER_SIZE = gl.BUFFER_SIZE -_G.GL_FLOAT_MAT3 = gl.FLOAT_MAT3 -_G.GL_UNSIGNED_SHORT_5_6_5 = gl.UNSIGNED_SHORT_5_6_5 -_G.GL_INT_VEC2 = gl.INT_VEC2 -_G.GL_UNSIGNED_SHORT_4_4_4_4 = gl.UNSIGNED_SHORT_4_4_4_4 -_G.GL_NONE = gl.NONE -_G.GL_BLEND_DST_ALPHA = gl.BLEND_DST_ALPHA -_G.GL_VERTEX_ATTRIB_ARRAY_SIZE = gl.VERTEX_ATTRIB_ARRAY_SIZE -_G.GL_SRC_COLOR = gl.SRC_COLOR -_G.GL_COMPRESSED_TEXTURE_FORMATS = gl.COMPRESSED_TEXTURE_FORMATS -_G.GL_STENCIL_ATTACHMENT = gl.STENCIL_ATTACHMENT -_G.GL_MAX_VERTEX_ATTRIBS = gl.MAX_VERTEX_ATTRIBS -_G.GL_NUM_COMPRESSED_TEXTURE_FORMATS = gl.NUM_COMPRESSED_TEXTURE_FORMATS -_G.GL_BLEND_EQUATION_RGB = gl.BLEND_EQUATION_RGB -_G.GL_TEXTURE = gl.TEXTURE -_G.GL_LINEAR_MIPMAP_LINEAR = gl.LINEAR_MIPMAP_LINEAR -_G.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING -_G.GL_CURRENT_PROGRAM = gl.CURRENT_PROGRAM -_G.GL_COLOR_BUFFER_BIT = gl.COLOR_BUFFER_BIT -_G.GL_TEXTURE20 = gl.TEXTURE20 -_G.GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = gl.ACTIVE_ATTRIBUTE_MAX_LENGTH -_G.GL_TEXTURE28 = gl.TEXTURE28 -_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE -_G.GL_TEXTURE22 = gl.TEXTURE22 -_G.GL_ELEMENT_ARRAY_BUFFER_BINDING = gl.ELEMENT_ARRAY_BUFFER_BINDING -_G.GL_STREAM_DRAW = gl.STREAM_DRAW -_G.GL_SCISSOR_BOX = gl.SCISSOR_BOX -_G.GL_TEXTURE26 = gl.TEXTURE26 -_G.GL_TEXTURE27 = gl.TEXTURE27 -_G.GL_TEXTURE24 = gl.TEXTURE24 -_G.GL_TEXTURE25 = gl.TEXTURE25 -_G.GL_NO_ERROR = gl.NO_ERROR -_G.GL_TEXTURE29 = gl.TEXTURE29 -_G.GL_FLOAT_MAT4 = gl.FLOAT_MAT4 -_G.GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = gl.VERTEX_ATTRIB_ARRAY_NORMALIZED -_G.GL_SAMPLE_COVERAGE_INVERT = gl.SAMPLE_COVERAGE_INVERT -_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL -_G.GL_FLOAT_VEC3 = gl.FLOAT_VEC3 -_G.GL_STENCIL_CLEAR_VALUE = gl.STENCIL_CLEAR_VALUE -_G.GL_UNSIGNED_SHORT_5_5_5_1 = gl.UNSIGNED_SHORT_5_5_5_1 -_G.GL_ACTIVE_UNIFORMS = gl.ACTIVE_UNIFORMS -_G.GL_INVALID_OPERATION = gl.INVALID_OPERATION -_G.GL_DEPTH_ATTACHMENT = gl.DEPTH_ATTACHMENT -_G.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS -_G.GL_FRAMEBUFFER_COMPLETE = gl.FRAMEBUFFER_COMPLETE -_G.GL_ONE_MINUS_CONSTANT_COLOR = gl.ONE_MINUS_CONSTANT_COLOR -_G.GL_TEXTURE2 = gl.TEXTURE2 -_G.GL_TEXTURE1 = gl.TEXTURE1 -_G.GL_GEQUAL = gl.GEQUAL -_G.GL_TEXTURE7 = gl.TEXTURE7 -_G.GL_TEXTURE6 = gl.TEXTURE6 -_G.GL_TEXTURE5 = gl.TEXTURE5 -_G.GL_TEXTURE4 = gl.TEXTURE4 -_G.GL_GENERATE_MIPMAP_HINT = gl.GENERATE_MIPMAP_HINT -_G.GL_ONE_MINUS_SRC_COLOR = gl.ONE_MINUS_SRC_COLOR -_G.GL_TEXTURE9 = gl.TEXTURE9 -_G.GL_STENCIL_TEST = gl.STENCIL_TEST -_G.GL_COLOR_WRITEMASK = gl.COLOR_WRITEMASK -_G.GL_DEPTH_COMPONENT = gl.DEPTH_COMPONENT -_G.GL_STENCIL_INDEX8 = gl.STENCIL_INDEX8 -_G.GL_VERTEX_ATTRIB_ARRAY_TYPE = gl.VERTEX_ATTRIB_ARRAY_TYPE -_G.GL_FLOAT_VEC2 = gl.FLOAT_VEC2 -_G.GL_BLUE_BITS = gl.BLUE_BITS -_G.GL_VERTEX_SHADER = gl.VERTEX_SHADER -_G.GL_SUBPIXEL_BITS = gl.SUBPIXEL_BITS -_G.GL_STENCIL_WRITEMASK = gl.STENCIL_WRITEMASK -_G.GL_FLOAT_VEC4 = gl.FLOAT_VEC4 -_G.GL_TEXTURE17 = gl.TEXTURE17 -_G.GL_ONE_MINUS_CONSTANT_ALPHA = gl.ONE_MINUS_CONSTANT_ALPHA -_G.GL_TEXTURE15 = gl.TEXTURE15 -_G.GL_TEXTURE14 = gl.TEXTURE14 -_G.GL_TEXTURE13 = gl.TEXTURE13 -_G.GL_SAMPLES = gl.SAMPLES -_G.GL_TEXTURE11 = gl.TEXTURE11 -_G.GL_TEXTURE10 = gl.TEXTURE10 -_G.GL_FUNC_SUBTRACT = gl.FUNC_SUBTRACT -_G.GL_STENCIL_BUFFER_BIT = gl.STENCIL_BUFFER_BIT -_G.GL_TEXTURE19 = gl.TEXTURE19 -_G.GL_TEXTURE18 = gl.TEXTURE18 -_G.GL_NEAREST_MIPMAP_NEAREST = gl.NEAREST_MIPMAP_NEAREST -_G.GL_SHORT = gl.SHORT -_G.GL_RENDERBUFFER_BINDING = gl.RENDERBUFFER_BINDING -_G.GL_REPEAT = gl.REPEAT -_G.GL_TEXTURE_MIN_FILTER = gl.TEXTURE_MIN_FILTER -_G.GL_RED_BITS = gl.RED_BITS -_G.GL_FRONT_FACE = gl.FRONT_FACE -_G.GL_BLEND_COLOR = gl.BLEND_COLOR -_G.GL_MIRRORED_REPEAT = gl.MIRRORED_REPEAT -_G.GL_INT_VEC4 = gl.INT_VEC4 -_G.GL_MAX_CUBE_MAP_TEXTURE_SIZE = gl.MAX_CUBE_MAP_TEXTURE_SIZE -_G.GL_RENDERBUFFER_BLUE_SIZE = gl.RENDERBUFFER_BLUE_SIZE -_G.GL_SAMPLE_COVERAGE = gl.SAMPLE_COVERAGE -_G.GL_SRC_ALPHA = gl.SRC_ALPHA -_G.GL_FUNC_REVERSE_SUBTRACT = gl.FUNC_REVERSE_SUBTRACT -_G.GL_DEPTH_WRITEMASK = gl.DEPTH_WRITEMASK -_G.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT -_G.GL_POLYGON_OFFSET_FILL = gl.POLYGON_OFFSET_FILL -_G.GL_STENCIL_FUNC = gl.STENCIL_FUNC -_G.GL_REPLACE = gl.REPLACE -_G.GL_LUMINANCE_ALPHA = gl.LUMINANCE_ALPHA -_G.GL_DEPTH_RANGE = gl.DEPTH_RANGE -_G.GL_FASTEST = gl.FASTEST -_G.GL_STENCIL_FAIL = gl.STENCIL_FAIL -_G.GL_UNSIGNED_SHORT = gl.UNSIGNED_SHORT -_G.GL_RENDERBUFFER_HEIGHT = gl.RENDERBUFFER_HEIGHT -_G.GL_STENCIL_BACK_FAIL = gl.STENCIL_BACK_FAIL -_G.GL_BLEND_SRC_RGB = gl.BLEND_SRC_RGB -_G.GL_TEXTURE3 = gl.TEXTURE3 -_G.GL_RENDERBUFFER = gl.RENDERBUFFER -_G.GL_RGB5_A1 = gl.RGB5_A1 -_G.GL_RENDERBUFFER_ALPHA_SIZE = gl.RENDERBUFFER_ALPHA_SIZE -_G.GL_RENDERBUFFER_STENCIL_SIZE = gl.RENDERBUFFER_STENCIL_SIZE -_G.GL_NOTEQUAL = gl.NOTEQUAL -_G.GL_BLEND_DST_RGB = gl.BLEND_DST_RGB -_G.GL_FRONT_AND_BACK = gl.FRONT_AND_BACK -_G.GL_TEXTURE_BINDING_CUBE_MAP = gl.TEXTURE_BINDING_CUBE_MAP -_G.GL_MAX_RENDERBUFFER_SIZE = gl.MAX_RENDERBUFFER_SIZE -_G.GL_ZERO = gl.ZERO -_G.GL_TEXTURE0 = gl.TEXTURE0 -_G.GL_SAMPLE_ALPHA_TO_COVERAGE = gl.SAMPLE_ALPHA_TO_COVERAGE -_G.GL_BUFFER_USAGE = gl.BUFFER_USAGE -_G.GL_ACTIVE_TEXTURE = gl.ACTIVE_TEXTURE -_G.GL_BYTE = gl.BYTE -_G.GL_CW = gl.CW -_G.GL_DYNAMIC_DRAW = gl.DYNAMIC_DRAW -_G.GL_RENDERBUFFER_RED_SIZE = gl.RENDERBUFFER_RED_SIZE -_G.GL_FALSE = gl.FALSE -_G.GL_GREATER = gl.GREATER -_G.GL_RGBA4 = gl.RGBA4 -_G.GL_VALIDATE_STATUS = gl.VALIDATE_STATUS -_G.GL_STENCIL_BITS = gl.STENCIL_BITS -_G.GL_RGB = gl.RGB -_G.GL_INT = gl.INT -_G.GL_DEPTH_FUNC = gl.DEPTH_FUNC -_G.GL_SAMPLER_2D = gl.SAMPLER_2D -_G.GL_NICEST = gl.NICEST -_G.GL_MAX_VIEWPORT_DIMS = gl.MAX_VIEWPORT_DIMS -_G.GL_CULL_FACE = gl.CULL_FACE -_G.GL_INT_VEC3 = gl.INT_VEC3 -_G.GL_ALIASED_POINT_SIZE_RANGE = gl.ALIASED_POINT_SIZE_RANGE -_G.GL_INVALID_ENUM = gl.INVALID_ENUM -_G.GL_INVERT = gl.INVERT -_G.GL_CULL_FACE_MODE = gl.CULL_FACE_MODE -_G.GL_TEXTURE8 = gl.TEXTURE8 -_G.GL_VERTEX_ATTRIB_ARRAY_POINTER = gl.VERTEX_ATTRIB_ARRAY_POINTER -_G.GL_TEXTURE_WRAP_S = gl.TEXTURE_WRAP_S -_G.GL_VERTEX_ATTRIB_ARRAY_STRIDE = gl.VERTEX_ATTRIB_ARRAY_STRIDE -_G.GL_LINES = gl.LINES -_G.GL_EQUAL = gl.EQUAL -_G.GL_LINE_LOOP = gl.LINE_LOOP -_G.GL_TEXTURE_WRAP_T = gl.TEXTURE_WRAP_T -_G.GL_DEPTH_BUFFER_BIT = gl.DEPTH_BUFFER_BIT -_G.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS -_G.GL_SHADER_TYPE = gl.SHADER_TYPE -_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME -_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_X = gl.TEXTURE_CUBE_MAP_NEGATIVE_X -_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = gl.TEXTURE_CUBE_MAP_NEGATIVE_Y -_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = gl.TEXTURE_CUBE_MAP_NEGATIVE_Z -_G.GL_DECR = gl.DECR -_G.GL_DELETE_STATUS = gl.DELETE_STATUS -_G.GL_DEPTH_BITS = gl.DEPTH_BITS -_G.GL_INCR = gl.INCR -_G.GL_SAMPLE_COVERAGE_VALUE = gl.SAMPLE_COVERAGE_VALUE -_G.GL_ALPHA_BITS = gl.ALPHA_BITS -_G.GL_FLOAT_MAT2 = gl.FLOAT_MAT2 -_G.GL_LINE_STRIP = gl.LINE_STRIP -_G.GL_SHADER_SOURCE_LENGTH = gl.SHADER_SOURCE_LENGTH -_G.GL_INVALID_VALUE = gl.INVALID_VALUE -_G.GL_NEVER = gl.NEVER -_G.GL_INCR_WRAP = gl.INCR_WRAP -_G.GL_BLEND_EQUATION_ALPHA = gl.BLEND_EQUATION_ALPHA -_G.GL_TEXTURE_MAG_FILTER = gl.TEXTURE_MAG_FILTER -_G.GL_POINTS = gl.POINTS -_G.GL_COLOR_ATTACHMENT0 = gl.COLOR_ATTACHMENT0 -_G.GL_RGBA = gl.RGBA -_G.GL_SRC_ALPHA_SATURATE = gl.SRC_ALPHA_SATURATE -_G.GL_SAMPLER_CUBE = gl.SAMPLER_CUBE -_G.GL_FRAMEBUFFER = gl.FRAMEBUFFER -_G.GL_TEXTURE_CUBE_MAP = gl.TEXTURE_CUBE_MAP -_G.GL_SAMPLE_BUFFERS = gl.SAMPLE_BUFFERS -_G.GL_LINEAR = gl.LINEAR -_G.GL_LINEAR_MIPMAP_NEAREST = gl.LINEAR_MIPMAP_NEAREST -_G.GL_ACTIVE_UNIFORM_MAX_LENGTH = gl.ACTIVE_UNIFORM_MAX_LENGTH -_G.GL_STENCIL_BACK_REF = gl.STENCIL_BACK_REF -_G.GL_ELEMENT_ARRAY_BUFFER = gl.ELEMENT_ARRAY_BUFFER -_G.GL_CLAMP_TO_EDGE = gl.CLAMP_TO_EDGE -_G.GL_TRIANGLE_STRIP = gl.TRIANGLE_STRIP -_G.GL_CONSTANT_COLOR = gl.CONSTANT_COLOR -_G.GL_COMPILE_STATUS = gl.COMPILE_STATUS -_G.GL_RENDERBUFFER_GREEN_SIZE = gl.RENDERBUFFER_GREEN_SIZE -_G.GL_UNSIGNED_INT = gl.UNSIGNED_INT -_G.GL_DEPTH_CLEAR_VALUE = gl.DEPTH_CLEAR_VALUE -_G.GL_ALIASED_LINE_WIDTH_RANGE = gl.ALIASED_LINE_WIDTH_RANGE -_G.GL_SHADING_LANGUAGE_VERSION = gl.SHADING_LANGUAGE_VERSION -_G.GL_FRAMEBUFFER_UNSUPPORTED = gl.FRAMEBUFFER_UNSUPPORTED -_G.GL_INFO_LOG_LENGTH = gl.INFO_LOG_LENGTH -_G.GL_STENCIL_PASS_DEPTH_PASS = gl.STENCIL_PASS_DEPTH_PASS -_G.GL_STENCIL_VALUE_MASK = gl.STENCIL_VALUE_MASK -_G.GL_ALWAYS = gl.ALWAYS -_G.GL_MAX_TEXTURE_SIZE = gl.MAX_TEXTURE_SIZE -_G.GL_FLOAT = gl.FLOAT -_G.GL_FRAMEBUFFER_BINDING = gl.FRAMEBUFFER_BINDING -_G.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT -_G.GL_TRIANGLE_FAN = gl.TRIANGLE_FAN -_G.GL_INVALID_FRAMEBUFFER_OPERATION = gl.INVALID_FRAMEBUFFER_OPERATION -_G.GL_TEXTURE_2D = gl.TEXTURE_2D -_G.GL_ALPHA = gl.ALPHA -_G.GL_CURRENT_VERTEX_ATTRIB = gl.CURRENT_VERTEX_ATTRIB -_G.GL_SCISSOR_TEST = gl.SCISSOR_TEST -_G.GL_TRIANGLES = gl.TRIANGLES diff --git a/cocos/scripting/lua-bindings/script/cocos2d/Opengl.lua b/cocos/scripting/lua-bindings/script/cocos2d/Opengl.lua deleted file mode 100644 index 74655234e8..0000000000 --- a/cocos/scripting/lua-bindings/script/cocos2d/Opengl.lua +++ /dev/null @@ -1,297 +0,0 @@ - -if not gl then return end - ---Create functions -function gl.createTexture() - local retTable = {} - retTable.texture_id = gl._createTexture() - return retTable -end - -function gl.createBuffer() - local retTable = {} - retTable.buffer_id = gl._createBuffer() - return retTable -end - -function gl.createRenderbuffer() - local retTable = {} - retTable.renderbuffer_id = gl._createRenderuffer() - return retTable -end - -function gl.createFramebuffer( ) - local retTable = {} - retTable.framebuffer_id = gl._createFramebuffer() - return retTable -end - -function gl.createProgram() - local retTable = {} - retTable.program_id = gl._createProgram() - return retTable -end - -function gl.createShader(shaderType) - local retTable = {} - retTable.shader_id = gl._createShader(shaderType) - return retTable -end - ---Delete Fun -function gl.deleteTexture(texture) - local texture_id = 0 - if "number" == type(texture) then - texture_id = texture - elseif "table" == type(texture) then - texture_id = texture.texture_id - end - gl._deleteTexture(texture_id) -end - -function gl.deleteBuffer(buffer) - local buffer_id = 0 - if "number" == type(buffer) then - buffer_id = buffer - elseif "table" == type(buffer) then - buffer_id = buffer.buffer_id - end - gl._deleteBuffer(buffer_id) -end - -function gl.deleteRenderbuffer(buffer) - local renderbuffer_id = 0 - if "number" == type(buffer) then - renderbuffer_id = buffer - elseif "table" == type(buffer) then - renderbuffer_id = buffer.renderbuffer_id - end - gl._deleteRenderbuffer(renderbuffer_id) -end - -function gl.deleteFramebuffer(buffer) - local framebuffer_id = 0 - if "number" == type(buffer) then - framebuffer_id = buffer - elseif "table" == type(buffer) then - framebuffer_id = buffer.framebuffer_id - end - gl._deleteFramebuffer(framebuffer_id) -end - -function gl.deleteProgram( program ) - local program_id = 0 - if "number" == type(buffer) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - gl._deleteProgram(program_id) -end - -function gl.deleteShader(shader) - local shader_id = 0 - if "number" == type(shader) then - shader_id = shader - elseif "table" == type(shader) then - shader_id = shader.shader_id - end - - gl._deleteShader(shader_id) -end - ---Bind Related -function gl.bindTexture(target, texture) - local texture_id = 0 - if "number" == type(texture) then - texture_id = texture - elseif "table" == type(texture) then - texture_id = texture.texture_id - end - - gl._bindTexture(target,texture_id) -end - -function gl.bindBuffer( target,buffer ) - local buffer_id = 0 - if "number" == type(buffer) then - buffer_id = buffer - elseif "table" == type(buffer) then - buffer_id = buffer.buffer_id - end - - gl._bindBuffer(target, buffer_id) -end - -function gl.bindRenderBuffer(target, buffer) - local buffer_id = 0 - - if "number" == type(buffer) then - buffer_id = buffer; - elseif "table" == type(buffer) then - buffer_id = buffer.buffer_id - end - - gl._bindRenderbuffer(target, buffer_id) -end - -function gl.bindFramebuffer(target, buffer) - local buffer_id = 0 - - if "number" == type(buffer) then - buffer_id = buffer - elseif "table" == type(buffer) then - buffer_id = buffer.buffer_id - end - - gl._bindFramebuffer(target, buffer_id) -end - ---Uniform related -function gl.getUniform(program, location) - local program_id = 0 - local location_id = 0 - - if "number" == type(program) then - program_id = program - else - program_id = program.program_id - end - - if "number" == type(location) then - location_id = location - else - location_id = location.location_id - end - - return gl._getUniform(program_id, location_id) -end - ---shader related -function gl.compileShader(shader) - gl._compileShader( shader.shader_id) -end - -function gl.shaderSource(shader, source) - gl._shaderSource(shader.shader_id, source) -end - -function gl.getShaderParameter(shader, e) - return gl._getShaderParameter(shader.shader_id,e) -end - -function gl.getShaderInfoLog( shader ) - return gl._getShaderInfoLog(shader.shader_id) -end - ---program related -function gl.attachShader( program, shader ) - local program_id = 0 - - if "number" == type(program) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - gl._attachShader(program_id, shader.shader_id) -end - -function gl.linkProgram( program ) - local program_id = 0 - - if "number" == type(program) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - gl._linkProgram(program_id) -end - -function gl.getProgramParameter(program, e) - local program_id = 0 - - if "number" == type(program) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - return gl._getProgramParameter(program_id, e) -end - -function gl.useProgram(program) - local program_id = 0 - if "number" == type(program) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - gl._useProgram (program_id) -end - -function gl.getAttribLocation(program, name ) - local program_id = 0 - - if "number" == type(program) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - return gl._getAttribLocation(program_id, name) -end - -function gl.getUniformLocation( program, name ) - local program_id = 0 - - if "number" == type(program) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - return gl._getUniformLocation(program_id,name) -end - -function gl.getActiveAttrib( program, index ) - local program_id = 0 - if "number" == type(program) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - return gl._getActiveAttrib(program_id, index); -end - -function gl.getActiveUniform( program, index ) - local program_id = 0 - - if "number" == type(program) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - return gl._getActiveUniform(program_id, index) -end - -function gl.getAttachedShaders(program) - local program_id = 0 - - if "number" == type(program) then - program_id = program - elseif "table" == type(program) then - program_id = program.program_id - end - - return gl._getAttachedShaders(program_id) -end - -function gl.glNodeCreate() - return cc.GLNode:create() -end diff --git a/cocos/scripting/lua-bindings/script/cocos2d/OpenglConstants.lua b/cocos/scripting/lua-bindings/script/cocos2d/OpenglConstants.lua deleted file mode 100644 index 15adb23749..0000000000 --- a/cocos/scripting/lua-bindings/script/cocos2d/OpenglConstants.lua +++ /dev/null @@ -1,826 +0,0 @@ - -if not gl then return end - -gl.GCCSO_SHADER_BINARY_FJ = 0x9260 -gl._3DC_XY_AMD = 0x87fa -gl._3DC_X_AMD = 0x87f9 -gl.ACTIVE_ATTRIBUTES = 0x8b89 -gl.ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8b8a -gl.ACTIVE_PROGRAM_EXT = 0x8259 -gl.ACTIVE_TEXTURE = 0x84e0 -gl.ACTIVE_UNIFORMS = 0x8b86 -gl.ACTIVE_UNIFORM_MAX_LENGTH = 0x8b87 -gl.ALIASED_LINE_WIDTH_RANGE = 0x846e -gl.ALIASED_POINT_SIZE_RANGE = 0x846d -gl.ALL_COMPLETED_NV = 0x84f2 -gl.ALL_SHADER_BITS_EXT = 0xffffffff -gl.ALPHA = 0x1906 -gl.ALPHA16F_EXT = 0x881c -gl.ALPHA32F_EXT = 0x8816 -gl.ALPHA8_EXT = 0x803c -gl.ALPHA8_OES = 0x803c -gl.ALPHA_BITS = 0xd55 -gl.ALPHA_TEST_FUNC_QCOM = 0xbc1 -gl.ALPHA_TEST_QCOM = 0xbc0 -gl.ALPHA_TEST_REF_QCOM = 0xbc2 -gl.ALREADY_SIGNALED_APPLE = 0x911a -gl.ALWAYS = 0x207 -gl.AMD_compressed_3DC_texture = 0x1 -gl.AMD_compressed_ATC_texture = 0x1 -gl.AMD_performance_monitor = 0x1 -gl.AMD_program_binary_Z400 = 0x1 -gl.ANGLE_depth_texture = 0x1 -gl.ANGLE_framebuffer_blit = 0x1 -gl.ANGLE_framebuffer_multisample = 0x1 -gl.ANGLE_instanced_arrays = 0x1 -gl.ANGLE_pack_reverse_row_order = 0x1 -gl.ANGLE_program_binary = 0x1 -gl.ANGLE_texture_compression_dxt3 = 0x1 -gl.ANGLE_texture_compression_dxt5 = 0x1 -gl.ANGLE_texture_usage = 0x1 -gl.ANGLE_translated_shader_source = 0x1 -gl.ANY_SAMPLES_PASSED_CONSERVATIVE_EXT = 0x8d6a -gl.ANY_SAMPLES_PASSED_EXT = 0x8c2f -gl.APPLE_copy_texture_levels = 0x1 -gl.APPLE_framebuffer_multisample = 0x1 -gl.APPLE_rgb_422 = 0x1 -gl.APPLE_sync = 0x1 -gl.APPLE_texture_format_BGRA8888 = 0x1 -gl.APPLE_texture_max_level = 0x1 -gl.ARM_mali_program_binary = 0x1 -gl.ARM_mali_shader_binary = 0x1 -gl.ARM_rgba8 = 0x1 -gl.ARRAY_BUFFER = 0x8892 -gl.ARRAY_BUFFER_BINDING = 0x8894 -gl.ATC_RGBA_EXPLICIT_ALPHA_AMD = 0x8c93 -gl.ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87ee -gl.ATC_RGB_AMD = 0x8c92 -gl.ATTACHED_SHADERS = 0x8b85 -gl.BACK = 0x405 -gl.BGRA8_EXT = 0x93a1 -gl.BGRA_EXT = 0x80e1 -gl.BGRA_IMG = 0x80e1 -gl.BINNING_CONTROL_HINT_QCOM = 0x8fb0 -gl.BLEND = 0xbe2 -gl.BLEND_COLOR = 0x8005 -gl.BLEND_DST_ALPHA = 0x80ca -gl.BLEND_DST_RGB = 0x80c8 -gl.BLEND_EQUATION = 0x8009 -gl.BLEND_EQUATION_ALPHA = 0x883d -gl.BLEND_EQUATION_RGB = 0x8009 -gl.BLEND_SRC_ALPHA = 0x80cb -gl.BLEND_SRC_RGB = 0x80c9 -gl.BLUE_BITS = 0xd54 -gl.BOOL = 0x8b56 -gl.BOOL_VEC2 = 0x8b57 -gl.BOOL_VEC3 = 0x8b58 -gl.BOOL_VEC4 = 0x8b59 -gl.BUFFER = 0x82e0 -gl.BUFFER_ACCESS_OES = 0x88bb -gl.BUFFER_MAPPED_OES = 0x88bc -gl.BUFFER_MAP_POINTER_OES = 0x88bd -gl.BUFFER_OBJECT_EXT = 0x9151 -gl.BUFFER_SIZE = 0x8764 -gl.BUFFER_USAGE = 0x8765 -gl.BYTE = 0x1400 -gl.CCW = 0x901 -gl.CLAMP_TO_BORDER_NV = 0x812d -gl.CLAMP_TO_EDGE = 0x812f -gl.COLOR_ATTACHMENT0 = 0x8ce0 -gl.COLOR_ATTACHMENT0_NV = 0x8ce0 -gl.COLOR_ATTACHMENT10_NV = 0x8cea -gl.COLOR_ATTACHMENT11_NV = 0x8ceb -gl.COLOR_ATTACHMENT12_NV = 0x8cec -gl.COLOR_ATTACHMENT13_NV = 0x8ced -gl.COLOR_ATTACHMENT14_NV = 0x8cee -gl.COLOR_ATTACHMENT15_NV = 0x8cef -gl.COLOR_ATTACHMENT1_NV = 0x8ce1 -gl.COLOR_ATTACHMENT2_NV = 0x8ce2 -gl.COLOR_ATTACHMENT3_NV = 0x8ce3 -gl.COLOR_ATTACHMENT4_NV = 0x8ce4 -gl.COLOR_ATTACHMENT5_NV = 0x8ce5 -gl.COLOR_ATTACHMENT6_NV = 0x8ce6 -gl.COLOR_ATTACHMENT7_NV = 0x8ce7 -gl.COLOR_ATTACHMENT8_NV = 0x8ce8 -gl.COLOR_ATTACHMENT9_NV = 0x8ce9 -gl.COLOR_ATTACHMENT_EXT = 0x90f0 -gl.COLOR_BUFFER_BIT = 0x4000 -gl.COLOR_BUFFER_BIT0_QCOM = 0x1 -gl.COLOR_BUFFER_BIT1_QCOM = 0x2 -gl.COLOR_BUFFER_BIT2_QCOM = 0x4 -gl.COLOR_BUFFER_BIT3_QCOM = 0x8 -gl.COLOR_BUFFER_BIT4_QCOM = 0x10 -gl.COLOR_BUFFER_BIT5_QCOM = 0x20 -gl.COLOR_BUFFER_BIT6_QCOM = 0x40 -gl.COLOR_BUFFER_BIT7_QCOM = 0x80 -gl.COLOR_CLEAR_VALUE = 0xc22 -gl.COLOR_EXT = 0x1800 -gl.COLOR_WRITEMASK = 0xc23 -gl.COMPARE_REF_TO_TEXTURE_EXT = 0x884e -gl.COMPILE_STATUS = 0x8b81 -gl.COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93bb -gl.COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93b8 -gl.COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93b9 -gl.COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93ba -gl.COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93bc -gl.COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93bd -gl.COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93b0 -gl.COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93b1 -gl.COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93b2 -gl.COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93b3 -gl.COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93b4 -gl.COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93b5 -gl.COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93b6 -gl.COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93b7 -gl.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8c03 -gl.COMPRESSED_RGBA_PVRTC_2BPPV2_IMG = 0x9137 -gl.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8c02 -gl.COMPRESSED_RGBA_PVRTC_4BPPV2_IMG = 0x9138 -gl.COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83f1 -gl.COMPRESSED_RGBA_S3TC_DXT3_ANGLE = 0x83f2 -gl.COMPRESSED_RGBA_S3TC_DXT5_ANGLE = 0x83f3 -gl.COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8c01 -gl.COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8c00 -gl.COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83f0 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93db -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93d8 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93d9 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93da -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93dc -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93dd -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93d0 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93d1 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93d2 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93d3 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93d4 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93d5 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93d6 -gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93d7 -gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV = 0x8c4d -gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV = 0x8c4e -gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV = 0x8c4f -gl.COMPRESSED_SRGB_S3TC_DXT1_NV = 0x8c4c -gl.COMPRESSED_TEXTURE_FORMATS = 0x86a3 -gl.CONDITION_SATISFIED_APPLE = 0x911c -gl.CONSTANT_ALPHA = 0x8003 -gl.CONSTANT_COLOR = 0x8001 -gl.CONTEXT_FLAG_DEBUG_BIT = 0x2 -gl.CONTEXT_ROBUST_ACCESS_EXT = 0x90f3 -gl.COUNTER_RANGE_AMD = 0x8bc1 -gl.COUNTER_TYPE_AMD = 0x8bc0 -gl.COVERAGE_ALL_FRAGMENTS_NV = 0x8ed5 -gl.COVERAGE_ATTACHMENT_NV = 0x8ed2 -gl.COVERAGE_AUTOMATIC_NV = 0x8ed7 -gl.COVERAGE_BUFFERS_NV = 0x8ed3 -gl.COVERAGE_BUFFER_BIT_NV = 0x8000 -gl.COVERAGE_COMPONENT4_NV = 0x8ed1 -gl.COVERAGE_COMPONENT_NV = 0x8ed0 -gl.COVERAGE_EDGE_FRAGMENTS_NV = 0x8ed6 -gl.COVERAGE_SAMPLES_NV = 0x8ed4 -gl.CPU_OPTIMIZED_QCOM = 0x8fb1 -gl.CULL_FACE = 0xb44 -gl.CULL_FACE_MODE = 0xb45 -gl.CURRENT_PROGRAM = 0x8b8d -gl.CURRENT_QUERY_EXT = 0x8865 -gl.CURRENT_VERTEX_ATTRIB = 0x8626 -gl.CW = 0x900 -gl.DEBUG_CALLBACK_FUNCTION = 0x8244 -gl.DEBUG_CALLBACK_USER_PARAM = 0x8245 -gl.DEBUG_GROUP_STACK_DEPTH = 0x826d -gl.DEBUG_LOGGED_MESSAGES = 0x9145 -gl.DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243 -gl.DEBUG_OUTPUT = 0x92e0 -gl.DEBUG_OUTPUT_SYNCHRONOUS = 0x8242 -gl.DEBUG_SEVERITY_HIGH = 0x9146 -gl.DEBUG_SEVERITY_LOW = 0x9148 -gl.DEBUG_SEVERITY_MEDIUM = 0x9147 -gl.DEBUG_SEVERITY_NOTIFICATION = 0x826b -gl.DEBUG_SOURCE_API = 0x8246 -gl.DEBUG_SOURCE_APPLICATION = 0x824a -gl.DEBUG_SOURCE_OTHER = 0x824b -gl.DEBUG_SOURCE_SHADER_COMPILER = 0x8248 -gl.DEBUG_SOURCE_THIRD_PARTY = 0x8249 -gl.DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247 -gl.DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824d -gl.DEBUG_TYPE_ERROR = 0x824c -gl.DEBUG_TYPE_MARKER = 0x8268 -gl.DEBUG_TYPE_OTHER = 0x8251 -gl.DEBUG_TYPE_PERFORMANCE = 0x8250 -gl.DEBUG_TYPE_POP_GROUP = 0x826a -gl.DEBUG_TYPE_PORTABILITY = 0x824f -gl.DEBUG_TYPE_PUSH_GROUP = 0x8269 -gl.DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824e -gl.DECR = 0x1e03 -gl.DECR_WRAP = 0x8508 -gl.DELETE_STATUS = 0x8b80 -gl.DEPTH24_STENCIL8_OES = 0x88f0 -gl.DEPTH_ATTACHMENT = 0x8d00 -gl.DEPTH_BITS = 0xd56 -gl.DEPTH_BUFFER_BIT = 0x100 -gl.DEPTH_BUFFER_BIT0_QCOM = 0x100 -gl.DEPTH_BUFFER_BIT1_QCOM = 0x200 -gl.DEPTH_BUFFER_BIT2_QCOM = 0x400 -gl.DEPTH_BUFFER_BIT3_QCOM = 0x800 -gl.DEPTH_BUFFER_BIT4_QCOM = 0x1000 -gl.DEPTH_BUFFER_BIT5_QCOM = 0x2000 -gl.DEPTH_BUFFER_BIT6_QCOM = 0x4000 -gl.DEPTH_BUFFER_BIT7_QCOM = 0x8000 -gl.DEPTH_CLEAR_VALUE = 0xb73 -gl.DEPTH_COMPONENT = 0x1902 -gl.DEPTH_COMPONENT16 = 0x81a5 -gl.DEPTH_COMPONENT16_NONLINEAR_NV = 0x8e2c -gl.DEPTH_COMPONENT16_OES = 0x81a5 -gl.DEPTH_COMPONENT24_OES = 0x81a6 -gl.DEPTH_COMPONENT32_OES = 0x81a7 -gl.DEPTH_EXT = 0x1801 -gl.DEPTH_FUNC = 0xb74 -gl.DEPTH_RANGE = 0xb70 -gl.DEPTH_STENCIL_OES = 0x84f9 -gl.DEPTH_TEST = 0xb71 -gl.DEPTH_WRITEMASK = 0xb72 -gl.DITHER = 0xbd0 -gl.DMP_shader_binary = 0x1 -gl.DONT_CARE = 0x1100 -gl.DRAW_BUFFER0_NV = 0x8825 -gl.DRAW_BUFFER10_NV = 0x882f -gl.DRAW_BUFFER11_NV = 0x8830 -gl.DRAW_BUFFER12_NV = 0x8831 -gl.DRAW_BUFFER13_NV = 0x8832 -gl.DRAW_BUFFER14_NV = 0x8833 -gl.DRAW_BUFFER15_NV = 0x8834 -gl.DRAW_BUFFER1_NV = 0x8826 -gl.DRAW_BUFFER2_NV = 0x8827 -gl.DRAW_BUFFER3_NV = 0x8828 -gl.DRAW_BUFFER4_NV = 0x8829 -gl.DRAW_BUFFER5_NV = 0x882a -gl.DRAW_BUFFER6_NV = 0x882b -gl.DRAW_BUFFER7_NV = 0x882c -gl.DRAW_BUFFER8_NV = 0x882d -gl.DRAW_BUFFER9_NV = 0x882e -gl.DRAW_BUFFER_EXT = 0xc01 -gl.DRAW_FRAMEBUFFER_ANGLE = 0x8ca9 -gl.DRAW_FRAMEBUFFER_APPLE = 0x8ca9 -gl.DRAW_FRAMEBUFFER_BINDING_ANGLE = 0x8ca6 -gl.DRAW_FRAMEBUFFER_BINDING_APPLE = 0x8ca6 -gl.DRAW_FRAMEBUFFER_BINDING_NV = 0x8ca6 -gl.DRAW_FRAMEBUFFER_NV = 0x8ca9 -gl.DST_ALPHA = 0x304 -gl.DST_COLOR = 0x306 -gl.DYNAMIC_DRAW = 0x88e8 -gl.ELEMENT_ARRAY_BUFFER = 0x8893 -gl.ELEMENT_ARRAY_BUFFER_BINDING = 0x8895 -gl.EQUAL = 0x202 -gl.ES_VERSION_2_0 = 0x1 -gl.ETC1_RGB8_OES = 0x8d64 -gl.ETC1_SRGB8_NV = 0x88ee -gl.EXTENSIONS = 0x1f03 -gl.EXT_blend_minmax = 0x1 -gl.EXT_color_buffer_half_float = 0x1 -gl.EXT_debug_label = 0x1 -gl.EXT_debug_marker = 0x1 -gl.EXT_discard_framebuffer = 0x1 -gl.EXT_map_buffer_range = 0x1 -gl.EXT_multi_draw_arrays = 0x1 -gl.EXT_multisampled_render_to_texture = 0x1 -gl.EXT_multiview_draw_buffers = 0x1 -gl.EXT_occlusion_query_boolean = 0x1 -gl.EXT_read_format_bgra = 0x1 -gl.EXT_robustness = 0x1 -gl.EXT_sRGB = 0x1 -gl.EXT_separate_shader_objects = 0x1 -gl.EXT_shader_framebuffer_fetch = 0x1 -gl.EXT_shader_texture_lod = 0x1 -gl.EXT_shadow_samplers = 0x1 -gl.EXT_texture_compression_dxt1 = 0x1 -gl.EXT_texture_filter_anisotropic = 0x1 -gl.EXT_texture_format_BGRA8888 = 0x1 -gl.EXT_texture_rg = 0x1 -gl.EXT_texture_storage = 0x1 -gl.EXT_texture_type_2_10_10_10_REV = 0x1 -gl.EXT_unpack_subimage = 0x1 -gl.FALSE = 0x0 -gl.FASTEST = 0x1101 -gl.FENCE_CONDITION_NV = 0x84f4 -gl.FENCE_STATUS_NV = 0x84f3 -gl.FIXED = 0x140c -gl.FJ_shader_binary_GCCSO = 0x1 -gl.FLOAT = 0x1406 -gl.FLOAT_MAT2 = 0x8b5a -gl.FLOAT_MAT3 = 0x8b5b -gl.FLOAT_MAT4 = 0x8b5c -gl.FLOAT_VEC2 = 0x8b50 -gl.FLOAT_VEC3 = 0x8b51 -gl.FLOAT_VEC4 = 0x8b52 -gl.FRAGMENT_SHADER = 0x8b30 -gl.FRAGMENT_SHADER_BIT_EXT = 0x2 -gl.FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8b8b -gl.FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8a52 -gl.FRAMEBUFFER = 0x8d40 -gl.FRAMEBUFFER_ATTACHMENT_ANGLE = 0x93a3 -gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210 -gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211 -gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8cd1 -gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8cd0 -gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8cd4 -gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8cd3 -gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8cd2 -gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT = 0x8d6c -gl.FRAMEBUFFER_BINDING = 0x8ca6 -gl.FRAMEBUFFER_COMPLETE = 0x8cd5 -gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8cd6 -gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8cd9 -gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8cd7 -gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE = 0x8d56 -gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE = 0x8d56 -gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8d56 -gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG = 0x9134 -gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV = 0x8d56 -gl.FRAMEBUFFER_UNDEFINED_OES = 0x8219 -gl.FRAMEBUFFER_UNSUPPORTED = 0x8cdd -gl.FRONT = 0x404 -gl.FRONT_AND_BACK = 0x408 -gl.FRONT_FACE = 0xb46 -gl.FUNC_ADD = 0x8006 -gl.FUNC_REVERSE_SUBTRACT = 0x800b -gl.FUNC_SUBTRACT = 0x800a -gl.GENERATE_MIPMAP_HINT = 0x8192 -gl.GEQUAL = 0x206 -gl.GPU_OPTIMIZED_QCOM = 0x8fb2 -gl.GREATER = 0x204 -gl.GREEN_BITS = 0xd53 -gl.GUILTY_CONTEXT_RESET_EXT = 0x8253 -gl.HALF_FLOAT_OES = 0x8d61 -gl.HIGH_FLOAT = 0x8df2 -gl.HIGH_INT = 0x8df5 -gl.IMG_multisampled_render_to_texture = 0x1 -gl.IMG_program_binary = 0x1 -gl.IMG_read_format = 0x1 -gl.IMG_shader_binary = 0x1 -gl.IMG_texture_compression_pvrtc = 0x1 -gl.IMG_texture_compression_pvrtc2 = 0x1 -gl.IMPLEMENTATION_COLOR_READ_FORMAT = 0x8b9b -gl.IMPLEMENTATION_COLOR_READ_TYPE = 0x8b9a -gl.INCR = 0x1e02 -gl.INCR_WRAP = 0x8507 -gl.INFO_LOG_LENGTH = 0x8b84 -gl.INNOCENT_CONTEXT_RESET_EXT = 0x8254 -gl.INT = 0x1404 -gl.INT_10_10_10_2_OES = 0x8df7 -gl.INT_VEC2 = 0x8b53 -gl.INT_VEC3 = 0x8b54 -gl.INT_VEC4 = 0x8b55 -gl.INVALID_ENUM = 0x500 -gl.INVALID_FRAMEBUFFER_OPERATION = 0x506 -gl.INVALID_OPERATION = 0x502 -gl.INVALID_VALUE = 0x501 -gl.INVERT = 0x150a -gl.KEEP = 0x1e00 -gl.KHR_debug = 0x1 -gl.KHR_texture_compression_astc_ldr = 0x1 -gl.LEQUAL = 0x203 -gl.LESS = 0x201 -gl.LINEAR = 0x2601 -gl.LINEAR_MIPMAP_LINEAR = 0x2703 -gl.LINEAR_MIPMAP_NEAREST = 0x2701 -gl.LINES = 0x1 -gl.LINE_LOOP = 0x2 -gl.LINE_STRIP = 0x3 -gl.LINE_WIDTH = 0xb21 -gl.LINK_STATUS = 0x8b82 -gl.LOSE_CONTEXT_ON_RESET_EXT = 0x8252 -gl.LOW_FLOAT = 0x8df0 -gl.LOW_INT = 0x8df3 -gl.LUMINANCE = 0x1909 -gl.LUMINANCE16F_EXT = 0x881e -gl.LUMINANCE32F_EXT = 0x8818 -gl.LUMINANCE4_ALPHA4_OES = 0x8043 -gl.LUMINANCE8_ALPHA8_EXT = 0x8045 -gl.LUMINANCE8_ALPHA8_OES = 0x8045 -gl.LUMINANCE8_EXT = 0x8040 -gl.LUMINANCE8_OES = 0x8040 -gl.LUMINANCE_ALPHA = 0x190a -gl.LUMINANCE_ALPHA16F_EXT = 0x881f -gl.LUMINANCE_ALPHA32F_EXT = 0x8819 -gl.MALI_PROGRAM_BINARY_ARM = 0x8f61 -gl.MALI_SHADER_BINARY_ARM = 0x8f60 -gl.MAP_FLUSH_EXPLICIT_BIT_EXT = 0x10 -gl.MAP_INVALIDATE_BUFFER_BIT_EXT = 0x8 -gl.MAP_INVALIDATE_RANGE_BIT_EXT = 0x4 -gl.MAP_READ_BIT_EXT = 0x1 -gl.MAP_UNSYNCHRONIZED_BIT_EXT = 0x20 -gl.MAP_WRITE_BIT_EXT = 0x2 -gl.MAX_3D_TEXTURE_SIZE_OES = 0x8073 -gl.MAX_COLOR_ATTACHMENTS_NV = 0x8cdf -gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8b4d -gl.MAX_CUBE_MAP_TEXTURE_SIZE = 0x851c -gl.MAX_DEBUG_GROUP_STACK_DEPTH = 0x826c -gl.MAX_DEBUG_LOGGED_MESSAGES = 0x9144 -gl.MAX_DEBUG_MESSAGE_LENGTH = 0x9143 -gl.MAX_DRAW_BUFFERS_NV = 0x8824 -gl.MAX_EXT = 0x8008 -gl.MAX_FRAGMENT_UNIFORM_VECTORS = 0x8dfd -gl.MAX_LABEL_LENGTH = 0x82e8 -gl.MAX_MULTIVIEW_BUFFERS_EXT = 0x90f2 -gl.MAX_RENDERBUFFER_SIZE = 0x84e8 -gl.MAX_SAMPLES_ANGLE = 0x8d57 -gl.MAX_SAMPLES_APPLE = 0x8d57 -gl.MAX_SAMPLES_EXT = 0x8d57 -gl.MAX_SAMPLES_IMG = 0x9135 -gl.MAX_SAMPLES_NV = 0x8d57 -gl.MAX_SERVER_WAIT_TIMEOUT_APPLE = 0x9111 -gl.MAX_TEXTURE_IMAGE_UNITS = 0x8872 -gl.MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84ff -gl.MAX_TEXTURE_SIZE = 0xd33 -gl.MAX_VARYING_VECTORS = 0x8dfc -gl.MAX_VERTEX_ATTRIBS = 0x8869 -gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8b4c -gl.MAX_VERTEX_UNIFORM_VECTORS = 0x8dfb -gl.MAX_VIEWPORT_DIMS = 0xd3a -gl.MEDIUM_FLOAT = 0x8df1 -gl.MEDIUM_INT = 0x8df4 -gl.MIN_EXT = 0x8007 -gl.MIRRORED_REPEAT = 0x8370 -gl.MULTISAMPLE_BUFFER_BIT0_QCOM = 0x1000000 -gl.MULTISAMPLE_BUFFER_BIT1_QCOM = 0x2000000 -gl.MULTISAMPLE_BUFFER_BIT2_QCOM = 0x4000000 -gl.MULTISAMPLE_BUFFER_BIT3_QCOM = 0x8000000 -gl.MULTISAMPLE_BUFFER_BIT4_QCOM = 0x10000000 -gl.MULTISAMPLE_BUFFER_BIT5_QCOM = 0x20000000 -gl.MULTISAMPLE_BUFFER_BIT6_QCOM = 0x40000000 -gl.MULTISAMPLE_BUFFER_BIT7_QCOM = 0x80000000 -gl.MULTIVIEW_EXT = 0x90f1 -gl.NEAREST = 0x2600 -gl.NEAREST_MIPMAP_LINEAR = 0x2702 -gl.NEAREST_MIPMAP_NEAREST = 0x2700 -gl.NEVER = 0x200 -gl.NICEST = 0x1102 -gl.NONE = 0x0 -gl.NOTEQUAL = 0x205 -gl.NO_ERROR = 0x0 -gl.NO_RESET_NOTIFICATION_EXT = 0x8261 -gl.NUM_COMPRESSED_TEXTURE_FORMATS = 0x86a2 -gl.NUM_PROGRAM_BINARY_FORMATS_OES = 0x87fe -gl.NUM_SHADER_BINARY_FORMATS = 0x8df9 -gl.NV_coverage_sample = 0x1 -gl.NV_depth_nonlinear = 0x1 -gl.NV_draw_buffers = 0x1 -gl.NV_draw_instanced = 0x1 -gl.NV_fbo_color_attachments = 0x1 -gl.NV_fence = 0x1 -gl.NV_framebuffer_blit = 0x1 -gl.NV_framebuffer_multisample = 0x1 -gl.NV_generate_mipmap_sRGB = 0x1 -gl.NV_instanced_arrays = 0x1 -gl.NV_read_buffer = 0x1 -gl.NV_read_buffer_front = 0x1 -gl.NV_read_depth = 0x1 -gl.NV_read_depth_stencil = 0x1 -gl.NV_read_stencil = 0x1 -gl.NV_sRGB_formats = 0x1 -gl.NV_shadow_samplers_array = 0x1 -gl.NV_shadow_samplers_cube = 0x1 -gl.NV_texture_border_clamp = 0x1 -gl.NV_texture_compression_s3tc_update = 0x1 -gl.NV_texture_npot_2D_mipmap = 0x1 -gl.OBJECT_TYPE_APPLE = 0x9112 -gl.OES_EGL_image = 0x1 -gl.OES_EGL_image_external = 0x1 -gl.OES_compressed_ETC1_RGB8_texture = 0x1 -gl.OES_compressed_paletted_texture = 0x1 -gl.OES_depth24 = 0x1 -gl.OES_depth32 = 0x1 -gl.OES_depth_texture = 0x1 -gl.OES_element_index_uint = 0x1 -gl.OES_fbo_render_mipmap = 0x1 -gl.OES_fragment_precision_high = 0x1 -gl.OES_get_program_binary = 0x1 -gl.OES_mapbuffer = 0x1 -gl.OES_packed_depth_stencil = 0x1 -gl.OES_required_internalformat = 0x1 -gl.OES_rgb8_rgba8 = 0x1 -gl.OES_standard_derivatives = 0x1 -gl.OES_stencil1 = 0x1 -gl.OES_stencil4 = 0x1 -gl.OES_surfaceless_context = 0x1 -gl.OES_texture_3D = 0x1 -gl.OES_texture_float = 0x1 -gl.OES_texture_float_linear = 0x1 -gl.OES_texture_half_float = 0x1 -gl.OES_texture_half_float_linear = 0x1 -gl.OES_texture_npot = 0x1 -gl.OES_vertex_array_object = 0x1 -gl.OES_vertex_half_float = 0x1 -gl.OES_vertex_type_10_10_10_2 = 0x1 -gl.ONE = 0x1 -gl.ONE_MINUS_CONSTANT_ALPHA = 0x8004 -gl.ONE_MINUS_CONSTANT_COLOR = 0x8002 -gl.ONE_MINUS_DST_ALPHA = 0x305 -gl.ONE_MINUS_DST_COLOR = 0x307 -gl.ONE_MINUS_SRC_ALPHA = 0x303 -gl.ONE_MINUS_SRC_COLOR = 0x301 -gl.OUT_OF_MEMORY = 0x505 -gl.PACK_ALIGNMENT = 0xd05 -gl.PACK_REVERSE_ROW_ORDER_ANGLE = 0x93a4 -gl.PALETTE4_R5_G6_B5_OES = 0x8b92 -gl.PALETTE4_RGB5_A1_OES = 0x8b94 -gl.PALETTE4_RGB8_OES = 0x8b90 -gl.PALETTE4_RGBA4_OES = 0x8b93 -gl.PALETTE4_RGBA8_OES = 0x8b91 -gl.PALETTE8_R5_G6_B5_OES = 0x8b97 -gl.PALETTE8_RGB5_A1_OES = 0x8b99 -gl.PALETTE8_RGB8_OES = 0x8b95 -gl.PALETTE8_RGBA4_OES = 0x8b98 -gl.PALETTE8_RGBA8_OES = 0x8b96 -gl.PERCENTAGE_AMD = 0x8bc3 -gl.PERFMON_GLOBAL_MODE_QCOM = 0x8fa0 -gl.PERFMON_RESULT_AMD = 0x8bc6 -gl.PERFMON_RESULT_AVAILABLE_AMD = 0x8bc4 -gl.PERFMON_RESULT_SIZE_AMD = 0x8bc5 -gl.POINTS = 0x0 -gl.POLYGON_OFFSET_FACTOR = 0x8038 -gl.POLYGON_OFFSET_FILL = 0x8037 -gl.POLYGON_OFFSET_UNITS = 0x2a00 -gl.PROGRAM = 0x82e2 -gl.PROGRAM_BINARY_ANGLE = 0x93a6 -gl.PROGRAM_BINARY_FORMATS_OES = 0x87ff -gl.PROGRAM_BINARY_LENGTH_OES = 0x8741 -gl.PROGRAM_OBJECT_EXT = 0x8b40 -gl.PROGRAM_PIPELINE_BINDING_EXT = 0x825a -gl.PROGRAM_PIPELINE_OBJECT_EXT = 0x8a4f -gl.PROGRAM_SEPARABLE_EXT = 0x8258 -gl.QCOM_alpha_test = 0x1 -gl.QCOM_binning_control = 0x1 -gl.QCOM_driver_control = 0x1 -gl.QCOM_extended_get = 0x1 -gl.QCOM_extended_get2 = 0x1 -gl.QCOM_perfmon_global_mode = 0x1 -gl.QCOM_tiled_rendering = 0x1 -gl.QCOM_writeonly_rendering = 0x1 -gl.QUERY = 0x82e3 -gl.QUERY_OBJECT_EXT = 0x9153 -gl.QUERY_RESULT_AVAILABLE_EXT = 0x8867 -gl.QUERY_RESULT_EXT = 0x8866 -gl.R16F_EXT = 0x822d -gl.R32F_EXT = 0x822e -gl.R8_EXT = 0x8229 -gl.READ_BUFFER_EXT = 0xc02 -gl.READ_BUFFER_NV = 0xc02 -gl.READ_FRAMEBUFFER_ANGLE = 0x8ca8 -gl.READ_FRAMEBUFFER_APPLE = 0x8ca8 -gl.READ_FRAMEBUFFER_BINDING_ANGLE = 0x8caa -gl.READ_FRAMEBUFFER_BINDING_APPLE = 0x8caa -gl.READ_FRAMEBUFFER_BINDING_NV = 0x8caa -gl.READ_FRAMEBUFFER_NV = 0x8ca8 -gl.RED_BITS = 0xd52 -gl.RED_EXT = 0x1903 -gl.RENDERBUFFER = 0x8d41 -gl.RENDERBUFFER_ALPHA_SIZE = 0x8d53 -gl.RENDERBUFFER_BINDING = 0x8ca7 -gl.RENDERBUFFER_BLUE_SIZE = 0x8d52 -gl.RENDERBUFFER_DEPTH_SIZE = 0x8d54 -gl.RENDERBUFFER_GREEN_SIZE = 0x8d51 -gl.RENDERBUFFER_HEIGHT = 0x8d43 -gl.RENDERBUFFER_INTERNAL_FORMAT = 0x8d44 -gl.RENDERBUFFER_RED_SIZE = 0x8d50 -gl.RENDERBUFFER_SAMPLES_ANGLE = 0x8cab -gl.RENDERBUFFER_SAMPLES_APPLE = 0x8cab -gl.RENDERBUFFER_SAMPLES_EXT = 0x8cab -gl.RENDERBUFFER_SAMPLES_IMG = 0x9133 -gl.RENDERBUFFER_SAMPLES_NV = 0x8cab -gl.RENDERBUFFER_STENCIL_SIZE = 0x8d55 -gl.RENDERBUFFER_WIDTH = 0x8d42 -gl.RENDERER = 0x1f01 -gl.RENDER_DIRECT_TO_FRAMEBUFFER_QCOM = 0x8fb3 -gl.REPEAT = 0x2901 -gl.REPLACE = 0x1e01 -gl.REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8d68 -gl.RESET_NOTIFICATION_STRATEGY_EXT = 0x8256 -gl.RG16F_EXT = 0x822f -gl.RG32F_EXT = 0x8230 -gl.RG8_EXT = 0x822b -gl.RGB = 0x1907 -gl.RGB10_A2_EXT = 0x8059 -gl.RGB10_EXT = 0x8052 -gl.RGB16F_EXT = 0x881b -gl.RGB32F_EXT = 0x8815 -gl.RGB565 = 0x8d62 -gl.RGB565_OES = 0x8d62 -gl.RGB5_A1 = 0x8057 -gl.RGB5_A1_OES = 0x8057 -gl.RGB8_OES = 0x8051 -gl.RGBA = 0x1908 -gl.RGBA16F_EXT = 0x881a -gl.RGBA32F_EXT = 0x8814 -gl.RGBA4 = 0x8056 -gl.RGBA4_OES = 0x8056 -gl.RGBA8_OES = 0x8058 -gl.RGB_422_APPLE = 0x8a1f -gl.RG_EXT = 0x8227 -gl.SAMPLER = 0x82e6 -gl.SAMPLER_2D = 0x8b5e -gl.SAMPLER_2D_ARRAY_SHADOW_NV = 0x8dc4 -gl.SAMPLER_2D_SHADOW_EXT = 0x8b62 -gl.SAMPLER_3D_OES = 0x8b5f -gl.SAMPLER_CUBE = 0x8b60 -gl.SAMPLER_CUBE_SHADOW_NV = 0x8dc5 -gl.SAMPLER_EXTERNAL_OES = 0x8d66 -gl.SAMPLES = 0x80a9 -gl.SAMPLE_ALPHA_TO_COVERAGE = 0x809e -gl.SAMPLE_BUFFERS = 0x80a8 -gl.SAMPLE_COVERAGE = 0x80a0 -gl.SAMPLE_COVERAGE_INVERT = 0x80ab -gl.SAMPLE_COVERAGE_VALUE = 0x80aa -gl.SCISSOR_BOX = 0xc10 -gl.SCISSOR_TEST = 0xc11 -gl.SGX_BINARY_IMG = 0x8c0a -gl.SGX_PROGRAM_BINARY_IMG = 0x9130 -gl.SHADER = 0x82e1 -gl.SHADER_BINARY_DMP = 0x9250 -gl.SHADER_BINARY_FORMATS = 0x8df8 -gl.SHADER_BINARY_VIV = 0x8fc4 -gl.SHADER_COMPILER = 0x8dfa -gl.SHADER_OBJECT_EXT = 0x8b48 -gl.SHADER_SOURCE_LENGTH = 0x8b88 -gl.SHADER_TYPE = 0x8b4f -gl.SHADING_LANGUAGE_VERSION = 0x8b8c -gl.SHORT = 0x1402 -gl.SIGNALED_APPLE = 0x9119 -gl.SLUMINANCE8_ALPHA8_NV = 0x8c45 -gl.SLUMINANCE8_NV = 0x8c47 -gl.SLUMINANCE_ALPHA_NV = 0x8c44 -gl.SLUMINANCE_NV = 0x8c46 -gl.SRC_ALPHA = 0x302 -gl.SRC_ALPHA_SATURATE = 0x308 -gl.SRC_COLOR = 0x300 -gl.SRGB8_ALPHA8_EXT = 0x8c43 -gl.SRGB8_NV = 0x8c41 -gl.SRGB_ALPHA_EXT = 0x8c42 -gl.SRGB_EXT = 0x8c40 -gl.STACK_OVERFLOW = 0x503 -gl.STACK_UNDERFLOW = 0x504 -gl.STATE_RESTORE = 0x8bdc -gl.STATIC_DRAW = 0x88e4 -gl.STENCIL_ATTACHMENT = 0x8d20 -gl.STENCIL_BACK_FAIL = 0x8801 -gl.STENCIL_BACK_FUNC = 0x8800 -gl.STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802 -gl.STENCIL_BACK_PASS_DEPTH_PASS = 0x8803 -gl.STENCIL_BACK_REF = 0x8ca3 -gl.STENCIL_BACK_VALUE_MASK = 0x8ca4 -gl.STENCIL_BACK_WRITEMASK = 0x8ca5 -gl.STENCIL_BITS = 0xd57 -gl.STENCIL_BUFFER_BIT = 0x400 -gl.STENCIL_BUFFER_BIT0_QCOM = 0x10000 -gl.STENCIL_BUFFER_BIT1_QCOM = 0x20000 -gl.STENCIL_BUFFER_BIT2_QCOM = 0x40000 -gl.STENCIL_BUFFER_BIT3_QCOM = 0x80000 -gl.STENCIL_BUFFER_BIT4_QCOM = 0x100000 -gl.STENCIL_BUFFER_BIT5_QCOM = 0x200000 -gl.STENCIL_BUFFER_BIT6_QCOM = 0x400000 -gl.STENCIL_BUFFER_BIT7_QCOM = 0x800000 -gl.STENCIL_CLEAR_VALUE = 0xb91 -gl.STENCIL_EXT = 0x1802 -gl.STENCIL_FAIL = 0xb94 -gl.STENCIL_FUNC = 0xb92 -gl.STENCIL_INDEX1_OES = 0x8d46 -gl.STENCIL_INDEX4_OES = 0x8d47 -gl.STENCIL_INDEX8 = 0x8d48 -gl.STENCIL_PASS_DEPTH_FAIL = 0xb95 -gl.STENCIL_PASS_DEPTH_PASS = 0xb96 -gl.STENCIL_REF = 0xb97 -gl.STENCIL_TEST = 0xb90 -gl.STENCIL_VALUE_MASK = 0xb93 -gl.STENCIL_WRITEMASK = 0xb98 -gl.STREAM_DRAW = 0x88e0 -gl.SUBPIXEL_BITS = 0xd50 -gl.SYNC_CONDITION_APPLE = 0x9113 -gl.SYNC_FENCE_APPLE = 0x9116 -gl.SYNC_FLAGS_APPLE = 0x9115 -gl.SYNC_FLUSH_COMMANDS_BIT_APPLE = 0x1 -gl.SYNC_GPU_COMMANDS_COMPLETE_APPLE = 0x9117 -gl.SYNC_OBJECT_APPLE = 0x8a53 -gl.SYNC_STATUS_APPLE = 0x9114 -gl.TEXTURE = 0x1702 -gl.TEXTURE0 = 0x84c0 -gl.TEXTURE1 = 0x84c1 -gl.TEXTURE10 = 0x84ca -gl.TEXTURE11 = 0x84cb -gl.TEXTURE12 = 0x84cc -gl.TEXTURE13 = 0x84cd -gl.TEXTURE14 = 0x84ce -gl.TEXTURE15 = 0x84cf -gl.TEXTURE16 = 0x84d0 -gl.TEXTURE17 = 0x84d1 -gl.TEXTURE18 = 0x84d2 -gl.TEXTURE19 = 0x84d3 -gl.TEXTURE2 = 0x84c2 -gl.TEXTURE20 = 0x84d4 -gl.TEXTURE21 = 0x84d5 -gl.TEXTURE22 = 0x84d6 -gl.TEXTURE23 = 0x84d7 -gl.TEXTURE24 = 0x84d8 -gl.TEXTURE25 = 0x84d9 -gl.TEXTURE26 = 0x84da -gl.TEXTURE27 = 0x84db -gl.TEXTURE28 = 0x84dc -gl.TEXTURE29 = 0x84dd -gl.TEXTURE3 = 0x84c3 -gl.TEXTURE30 = 0x84de -gl.TEXTURE31 = 0x84df -gl.TEXTURE4 = 0x84c4 -gl.TEXTURE5 = 0x84c5 -gl.TEXTURE6 = 0x84c6 -gl.TEXTURE7 = 0x84c7 -gl.TEXTURE8 = 0x84c8 -gl.TEXTURE9 = 0x84c9 -gl.TEXTURE_2D = 0xde1 -gl.TEXTURE_3D_OES = 0x806f -gl.TEXTURE_BINDING_2D = 0x8069 -gl.TEXTURE_BINDING_3D_OES = 0x806a -gl.TEXTURE_BINDING_CUBE_MAP = 0x8514 -gl.TEXTURE_BINDING_EXTERNAL_OES = 0x8d67 -gl.TEXTURE_BORDER_COLOR_NV = 0x1004 -gl.TEXTURE_COMPARE_FUNC_EXT = 0x884d -gl.TEXTURE_COMPARE_MODE_EXT = 0x884c -gl.TEXTURE_CUBE_MAP = 0x8513 -gl.TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516 -gl.TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518 -gl.TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851a -gl.TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515 -gl.TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517 -gl.TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519 -gl.TEXTURE_DEPTH_QCOM = 0x8bd4 -gl.TEXTURE_EXTERNAL_OES = 0x8d65 -gl.TEXTURE_FORMAT_QCOM = 0x8bd6 -gl.TEXTURE_HEIGHT_QCOM = 0x8bd3 -gl.TEXTURE_IMAGE_VALID_QCOM = 0x8bd8 -gl.TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912f -gl.TEXTURE_INTERNAL_FORMAT_QCOM = 0x8bd5 -gl.TEXTURE_MAG_FILTER = 0x2800 -gl.TEXTURE_MAX_ANISOTROPY_EXT = 0x84fe -gl.TEXTURE_MAX_LEVEL_APPLE = 0x813d -gl.TEXTURE_MIN_FILTER = 0x2801 -gl.TEXTURE_NUM_LEVELS_QCOM = 0x8bd9 -gl.TEXTURE_OBJECT_VALID_QCOM = 0x8bdb -gl.TEXTURE_SAMPLES_IMG = 0x9136 -gl.TEXTURE_TARGET_QCOM = 0x8bda -gl.TEXTURE_TYPE_QCOM = 0x8bd7 -gl.TEXTURE_USAGE_ANGLE = 0x93a2 -gl.TEXTURE_WIDTH_QCOM = 0x8bd2 -gl.TEXTURE_WRAP_R_OES = 0x8072 -gl.TEXTURE_WRAP_S = 0x2802 -gl.TEXTURE_WRAP_T = 0x2803 -gl.TIMEOUT_EXPIRED_APPLE = 0x911b -gl.TIMEOUT_IGNORED_APPLE = 0xffffffffffffffff -gl.TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE = 0x93a0 -gl.TRIANGLES = 0x4 -gl.TRIANGLE_FAN = 0x6 -gl.TRIANGLE_STRIP = 0x5 -gl.TRUE = 0x1 -gl.UNKNOWN_CONTEXT_RESET_EXT = 0x8255 -gl.UNPACK_ALIGNMENT = 0xcf5 -gl.UNPACK_ROW_LENGTH = 0xcf2 -gl.UNPACK_SKIP_PIXELS = 0xcf4 -gl.UNPACK_SKIP_ROWS = 0xcf3 -gl.UNSIGNALED_APPLE = 0x9118 -gl.UNSIGNED_BYTE = 0x1401 -gl.UNSIGNED_INT = 0x1405 -gl.UNSIGNED_INT64_AMD = 0x8bc2 -gl.UNSIGNED_INT_10_10_10_2_OES = 0x8df6 -gl.UNSIGNED_INT_24_8_OES = 0x84fa -gl.UNSIGNED_INT_2_10_10_10_REV_EXT = 0x8368 -gl.UNSIGNED_NORMALIZED_EXT = 0x8c17 -gl.UNSIGNED_SHORT = 0x1403 -gl.UNSIGNED_SHORT_1_5_5_5_REV_EXT = 0x8366 -gl.UNSIGNED_SHORT_4_4_4_4 = 0x8033 -gl.UNSIGNED_SHORT_4_4_4_4_REV_EXT = 0x8365 -gl.UNSIGNED_SHORT_4_4_4_4_REV_IMG = 0x8365 -gl.UNSIGNED_SHORT_5_5_5_1 = 0x8034 -gl.UNSIGNED_SHORT_5_6_5 = 0x8363 -gl.UNSIGNED_SHORT_8_8_APPLE = 0x85ba -gl.UNSIGNED_SHORT_8_8_REV_APPLE = 0x85bb -gl.VALIDATE_STATUS = 0x8b83 -gl.VENDOR = 0x1f00 -gl.VERSION = 0x1f02 -gl.VERTEX_ARRAY_BINDING_OES = 0x85b5 -gl.VERTEX_ARRAY_OBJECT_EXT = 0x9154 -gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889f -gl.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88fe -gl.VERTEX_ATTRIB_ARRAY_DIVISOR_NV = 0x88fe -gl.VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622 -gl.VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886a -gl.VERTEX_ATTRIB_ARRAY_POINTER = 0x8645 -gl.VERTEX_ATTRIB_ARRAY_SIZE = 0x8623 -gl.VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624 -gl.VERTEX_ATTRIB_ARRAY_TYPE = 0x8625 -gl.VERTEX_SHADER = 0x8b31 -gl.VERTEX_SHADER_BIT_EXT = 0x1 -gl.VIEWPORT = 0xba2 -gl.VIV_shader_binary = 0x1 -gl.WAIT_FAILED_APPLE = 0x911d -gl.WRITEONLY_RENDERING_QCOM = 0x8823 -gl.WRITE_ONLY_OES = 0x88b9 -gl.Z400_BINARY_AMD = 0x8740 -gl.ZERO = 0x0 -gl.VERTEX_ATTRIB_POINTER_VEC3 = 0 -gl.VERTEX_ATTRIB_POINTER_COLOR4B = 1 diff --git a/cocos/scripting/lua-bindings/script/cocosbuilder/CCBReaderLoad.lua b/cocos/scripting/lua-bindings/script/cocosbuilder/CCBReaderLoad.lua deleted file mode 100644 index 30ee404a85..0000000000 --- a/cocos/scripting/lua-bindings/script/cocosbuilder/CCBReaderLoad.lua +++ /dev/null @@ -1,125 +0,0 @@ -if nil == cc.CCBReader then - return -end - -ccb = ccb or {} - -function CCBReaderLoad(strFilePath,proxy,owner) - if nil == proxy then - return nil - end - - local ccbReader = proxy:createCCBReader() - local node = ccbReader:load(strFilePath) - local rootName = "" - --owner set in readCCBFromFile is proxy - if nil ~= owner then - --Callbacks - local ownerCallbackNames = ccbReader:getOwnerCallbackNames() - local ownerCallbackNodes = ccbReader:getOwnerCallbackNodes() - local ownerCallbackControlEvents = ccbReader:getOwnerCallbackControlEvents() - local i = 1 - for i = 1,table.getn(ownerCallbackNames) do - local callbackName = ownerCallbackNames[i] - local callbackNode = tolua.cast(ownerCallbackNodes[i],"cc.Node") - - if "function" == type(owner[callbackName]) then - proxy:setCallback(callbackNode, owner[callbackName], ownerCallbackControlEvents[i]) - else - print("Warning: Cannot find owner's lua function:" .. ":" .. callbackName .. " for ownerVar selector") - end - - end - - --Variables - local ownerOutletNames = ccbReader:getOwnerOutletNames() - local ownerOutletNodes = ccbReader:getOwnerOutletNodes() - - for i = 1, table.getn(ownerOutletNames) do - local outletName = ownerOutletNames[i] - local outletNode = tolua.cast(ownerOutletNodes[i],"cc.Node") - owner[outletName] = outletNode - end - end - - local nodesWithAnimationManagers = ccbReader:getNodesWithAnimationManagers() - local animationManagersForNodes = ccbReader:getAnimationManagersForNodes() - - for i = 1 , table.getn(nodesWithAnimationManagers) do - local innerNode = tolua.cast(nodesWithAnimationManagers[i], "cc.Node") - local animationManager = tolua.cast(animationManagersForNodes[i], "cc.CCBAnimationManager") - local documentControllerName = animationManager:getDocumentControllerName() - if "" == documentControllerName then - - end - if nil ~= ccb[documentControllerName] then - ccb[documentControllerName]["mAnimationManager"] = animationManager - end - - --Callbacks - local documentCallbackNames = animationManager:getDocumentCallbackNames() - local documentCallbackNodes = animationManager:getDocumentCallbackNodes() - local documentCallbackControlEvents = animationManager:getDocumentCallbackControlEvents() - - for i = 1,table.getn(documentCallbackNames) do - local callbackName = documentCallbackNames[i] - local callbackNode = tolua.cast(documentCallbackNodes[i],"cc.Node") - if "" ~= documentControllerName and nil ~= ccb[documentControllerName] then - if "function" == type(ccb[documentControllerName][callbackName]) then - proxy:setCallback(callbackNode, ccb[documentControllerName][callbackName], documentCallbackControlEvents[i]) - else - print("Warning: Cannot found lua function [" .. documentControllerName .. ":" .. callbackName .. "] for docRoot selector") - end - end - end - - --Variables - local documentOutletNames = animationManager:getDocumentOutletNames() - local documentOutletNodes = animationManager:getDocumentOutletNodes() - - for i = 1, table.getn(documentOutletNames) do - local outletName = documentOutletNames[i] - local outletNode = tolua.cast(documentOutletNodes[i],"cc.Node") - - if nil ~= ccb[documentControllerName] then - ccb[documentControllerName][outletName] = tolua.cast(outletNode, proxy:getNodeTypeName(outletNode)) - end - end - --[[ - if (typeof(controller.onDidLoadFromCCB) == "function") - controller.onDidLoadFromCCB(); - ]]-- - --Setup timeline callbacks - local keyframeCallbacks = animationManager:getKeyframeCallbacks() - - for i = 1 , table.getn(keyframeCallbacks) do - local callbackCombine = keyframeCallbacks[i] - local beignIndex,endIndex = string.find(callbackCombine,":") - local callbackType = tonumber(string.sub(callbackCombine,1,beignIndex - 1)) - local callbackName = string.sub(callbackCombine,endIndex + 1, -1) - --Document callback - - if 1 == callbackType and nil ~= ccb[documentControllerName] then - local callfunc = cc.CallFunc:create(ccb[documentControllerName][callbackName]) - animationManager:setCallFuncForLuaCallbackNamed(callfunc, callbackCombine); - elseif 2 == callbackType and nil ~= owner then --Owner callback - local callfunc = cc.CallFunc:create(owner[callbackName])--need check - animationManager:setCallFuncForLuaCallbackNamed(callfunc, callbackCombine) - end - end - --start animation - local autoPlaySeqId = animationManager:getAutoPlaySequenceId() - if -1 ~= autoPlaySeqId then - animationManager:runAnimationsForSequenceIdTweenDuration(autoPlaySeqId, 0) - end - end - - return node -end - - -local function CCBuilderReaderLoad(strFilePath,proxy,owner) - print("\n********** \n".."CCBuilderReaderLoad(strFilePath,proxy,owner)".." was deprecated please use ".. "CCBReaderLoad(strFilePath,proxy,owner)" .. " instead.\n**********") - return CCBReaderLoad(strFilePath,proxy,owner) -end -rawset(_G,"CCBuilderReaderLoad",CCBuilderReaderLoad) \ No newline at end of file diff --git a/cocos/scripting/lua-bindings/script/cocosbuilder/DeprecatedCocosBuilderClass.lua b/cocos/scripting/lua-bindings/script/cocosbuilder/DeprecatedCocosBuilderClass.lua deleted file mode 100644 index aaa66543b7..0000000000 --- a/cocos/scripting/lua-bindings/script/cocosbuilder/DeprecatedCocosBuilderClass.lua +++ /dev/null @@ -1,35 +0,0 @@ -if nil == cc.CCBProxy then - return -end --- This is the DeprecatedCocosBuilderClass - -DeprecatedCocosBuilderClass = {} or DeprecatedCocosBuilderClass - ---tip -local function deprecatedTip(old_name,new_name) - print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********") -end - ---CCBReader class will be Deprecated,begin -function DeprecatedCocosBuilderClass.CCBReader() - deprecatedTip("CCBReader","cc.BReader") - return cc.BReader -end -_G["CCBReader"] = DeprecatedCocosBuilderClass.CCBReader() ---CCBReader class will be Deprecated,end - ---CCBAnimationManager class will be Deprecated,begin -function DeprecatedCocosBuilderClass.CCBAnimationManager() - deprecatedTip("CCBAnimationManager","cc.BAnimationManager") - return cc.BAnimationManager -end -_G["CCBAnimationManager"] = DeprecatedCocosBuilderClass.CCBAnimationManager() ---CCBAnimationManager class will be Deprecated,end - ---CCBProxy class will be Deprecated,begin -function DeprecatedCocosBuilderClass.CCBProxy() - deprecatedTip("CCBProxy","cc.CCBProxy") - return cc.CCBProxy -end -_G["CCBProxy"] = DeprecatedCocosBuilderClass.CCBProxy() ---CCBProxy class will be Deprecated,end diff --git a/cocos/scripting/lua-bindings/script/init.lua b/cocos/scripting/lua-bindings/script/init.lua index 763584ac18..35bfa903c2 100644 --- a/cocos/scripting/lua-bindings/script/init.lua +++ b/cocos/scripting/lua-bindings/script/init.lua @@ -32,9 +32,6 @@ __G__TRACKBACK__ = function(msg) return msg end --- opengl -require "cocos.cocos2d.Opengl" -require "cocos.cocos2d.OpenglConstants" -- audio require "cocos.cocosdenshion.AudioEngine" -- cocosstudio @@ -56,50 +53,41 @@ if nil ~= sp then require "cocos.spine.SpineConstants" end -require "cocos.cocos2d.deprecated" -require "cocos.cocos2d.DrawPrimitives" +-- require "cocos.cocos2d.deprecated" -- Lua extensions require "cocos.cocos2d.bitExtend" -- CCLuaEngine -require "cocos.cocos2d.DeprecatedCocos2dClass" -require "cocos.cocos2d.DeprecatedCocos2dEnum" -require "cocos.cocos2d.DeprecatedCocos2dFunc" -require "cocos.cocos2d.DeprecatedOpenglEnum" +-- require "cocos.cocos2d.DeprecatedCocos2dClass" +-- require "cocos.cocos2d.DeprecatedCocos2dEnum" +-- require "cocos.cocos2d.DeprecatedCocos2dFunc" -- register_cocostudio_module -if nil ~= ccs then - require "cocos.cocostudio.DeprecatedCocoStudioClass" - require "cocos.cocostudio.DeprecatedCocoStudioFunc" -end - - --- register_cocosbuilder_module -require "cocos.cocosbuilder.DeprecatedCocosBuilderClass" +-- if nil ~= ccs then +-- require "cocos.cocostudio.DeprecatedCocoStudioClass" +-- require "cocos.cocostudio.DeprecatedCocoStudioFunc" +-- end -- register_cocosdenshion_module -require "cocos.cocosdenshion.DeprecatedCocosDenshionClass" -require "cocos.cocosdenshion.DeprecatedCocosDenshionFunc" +-- require "cocos.cocosdenshion.DeprecatedCocosDenshionClass" +-- require "cocos.cocosdenshion.DeprecatedCocosDenshionFunc" -- register_extension_module -require "cocos.extension.DeprecatedExtensionClass" -require "cocos.extension.DeprecatedExtensionEnum" -require "cocos.extension.DeprecatedExtensionFunc" +-- require "cocos.extension.DeprecatedExtensionClass" +-- require "cocos.extension.DeprecatedExtensionEnum" +-- require "cocos.extension.DeprecatedExtensionFunc" -- register_network_module -require "cocos.network.DeprecatedNetworkClass" -require "cocos.network.DeprecatedNetworkEnum" -require "cocos.network.DeprecatedNetworkFunc" +-- require "cocos.network.DeprecatedNetworkClass" +-- require "cocos.network.DeprecatedNetworkEnum" +-- require "cocos.network.DeprecatedNetworkFunc" -- register_ui_module -if nil ~= ccui then - require "cocos.ui.DeprecatedUIEnum" - require "cocos.ui.DeprecatedUIFunc" -end - --- cocosbuilder -require "cocos.cocosbuilder.CCBReaderLoad" +-- if nil ~= ccui then +-- require "cocos.ui.DeprecatedUIEnum" +-- require "cocos.ui.DeprecatedUIFunc" +-- end -- physics3d require "cocos.physics3d.physics3d-constants"