make hello lua work

This commit is contained in:
minggo 2019-02-28 11:17:05 +08:00 committed by GitHub
parent 7fd82997ef
commit a6be522601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 6192 additions and 20700 deletions

View File

@ -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)

View File

@ -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 */,

View File

@ -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 */,

View File

@ -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);

View File

@ -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>(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>(object));
}
void __Array::setObject(Ref* object, int index)
{
data[index] = RCPtr<Object>(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<Clonable*>(obj);
if (clonable)
{
tmpObj = dynamic_cast<Ref*>(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<int>(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<int>(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<ssize_t>(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<Clonable*>(obj);
if (clonable)
{
tmpObj = dynamic_cast<Ref*>(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

View File

@ -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 <vector>
#include <algorithm>
#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<elementType>(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<elementType>(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<RCPtr<Object>>::iterator iterator;
typedef std::vector<RCPtr<Object>>::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<RCPtr<Object>> 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__

View File

@ -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__ */

View File

@ -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 += "<array>\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 += "</array>";
}
void PrettyPrinter::visit(const __Dictionary *p)
{
_result += "\n";
_result += _indentStr;
_result += "<dict>\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 += "</dict>";
}
void PrettyPrinter::visit(const __Set *p)
{
_result += "\n";
_result += _indentStr;
_result += "<set>\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 += "</set>\n";
}
void PrettyPrinter::setIndentLevel(int indentLevel)
{
_indentLevel = indentLevel;
_indentStr.clear();
for (int i = 0; i < _indentLevel; ++i) {
_indentStr += "\t";
}
}
NS_CC_END

View File

@ -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 <string>
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__

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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 <type_traits>
#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<int>(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<int>(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<Clonable*>(element->getObject());
if (obj)
{
tmpObj = dynamic_cast<Ref*>(obj->clone());
if (tmpObj)
{
newDict->setObject(tmpObj, element->getIntKey());
}
}
else
{
CCLOGWARN("%s isn't clonable.", typeid(std::remove_pointer<decltype(element->getObject())>::type).name());
}
}
}
else if (_dictType == kDictStr)
{
DictElement* tmp = nullptr;
HASH_ITER(hh, _elements, element, tmp)
{
obj = dynamic_cast<Clonable*>(element->getObject());
if (obj)
{
tmpObj = dynamic_cast<Ref*>(obj->clone());
if (tmpObj)
{
newDict->setObject(tmpObj, element->getStrKey());
}
}
else
{
CCLOGWARN("%s isn't clonable.", typeid(std::remove_pointer<decltype(element->getObject())>::type).name());
}
}
}
return newDict;
}
NS_CC_END

View File

@ -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<Sprite*>(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<String*>(pDict->objectForKey("key1"));
* log("{ key1: %s }", pStr1->getCString());
* Integer* pInteger = static_cast<Integer*>(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<String*>(pDict->objectForKey("key1"));
* // Do something about pStr.
* // If you don't know the object type, properly you need to use dynamic_cast<SomeType*> to check it.
* String* pStr2 = dynamic_cast<String*>(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__ */

View File

@ -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__ */

View File

@ -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__ */

View File

@ -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__ */

View File

@ -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 <string>
#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<NotificationObserver*>(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<NotificationObserver *>(obj);
if (!observer)
continue;
if (observer->getTarget() == target)
{
toRemove->addObject(observer);
}
}
_observers->removeObjectsInArray(toRemove);
return static_cast<int>(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<NotificationObserver*>(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<NotificationObserver*>(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<NotificationObserver*>(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

View File

@ -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__

View File

@ -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<Ref *>;
}
__Set::__Set(const __Set &other)
{
_set = new (std::nothrow) set<Ref *>(*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

View File

@ -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 <set>
#include "base/CCRef.h"
#include "scripting/deprecated/CCDataVisitor.h"
NS_CC_BEGIN
/**
* @addtogroup data_structures
* @{
*/
typedef std::set<Ref *>::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<Ref *> *_set;
};
// end of data_structure group
/// @}
NS_CC_END
/// @endcond
#endif // __CC_SET_H__

View File

@ -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 <stdlib.h>
#include <stdio.h>
#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<int>(_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<const __String*>(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

View File

@ -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 <string.h>
#endif
#include <stdarg.h>
#include <string>
#include <functional>
#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<bool(__String *, __String *)> {
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__

View File

@ -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
)

View File

@ -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})

View File

@ -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<cocos2d::GLProgramState>(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<cocos2d::Sprite3DMaterial>(tolua_S, "cc.Sprite3DMaterial",(cocos2d::Sprite3DMaterial*)ret);
// cocos2d::Sprite3DMaterial* ret = cocos2d::Sprite3DMaterial::createWithGLStateProgram(arg0);
// object_to_luaval<cocos2d::Sprite3DMaterial>(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);

File diff suppressed because it is too large Load Diff

View File

@ -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__

View File

@ -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;

View File

@ -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"

View File

@ -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

View File

@ -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);

View File

@ -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"

View File

@ -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<std::string, std::string> g_luaType;
std::unordered_map<std::string, std::string> 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);
}

View File

@ -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);

File diff suppressed because it is too large Load Diff

View File

@ -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;

View File

@ -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);

View File

@ -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<Label*>(pNode)) {
return "cc.Label";
}
if (NULL != dynamic_cast<Sprite*>(pNode)) {
return "cc.Sprite";
}
if (NULL != dynamic_cast<ControlButton*>(pNode)) {
return "cc.ControlButton";
}
if (NULL != dynamic_cast<LayerGradient*>(pNode)) {
return "cc.LayerGradient";
}
if (NULL != dynamic_cast<LayerColor*>(pNode)) {
return "cc.LayerColor";
}
if (NULL != dynamic_cast<ui::Scale9Sprite*>(pNode)) {
return "ccui.Scale9Sprite";
}
if (NULL != dynamic_cast<Menu*>(pNode)) {
return "cc.Menu";
}
if (NULL != dynamic_cast<MenuItemAtlasFont*>(pNode)) {
return "cc.MenuItemAtlasFont";
}
if (NULL != dynamic_cast<MenuItemFont*>(pNode)) {
return "cc.MenuItemFont";
}
if (NULL != dynamic_cast<MenuItemLabel*>(pNode)) {
return "cc.MenuItemLabel";
}
if (NULL != dynamic_cast<MenuItemImage*>(pNode)) {
return "cc.MenuItemImage";
}
if (NULL != dynamic_cast<MenuItemToggle*>(pNode)) {
return "cc.MenuItemToggle";
}
if (NULL != dynamic_cast<MenuItemSprite*>(pNode)) {
return "cc.MenuItemSprite";
}
if (NULL != dynamic_cast<MenuItem*>(pNode)) {
return "cc.MenuItem";
}
if (NULL != dynamic_cast<Layer*>(pNode)) {
return "cc.Layer";
}
if (NULL != dynamic_cast<__String*>(pNode)) {
return "cc.String";
}
if (NULL != dynamic_cast<ParticleSystemQuad*>(pNode)) {
return "cc.ParticleSystemQuad";
}
return "No Support";
}
void CCBProxy::setCallback(Node* node,int handle, int controlEvents)
{
if (nullptr == node) {
return;
}
if (nullptr != dynamic_cast<MenuItem*>(node))
{
MenuItem *menuItem = dynamic_cast<MenuItem*>(node);
if (nullptr != menuItem) {
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)menuItem, handle, ScriptHandlerMgr::HandlerType::MENU_CLICKED);
}
}
else if (NULL != dynamic_cast<Control*>(node))
{
Control* control = dynamic_cast<Control*>(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);
}
}
}
}
}

