Merge branch 'develop' into newRenderer

This commit is contained in:
Ricardo Quesada 2013-12-11 15:28:05 -08:00
commit 6d1abc7d4d
29 changed files with 148 additions and 185 deletions

View File

@ -272,7 +272,7 @@ tImageTGA* tgaLoadBuffer(unsigned char* buffer, long size)
// this is the function to call when we want to load an image
tImageTGA * tgaLoad(const char *filename)
{
long size = 0;
ssize_t size = 0;
unsigned char* buffer = FileUtils::getInstance()->getFileData(filename, "rb", &size);
if (buffer != nullptr)

View File

@ -306,7 +306,7 @@ bool ZipUtils::isCCZFile(const char *path)
// load file into memory
unsigned char* compressed = NULL;
long fileLen = 0;
ssize_t fileLen = 0;
compressed = FileUtils::getInstance()->getFileData(path, "rb", &fileLen);
if(compressed == NULL || fileLen == 0)
@ -321,7 +321,7 @@ bool ZipUtils::isCCZFile(const char *path)
return ret;
}
bool ZipUtils::isCCZBuffer(const unsigned char *buffer, long len)
bool ZipUtils::isCCZBuffer(const unsigned char *buffer, ssize_t len)
{
if (static_cast<size_t>(len) < sizeof(struct CCZHeader))
{
@ -338,7 +338,7 @@ bool ZipUtils::isGZipFile(const char *path)
// load file into memory
unsigned char* compressed = NULL;
long fileLen = 0;
ssize_t fileLen = 0;
compressed = FileUtils::getInstance()->getFileData(path, "rb", &fileLen);
if(NULL == compressed || 0 == fileLen)
@ -352,7 +352,7 @@ bool ZipUtils::isGZipFile(const char *path)
return ret;
}
bool ZipUtils::isGZipBuffer(const unsigned char *buffer, long len)
bool ZipUtils::isGZipBuffer(const unsigned char *buffer, ssize_t len)
{
if (len < 2)
{
@ -461,7 +461,7 @@ int ZipUtils::inflateCCZFile(const char *path, unsigned char **out)
// load file into memory
unsigned char* compressed = NULL;
long fileLen = 0;
ssize_t fileLen = 0;
compressed = FileUtils::getInstance()->getFileData(path, "rb", &fileLen);
if(NULL == compressed || 0 == fileLen)

View File

@ -31,6 +31,9 @@ THE SOFTWARE.
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include "platform/android/CCFileUtilsAndroid.h"
#elif(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
// for import ssize_t on win32 platform
#include "CCStdC.h"
#endif
namespace cocos2d

View File

@ -121,7 +121,7 @@ bool FileUtilsWin32::isAbsolutePath(const std::string& strPath) const
return false;
}
unsigned char* FileUtilsWin32::getFileData(const char* filename, const char* mode, long* size)
unsigned char* FileUtilsWin32::getFileData(const char* filename, const char* mode, ssize_t* size)
{
unsigned char * pBuffer = NULL;
CCASSERT(filename != NULL && size != NULL && mode != NULL, "Invalid parameters.");

View File

@ -58,7 +58,7 @@ protected:
* @return Upon success, a pointer to the data is returned, otherwise NULL.
* @warning Recall: you are responsible for calling delete[] on any Non-NULL pointer returned.
*/
virtual unsigned char* getFileData(const char* filename, const char* mode, long * size) override;
virtual unsigned char* getFileData(const char* filename, const char* mode, ssize_t * size) override;
/**
* Gets full path for filename, resolution directory and search path.

View File

@ -25,6 +25,11 @@ THE SOFTWARE.
#ifndef __CC_STD_C_H__
#define __CC_STD_C_H__
//typedef SSIZE_T ssize_t;
// ssize_t was redefined as int in libwebsockets.h.
// Therefore, to avoid conflict, we needs the same definition.
typedef int ssize_t;
#include "CCPlatformMacros.h"
#include <float.h>

View File

@ -64,7 +64,7 @@ void AutoreleasePool::clear()
int nIndex = _managedObjectArray.size() - 1;
#endif
_managedObjectArray.forEachReverse([](Object* obj){
_managedObjectArray.forEachReverse([&](Object* obj){
--(obj->_autoReleaseCount);
//(*it)->release();
//delete (*it);

View File

@ -51,7 +51,7 @@ public:
reserve(capacity);
}
virtual ~Vector<T>()
~Vector<T>()
{
CCLOGINFO("In the destructor of Vector.");
clear();

View File

@ -218,7 +218,7 @@ Node* CCBReader::readNodeGraphFromFile(const char *pCCBFileName, Object *pOwner,
}
std::string strPath = FileUtils::getInstance()->fullPathForFilename(strCCBFileName.c_str());
long size = 0;
ssize_t size = 0;
unsigned char * pBytes = FileUtils::getInstance()->getFileData(strPath.c_str(), "rb", &size);
Data *data = new Data(pBytes, size);

View File

@ -923,7 +923,7 @@ Node * NodeLoader::parsePropTypeCCBFile(Node * pNode, Node * pParent, CCBReader
// Load sub file
std::string path = FileUtils::getInstance()->fullPathForFilename(ccbFileName.c_str());
long size = 0;
ssize_t size = 0;
unsigned char * pBytes = FileUtils::getInstance()->getFileData(path.c_str(), "rb", &size);
CCBReader * reader = new CCBReader(pCCBReader);

View File

@ -291,7 +291,7 @@ void DataReaderHelper::addDataFromFile(const char *filePath)
size_t startPos = filePathStr.find_last_of(".");
std::string str = &filePathStr[startPos];
long size;
ssize_t size;
std::string fullPath = CCFileUtils::getInstance()->fullPathForFilename(filePath);
char *pFileContent = (char *)CCFileUtils::getInstance()->getFileData(fullPath.c_str() , "r", &size);
@ -391,7 +391,7 @@ void DataReaderHelper::addDataFromFileAsync(const char *imagePath, const char *p
std::string str = &filePathStr[startPos];
std::string fullPath = CCFileUtils::getInstance()->fullPathForFilename(filePath);
long size;
ssize_t size;
// XXX fileContent is being leaked
data->fileContent = (char *)CCFileUtils::getInstance()->getFileData(fullPath.c_str() , "r", &size);

View File

@ -128,7 +128,7 @@ UIWidget* GUIReader::widgetFromJsonFile(const char *fileName)
jsonpath = CCFileUtils::getInstance()->fullPathForFilename(fileName);
int pos = jsonpath.find_last_of('/');
m_strFilePath = jsonpath.substr(0,pos+1);
long size = 0;
ssize_t size = 0;
des = (char*)(CCFileUtils::getInstance()->getFileData(jsonpath.c_str(),"r" , &size));
if(nullptr == des || strcmp(des, "") == 0)
{

View File

@ -47,7 +47,7 @@ namespace cocostudio {
cocos2d::Node* SceneReader::createNodeWithSceneFile(const char* pszFileName)
{
long size = 0;
ssize_t size = 0;
char* pData = 0;
cocos2d::Node *pNode = nullptr;
do
@ -215,7 +215,7 @@ namespace cocostudio {
{
file_path = reDir.substr(0, pos+1);
}
long size = 0;
ssize_t size = 0;
char *des = (char*)(cocos2d::FileUtils::getInstance()->getFileData(pPath.c_str(),"r" , &size));
JsonDictionary *jsonDict = new JsonDictionary();
jsonDict->initWithDescription(des);
@ -285,7 +285,7 @@ namespace cocostudio {
if (nResType == 0)
{
pAttribute = ComAttribute::create();
long size = 0;
ssize_t size = 0;
char* pData = 0;
pData = (char*)(cocos2d::FileUtils::getInstance()->getFileData(pPath.c_str(), "r", &size));
if(pData != nullptr && strcmp(pData, "") != 0)

View File

@ -54,6 +54,11 @@
#ifndef SPINE_EXTENSION_H_
#define SPINE_EXTENSION_H_
// for import ssize_t on win32 platform
#if defined(_MSC_VER)
#include "CCStdC.h"
#endif
/* All allocation uses these. */
#define MALLOC(TYPE,COUNT) ((TYPE*)_malloc(sizeof(TYPE) * COUNT))
#define CALLOC(TYPE,COUNT) ((TYPE*)_calloc(1, sizeof(TYPE) * COUNT))

View File

@ -56,7 +56,6 @@ bool LuaEngine::init(void)
{
_stack = LuaStack::create();
_stack->retain();
extendLuaObject();
executeScriptFile("DeprecatedEnum.lua");
executeScriptFile("DeprecatedClass.lua");
executeScriptFile("Deprecated.lua");
@ -670,56 +669,6 @@ int LuaEngine::handlerControlEvent(void* data)
return ret;
}
void LuaEngine::extendLuaObject()
{
if ( NULL == _stack || NULL == _stack->getLuaState())
return;
lua_State* lua_S = _stack->getLuaState();
extendWebsocket(lua_S);
extendGLNode(lua_S);
_stack->clean();
}
void LuaEngine::extendWebsocket(lua_State* lua_S)
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
if (NULL == lua_S)
return;
lua_pushstring(lua_S,"WebSocket");
lua_rawget(lua_S,LUA_REGISTRYINDEX);
if (lua_istable(lua_S,-1))
{
lua_pushstring(lua_S,"registerScriptHandler");
lua_pushcfunction(lua_S,tolua_Cocos2d_WebSocket_registerScriptHandler00);
lua_rawset(lua_S,-3);
lua_pushstring(lua_S,"unregisterScriptHandler");
lua_pushcfunction(lua_S,tolua_Cocos2d_WebSocket_unregisterScriptHandler00);
lua_rawset(lua_S,-3);
}
#endif
}
void LuaEngine::extendGLNode(lua_State* lua_S)
{
if (NULL == lua_S)
return;
lua_pushstring(lua_S,"GLNode");
lua_rawget(lua_S,LUA_REGISTRYINDEX);
if (lua_istable(lua_S,-1))
{
lua_pushstring(lua_S,"registerScriptDrawHandler");
lua_pushcfunction(lua_S,tolua_Cocos2d_GLNode_registerScriptDrawHandler00);
lua_rawset(lua_S,-3);
lua_pushstring(lua_S,"unregisterScriptDrawHandler");
lua_pushcfunction(lua_S,tolua_Cocos2d_GLNode_unregisterScriptDrawHandler00);
lua_rawset(lua_S,-3);
}
}
int LuaEngine::sendEventReturnArray(ScriptEvent* message,int numResults,Array& resultArray)
{
if (nullptr == message || numResults <= 0)

View File

@ -117,7 +117,6 @@ public:
virtual int sendEvent(ScriptEvent* message);
virtual int sendEventReturnArray(ScriptEvent* message,int numResults,Array& resultArray);
void extendLuaObject();
private:
LuaEngine(void)
: _stack(NULL)
@ -140,8 +139,6 @@ private:
int handleAssetsManagerEvent(void* data);
int handleCocoStudioEventListener(void* data);
int handleArmatureWrapper(void* data);
void extendWebsocket(lua_State* lua_S);
void extendGLNode(lua_State* lua_S);
private:
static LuaEngine* _defaultEngine;
LuaStack *_stack;

View File

@ -150,6 +150,7 @@ bool LuaStack::init(void)
register_all_cocos2dx_extension_manual(_state);
register_all_cocos2dx_manual_deprecated(_state);
register_all_cocos2dx_coco_studio_manual(_state);
register_glnode_manual(_state);
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
LuaObjcBridge::luaopen_luaoc(_state);
#endif
@ -160,6 +161,7 @@ bool LuaStack::init(void)
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
tolua_web_socket_open(_state);
register_web_socket_manual(_state);
#endif
register_xml_http_request(_state);

View File

@ -1 +1 @@
4456a3ba6fbd68175b40e607c6bc19bdfc378ce1
19467d03b8f48f5f1933d53c756dfda6ab9e7126

View File

@ -19,5 +19,6 @@ class GLNode:public cocos2d::Node
TOLUA_API int tolua_Cocos2d_CCDrawNode_drawPolygon00(lua_State* tolua_S);
TOLUA_API int tolua_opengl_open(lua_State* tolua_S);
TOLUA_API int register_glnode_manual(lua_State* tolua_S);
#endif //__LUA_OPENGL_H__

View File

@ -213,110 +213,6 @@ void ScriptHandlerMgr::removeObjectAllHandlers(void* object)
NS_CC_END
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
int tolua_Cocos2d_WebSocket_registerScriptHandler00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"WebSocket",0,&tolua_err) ||
!toluafix_isfunction(tolua_S,2,"LUA_FUNCTION",0,&tolua_err) ||
!tolua_isnumber(tolua_S,3,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
LuaWebSocket* self = (LuaWebSocket*) tolua_tousertype(tolua_S,1,0);
if (NULL != self ) {
int handler = ( toluafix_ref_function(tolua_S,2,0));
ScriptHandlerMgr::HandlerType handlerType = (ScriptHandlerMgr::HandlerType)((int)tolua_tonumber(tolua_S,3,0) + (int)ScriptHandlerMgr::HandlerType::WEBSOCKET_OPEN);
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)self, handler, handlerType);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'registerScriptHandler'.",&tolua_err);
return 0;
#endif
}
int tolua_Cocos2d_WebSocket_unregisterScriptHandler00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"WebSocket",0,&tolua_err) ||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
LuaWebSocket* self = (LuaWebSocket*) tolua_tousertype(tolua_S,1,0);
if (NULL != self ) {
ScriptHandlerMgr::HandlerType handlerType = (ScriptHandlerMgr::HandlerType)((int)tolua_tonumber(tolua_S,2,0) + (int)ScriptHandlerMgr::HandlerType::WEBSOCKET_OPEN);
ScriptHandlerMgr::getInstance()->removeObjectHandler((void*)self, handlerType);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'unregisterScriptHandler'.",&tolua_err);
return 0;
#endif
}
#endif
int tolua_Cocos2d_GLNode_registerScriptDrawHandler00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (!tolua_isusertype(tolua_S,1,"GLNode",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !toluafix_isfunction(tolua_S,2,"LUA_FUNCTION",0,&tolua_err)) ||
!tolua_isnoobj(tolua_S,3,&tolua_err))
goto tolua_lerror;
else
#endif
{
GLNode* glNode = (GLNode*) tolua_tousertype(tolua_S,1,0);
LUA_FUNCTION handler = ( toluafix_ref_function(tolua_S,2,0));
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)glNode, handler, ScriptHandlerMgr::HandlerType::GL_NODE_DRAW);
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'registerScriptDrawHandler'.",&tolua_err);
return 0;
#endif
}
int tolua_Cocos2d_GLNode_unregisterScriptDrawHandler00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (!tolua_isusertype(tolua_S,1,"GLNode",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err))
goto tolua_lerror;
else
#endif
{
GLNode* glNode = (GLNode*)tolua_tousertype(tolua_S,1,0);
ScriptHandlerMgr::getInstance()->removeObjectHandler((void*)glNode,ScriptHandlerMgr::HandlerType::GL_NODE_DRAW);
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'unregisterScriptDrawHandler'.",&tolua_err);
return 0;
#endif
}
static void tolua_reg_script_handler_mgr_type(lua_State* tolua_S)
{

View File

@ -134,11 +134,6 @@ private:
NS_CC_END
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
TOLUA_API int tolua_Cocos2d_WebSocket_registerScriptHandler00(lua_State* tolua_S);
TOLUA_API int tolua_Cocos2d_WebSocket_unregisterScriptHandler00(lua_State* tolua_S);
#endif
TOLUA_API int tolua_Cocos2d_GLNode_registerScriptDrawHandler00(lua_State* tolua_S);
TOLUA_API int tolua_Cocos2d_GLNode_unregisterScriptDrawHandler00(lua_State* tolua_S);

View File

@ -368,4 +368,82 @@ TOLUA_API int tolua_web_socket_open(lua_State* tolua_S){
return 1;
}
int tolua_Cocos2d_WebSocket_registerScriptHandler00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"WebSocket",0,&tolua_err) ||
!toluafix_isfunction(tolua_S,2,"LUA_FUNCTION",0,&tolua_err) ||
!tolua_isnumber(tolua_S,3,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
LuaWebSocket* self = (LuaWebSocket*) tolua_tousertype(tolua_S,1,0);
if (NULL != self ) {
int handler = ( toluafix_ref_function(tolua_S,2,0));
ScriptHandlerMgr::HandlerType handlerType = (ScriptHandlerMgr::HandlerType)((int)tolua_tonumber(tolua_S,3,0) + (int)ScriptHandlerMgr::HandlerType::WEBSOCKET_OPEN);
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)self, handler, handlerType);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'registerScriptHandler'.",&tolua_err);
return 0;
#endif
}
int tolua_Cocos2d_WebSocket_unregisterScriptHandler00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"WebSocket",0,&tolua_err) ||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
LuaWebSocket* self = (LuaWebSocket*) tolua_tousertype(tolua_S,1,0);
if (NULL != self ) {
ScriptHandlerMgr::HandlerType handlerType = (ScriptHandlerMgr::HandlerType)((int)tolua_tonumber(tolua_S,2,0) + (int)ScriptHandlerMgr::HandlerType::WEBSOCKET_OPEN);
ScriptHandlerMgr::getInstance()->removeObjectHandler((void*)self, handlerType);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'unregisterScriptHandler'.",&tolua_err);
return 0;
#endif
}
TOLUA_API int register_web_socket_manual(lua_State* tolua_S)
{
if (nullptr == tolua_S)
return 0 ;
lua_pushstring(tolua_S,"WebSocket");
lua_rawget(tolua_S,LUA_REGISTRYINDEX);
if (lua_istable(tolua_S,-1))
{
lua_pushstring(tolua_S,"registerScriptHandler");
lua_pushcfunction(tolua_S,tolua_Cocos2d_WebSocket_registerScriptHandler00);
lua_rawset(tolua_S,-3);
lua_pushstring(tolua_S,"unregisterScriptHandler");
lua_pushcfunction(tolua_S,tolua_Cocos2d_WebSocket_unregisterScriptHandler00);
lua_rawset(tolua_S,-3);
}
lua_pop(tolua_S, 1);
return 1;
}
#endif//(CC_TARGET_PLATFORM == CC_PLATFORM_IOS ...

View File

@ -31,6 +31,7 @@ public:
};
TOLUA_API int tolua_web_socket_open(lua_State* tolua_S);
TOLUA_API int register_web_socket_manual(lua_State* tolua_S);
#endif //(CC_TARGET_PLATFORM == CC_PLATFORM_IOS ...

View File

@ -130,6 +130,7 @@ static void extendUIWidget(lua_State* L)
{
tolua_function(L, "addTouchEventListener", lua_cocos2dx_UIWidget_addTouchEventListener);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_UICheckBox_addEventListenerCheckBox(lua_State* L)
@ -198,6 +199,7 @@ static void extendUICheckBox(lua_State* L)
{
tolua_function(L, "addEventListenerCheckBox", lua_cocos2dx_UICheckBox_addEventListenerCheckBox);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_UISlider_addEventListenerSlider(lua_State* L)
@ -266,6 +268,7 @@ static void extendUISlider(lua_State* L)
{
tolua_function(L, "addEventListenerSlider", lua_cocos2dx_UISlider_addEventListenerSlider);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_UITextField_addEventListenerTextField(lua_State* L)
@ -334,6 +337,7 @@ static void extendUITextField(lua_State* L)
{
tolua_function(L, "addEventListenerTextField", lua_cocos2dx_UITextField_addEventListenerTextField);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_UIPageView_addEventListenerPageView(lua_State* L)
@ -402,6 +406,7 @@ static void extendUIPageView(lua_State* L)
{
tolua_function(L, "addEventListenerPageView", lua_cocos2dx_UIPageView_addEventListenerPageView);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_UIListView_addEventListenerListView(lua_State* L)
@ -470,6 +475,7 @@ static void extendUIListView(lua_State* L)
{
tolua_function(L, "addEventListenerListView", lua_cocos2dx_UIListView_addEventListenerListView);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_UILayoutParameter_setMargin(lua_State* L)
@ -608,6 +614,7 @@ static void extendLayoutParameter(lua_State* L)
tolua_function(L, "setMargin", lua_cocos2dx_UILayoutParameter_setMargin);
tolua_function(L, "getMargin", lua_cocos2dx_UILayoutParameter_getMargin);
}
lua_pop(L, 1);
}
class LuaArmatureWrapper:public Object
@ -806,6 +813,7 @@ static void extendArmatureAnimation(lua_State* L)
tolua_function(L, "setMovementEventCallFunc", lua_cocos2dx_ArmatureAnimation_setMovementEventCallFunc);
tolua_function(L, "setFrameEventCallFunc", lua_cocos2dx_ArmatureAnimation_setFrameEventCallFunc);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_ArmatureDataManager_addArmatureFileInfoAsyncCallFunc(lua_State* L)
@ -896,6 +904,7 @@ static void extendArmatureDataManager(lua_State* L)
{
tolua_function(L, "addArmatureFileInfoAsync", lua_cocos2dx_ArmatureDataManager_addArmatureFileInfoAsyncCallFunc);
}
lua_pop(L, 1);
}
int register_all_cocos2dx_coco_studio_manual(lua_State* L)

View File

@ -1991,6 +1991,7 @@ static void extendAnimationDeprecated(lua_State* tolua_S)
lua_pushcfunction(tolua_S,tolua_cocos2d_Animation_createWithSpriteFrames_deprecated01);
lua_rawset(tolua_S,-3);
}
lua_pop(tolua_S, 1);
}
static int tolua_cocos2d_Sequence_createWithTwoActions(lua_State* tolua_S)
@ -2058,6 +2059,7 @@ static int extendSequenceDeprecated(lua_State* tolua_S)
tolua_function(tolua_S, "createWithTwoActions",tolua_cocos2d_Sequence_createWithTwoActions);
tolua_function(tolua_S, "create", tolua_Cocos2d_Sequence_create_deprecated00);
}
lua_pop(tolua_S, 1);
return 1;
}
@ -2159,7 +2161,7 @@ static int extendSpawnDeprecated(lua_State* tolua_S)
{
tolua_function(tolua_S, "createWithTwoActions", tolua_cocos2d_Spawn_createWithTwoActions_deprcated00);
}
lua_pop(tolua_S, 1);
return 1;
}
@ -2264,7 +2266,7 @@ static int extendMenuDeprecated(lua_State* tolua_S)
tolua_function(tolua_S, "alignItemsInColumnsWithArray", tolua_cocos2d_Menu_alignItemsInColumnsWithArray00);
tolua_function(tolua_S, "alignItemsInRowsWithArray", tolua_cocos2d_Menu_alignItemsInRowsWithArray00);
}
lua_pop(tolua_S, 1);
return 1;
}
@ -2306,6 +2308,7 @@ static int extendLayerMultiplexDeprecated(lua_State* tolua_S)
{
tolua_function(tolua_S, "createWithArray", tolua_cocos2d_LayerMultiplex_createWithArray00);
}
lua_pop(tolua_S, 1);
return 1;
}