View File

@ -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_

View File

@ -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<CCBProxy*>(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<CCBProxy*>(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<CCBProxy*>(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<Node*>(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<CCBProxy*>(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<CCBReader*>(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<Ref*>(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<CCBAnimationManager*>(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<CallFunc*>(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;
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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 },

View File

@ -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;
}

View File

@ -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 = "<group>"; };
15B5754D1A6F4D1500041C20 /* lua-cocos-studio-conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "lua-cocos-studio-conversions.cpp"; sourceTree = "<group>"; };
15B5754E1A6F4D1500041C20 /* lua-cocos-studio-conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "lua-cocos-studio-conversions.h"; sourceTree = "<group>"; };
15C1BCC019864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosbuilder_auto.cpp; sourceTree = "<group>"; };
15C1BCC119864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_cocosbuilder_auto.hpp; sourceTree = "<group>"; };
15C1BCC219864D8700A46ACC /* lua_cocos2dx_cocosdenshion_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosdenshion_auto.cpp; sourceTree = "<group>"; };
15C1BCC319864D8700A46ACC /* lua_cocos2dx_cocosdenshion_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_cocosdenshion_auto.hpp; sourceTree = "<group>"; };
15C1BCD31986525900A46ACC /* lua_cocos2dx_deprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_deprecated.cpp; sourceTree = "<group>"; };
15C1BCD41986525900A46ACC /* lua_cocos2dx_deprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_deprecated.h; sourceTree = "<group>"; };
@ -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 = "<group>"; };
15C1BCDB1986525900A46ACC /* LuaScriptHandlerMgr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LuaScriptHandlerMgr.cpp; sourceTree = "<group>"; };
15C1BCDC1986525900A46ACC /* LuaScriptHandlerMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LuaScriptHandlerMgr.h; sourceTree = "<group>"; };
15C1BCF21986526C00A46ACC /* CCBProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBProxy.cpp; sourceTree = "<group>"; };
15C1BCF31986526C00A46ACC /* CCBProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBProxy.h; sourceTree = "<group>"; };
15C1BCF41986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosbuilder_manual.cpp; sourceTree = "<group>"; };
15C1BCF51986526C00A46ACC /* lua_cocos2dx_cocosbuilder_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_cocosbuilder_manual.h; sourceTree = "<group>"; };
15C1BCFE1986526C00A46ACC /* lua_cocos2dx_extension_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_extension_manual.cpp; sourceTree = "<group>"; };
15C1BCFF1986526C00A46ACC /* lua_cocos2dx_extension_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_extension_manual.h; sourceTree = "<group>"; };
15C1BD011986526C00A46ACC /* lua_extensions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lua_extensions.c; sourceTree = "<group>"; };
@ -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 = "<group>"; };
15C1C24B1987473200A46ACC /* lua_cocos2dx_experimental_video_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_experimental_video_manual.cpp; sourceTree = "<group>"; };
15C1C24C1987473200A46ACC /* lua_cocos2dx_experimental_video_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_experimental_video_manual.hpp; sourceTree = "<group>"; };
15C1C24F198747E400A46ACC /* LuaOpengl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LuaOpengl.cpp; sourceTree = "<group>"; };
15C1C250198747E400A46ACC /* LuaOpengl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LuaOpengl.h; sourceTree = "<group>"; };
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 = "<group>"; };
15C9A10D1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_experimental_webview_auto.hpp; sourceTree = "<group>"; };
@ -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 = "<group>"; };
3E2BDB0819C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_audioengine_manual.cpp; sourceTree = "<group>"; };
3E2BDB0919C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_audioengine_manual.h; sourceTree = "<group>"; };
46624633222678D70008FC75 /* CCDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDictionary.h; sourceTree = "<group>"; };
46624634222678D70008FC75 /* CCDouble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDouble.h; sourceTree = "<group>"; };
46624635222678D70008FC75 /* CCBool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBool.h; sourceTree = "<group>"; };
46624636222678D70008FC75 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
46624637222678D70008FC75 /* CCSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSet.cpp; sourceTree = "<group>"; };
46624638222678D70008FC75 /* CCDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDeprecated.h; sourceTree = "<group>"; };
46624639222678D70008FC75 /* CCNotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNotificationCenter.h; sourceTree = "<group>"; };
4662463A222678D70008FC75 /* CCString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCString.cpp; sourceTree = "<group>"; };
4662463B222678D70008FC75 /* CCString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCString.h; sourceTree = "<group>"; };
4662463C222678D70008FC75 /* CCFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFloat.h; sourceTree = "<group>"; };
4662463D222678D70008FC75 /* CCDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDictionary.cpp; sourceTree = "<group>"; };
4662463E222678D70008FC75 /* CCSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSet.h; sourceTree = "<group>"; };
4662463F222678D70008FC75 /* CCDeprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDeprecated.cpp; sourceTree = "<group>"; };
46624640222678D70008FC75 /* CCNotificationCenter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNotificationCenter.cpp; sourceTree = "<group>"; };
46624641222678D70008FC75 /* CCInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCInteger.h; sourceTree = "<group>"; };
46624642222678D70008FC75 /* CCArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArray.cpp; sourceTree = "<group>"; };
46624643222678D70008FC75 /* CCArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArray.h; sourceTree = "<group>"; };
46624664222679D60008FC75 /* CCDataVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCDataVisitor.cpp; sourceTree = "<group>"; };
46624665222679D60008FC75 /* CCDataVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDataVisitor.h; sourceTree = "<group>"; };
4662466B2227720E0008FC75 /* lua_cocos2dx_cocosdenshion_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosdenshion_auto.cpp; sourceTree = "<group>"; };
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 = "<group>"; };
566F015E19B5EB0F00FCA620 /* CustomGUIReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomGUIReader.h; sourceTree = "<group>"; };
@ -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 = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
/* 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 */,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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"