View File

@ -212,6 +212,7 @@ static void extendScrollView(lua_State* tolua_S)
lua_pushcfunction(tolua_S,tolua_cocos2d_ScrollView_unregisterScriptHandler );
lua_rawset(tolua_S,-3);
}
lua_pop(tolua_S, 1);
}
static int tolua_cocos2d_Control_registerControlEventHandler(lua_State* tolua_S)
@ -336,6 +337,7 @@ static void extendControl(lua_State* tolua_S)
lua_pushcfunction(tolua_S,tolua_cocos2d_control_unregisterControlEventHandler );
lua_rawset(tolua_S,-3);
}
lua_pop(tolua_S, 1);
}
static int tolua_cocos2d_EditBox_registerScriptEditBoxHandler(lua_State* tolua_S)
@ -440,6 +442,7 @@ static void extendEditBox(lua_State* tolua_S)
lua_pushcfunction(tolua_S,tolua_cocos2d_EditBox_unregisterScriptEditBoxHandler );
lua_rawset(tolua_S,-3);
}
lua_pop(tolua_S, 1);
}
static int tolua_cocos2d_CCBProxy_create(lua_State* tolua_S)
@ -786,6 +789,7 @@ static void extendCCBReader(lua_State* tolua_S)
lua_pushcfunction(tolua_S,tolua_cocos2d_CCBReader_load );
lua_rawset(tolua_S,-3);
}
lua_pop(tolua_S, 1);
}
@ -852,6 +856,7 @@ static void extendCCBAnimationManager(lua_State* tolua_S)
lua_pushcfunction(tolua_S,tolua_cocos2d_CCBAnimationManager_setCallFuncForLuaCallbackNamed );
lua_rawset(tolua_S,-3);
}
lua_pop(tolua_S, 1);
}
#define KEY_TABLEVIEW_DATA_SOURCE "TableViewDataSource"
@ -1328,6 +1333,7 @@ static void extendTableView(lua_State* L)
tolua_function(L, "registerScriptHandler", lua_cocos2d_TableView_registerScriptHandler);
tolua_function(L, "unregisterScriptHandler", lua_cocos2d_TableView_unregisterScriptHandler);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_extension_Bone_setIgnoreMovementBoneData(lua_State* L)
@ -1424,6 +1430,7 @@ static void extendBone(lua_State* L)
tolua_function(L, "setIgnoreMovementBoneData", lua_cocos2dx_extension_Bone_setIgnoreMovementBoneData);
tolua_function(L, "getIgnoreMovementBoneData", lua_cocos2dx_extension_Bone_getIgnoreMovementBoneData);
}
lua_pop(L, 1);
}
class LuaAssetsManagerDelegateProtocol:public Object, public AssetsManagerDelegateProtocol
@ -1540,6 +1547,7 @@ static void extendAssetsManager(lua_State* L)
{
tolua_function(L, "setDelegate", lua_cocos2dx_AssetsManager_setDelegate);
}
lua_pop(L, 1);
}
int register_all_cocos2dx_extension_manual(lua_State* tolua_S)

View File

@ -1 +1 @@
71bf75a1f1e308193a359970e79f9b939e2541f4
c1e3182aeb1023c573f64314788fbccb8da2de43

View File

@ -138,6 +138,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\websockets\prebuilt\win32\*.*" "$
<ClCompile Include="..\Classes\ChipmunkTest\ChipmunkTest.cpp" />
<ClCompile Include="..\Classes\ClippingNodeTest\ClippingNodeTest.cpp" />
<ClCompile Include="..\Classes\ConfigurationTest\ConfigurationTest.cpp" />
<ClCompile Include="..\Classes\ConsoleTest\ConsoleTest.cpp" />
<ClCompile Include="..\Classes\DataVisitorTest\DataVisitorTest.cpp" />
<ClCompile Include="..\Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest\AnimationsTestLayer.cpp" />
<ClCompile Include="..\Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest\TimelineCallbackTestLayer.cpp" />
@ -278,6 +279,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\websockets\prebuilt\win32\*.*" "$
<ClInclude Include="..\Classes\ChipmunkTest\ChipmunkTest.h" />
<ClInclude Include="..\Classes\ClippingNodeTest\ClippingNodeTest.h" />
<ClInclude Include="..\Classes\ConfigurationTest\ConfigurationTest.h" />
<ClInclude Include="..\Classes\ConsoleTest\ConsoleTest.h" />
<ClInclude Include="..\Classes\DataVisitorTest\DataVisitorTest.h" />
<ClInclude Include="..\Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest\AnimationsLayerLoader.h" />
<ClInclude Include="..\Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest\AnimationsTestLayer.h" />

View File

@ -304,6 +304,9 @@
<Filter Include="Classes\InputTest">
<UniqueIdentifier>{8e8124bd-adb2-4a8f-8727-9868a9c42d80}</UniqueIdentifier>
</Filter>
<Filter Include="Classes\ConsoleTest">
<UniqueIdentifier>{709f8a27-ecc2-4fe2-abd2-f13da4b70fe8}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
@ -703,6 +706,9 @@
<ClCompile Include="..\Classes\InputTest\MouseTest.cpp">
<Filter>Classes\InputTest</Filter>
</ClCompile>
<ClCompile Include="..\Classes\ConsoleTest\ConsoleTest.cpp">
<Filter>Classes\ConsoleTest</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="main.h">
@ -1294,5 +1300,8 @@
<ClInclude Include="..\Classes\Box2DTestBed\Tests\MotorJoint.h">
<Filter>Classes\Box2DTestBed\Tests</Filter>
</ClInclude>
<ClInclude Include="..\Classes\ConsoleTest\ConsoleTest.h">
<Filter>Classes\ConsoleTest</Filter>
</ClInclude>
</ItemGroup>
</Project>