Update experimental lua bindings、related test cases and project setting

This commit is contained in:
samuele3hu 2014-07-17 14:54:34 +08:00
parent ab0fe54d32
commit e975b0d5f9
15 changed files with 281 additions and 134 deletions

View File

@ -23,6 +23,7 @@ LOCAL_SRC_FILES := manual/CCLuaBridge.cpp \
manual/lua_cocos2dx_ui_manual.cpp \
manual/lua_cocos2dx_spine_manual.cpp \
manual/lua_cocos2dx_physics_manual.cpp \
manual/lua_cocos2dx_experimental_manual.cpp \
manual/lua_cocos2dx_experimental_video_manual.cpp \
manual/lua_cocos2dx_deprecated.cpp \
manual/lua_xml_http_request.cpp \
@ -36,6 +37,7 @@ LOCAL_SRC_FILES := manual/CCLuaBridge.cpp \
auto/lua_cocos2dx_ui_auto.cpp \
auto/lua_cocos2dx_spine_auto.cpp \
auto/lua_cocos2dx_physics_auto.cpp \
auto/lua_cocos2dx_experimental_auto.cpp \
auto/lua_cocos2dx_experimental_video_auto.cpp \
../../../external/lua/tolua/tolua_event.c \
../../../external/lua/tolua/tolua_is.c \

View File

@ -5,6 +5,7 @@ set(LUABINDING_SRC
auto/lua_cocos2dx_ui_auto.cpp
auto/lua_cocos2dx_spine_auto.cpp
auto/lua_cocos2dx_physics_auto.cpp
auto/lua_cocos2dx_experimental_auto.cpp
manual/tolua_fix.cpp
manual/CCLuaBridge.cpp
manual/CCLuaEngine.cpp
@ -24,6 +25,7 @@ set(LUABINDING_SRC
manual/lua_cocos2dx_deprecated.cpp
manual/lua_xml_http_request.cpp
manual/LuaSkeletonAnimation.cpp
manual/lua_cocos2dx_experimental_manual.cpp
)
include_directories(

View File

@ -73,6 +73,10 @@ extern "C" {
#include "lua_cocos2dx_ui_manual.hpp"
#include "lua_cocos2dx_experimental_auto.hpp"
#include "lua_cocos2dx_experimental_manual.hpp"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include "lua_cocos2dx_experimental_video_auto.hpp"
#include "lua_cocos2dx_experimental_video_manual.hpp"
#endif
namespace {
int lua_print(lua_State * luastate)
@ -182,10 +186,12 @@ bool LuaStack::init(void)
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
LuaObjcBridge::luaopen_luaoc(_state);
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
register_all_cocos2dx_experimental(_state);
register_all_cocos2dx_experimental_manual(_state);
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
register_all_cocos2dx_experimental_video(_state);
register_all_cocos2dx_experimental_video_manual(_state);
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)

View File

@ -1,83 +1,14 @@
#include "lua_cocos2dx_experimental_manual.hpp"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "UIVideoPlayer.h"
#include "tolua_fix.h"
#include "LuaBasicConversions.h"
#include "CCLuaValue.h"
#include "CCLuaEngine.h"
static int lua_cocos2dx_experimental_video_VideoPlayer_addEventListener(lua_State* L)
{
int argc = 0;
cocos2d::experimental::ui::VideoPlayer* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(L,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
#endif
self = static_cast<cocos2d::experimental::ui::VideoPlayer*>(tolua_tousertype(L,1,0));
#if COCOS2D_DEBUG >= 1
if (nullptr == self) {
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_Widget_addTouchEventListener'\n", nullptr);
return 0;
}
#endif
argc = lua_gettop(L) - 1;
if (argc == 1)
{
#if COCOS2D_DEBUG >= 1
if (!toluafix_isfunction(L,2,"LUA_FUNCTION",0,&tolua_err))
{
goto tolua_lerror;
}
#endif
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
self->addEventListener([=](cocos2d::Ref* ref, cocos2d::experimental::ui::VideoPlayer::EventType eventType){
LuaStack* stack = LuaEngine::getInstance()->getLuaStack();
stack->pushObject(ref, "cc.Ref");
stack->pushInt((int)eventType);
stack->executeFunctionByHandler(handler, 2);
});
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "addEventListener",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L, "#ferror in function 'lua_cocos2dx_experimental_VideoPlayer_addEventListener'.", &tolua_err);
#endif
return 0;
}
static void extendVideoPlayer(lua_State* L)
{
lua_pushstring(L, "ccexp.VideoPlayer");
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_istable(L,-1))
{
tolua_function(L, "addEventListener", lua_cocos2dx_experimental_video_VideoPlayer_addEventListener);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_experimental_FastTMXLayer_getTileGIDAt(lua_State* tolua_S)
static int lua_cocos2dx_experimental_TMXLayer_getTileGIDAt(lua_State* tolua_S)
{
int argc = 0;
cocos2d::experimental::FastTMXLayer* cobj = nullptr;
cocos2d::experimental::TMXLayer* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
@ -89,12 +20,12 @@ static int lua_cocos2dx_experimental_FastTMXLayer_getTileGIDAt(lua_State* tolua_
if (!tolua_isusertype(tolua_S,1,"ccexp.FastTMXLayer",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::experimental::FastTMXLayer*)tolua_tousertype(tolua_S,1,0);
cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_FastTMXLayer_getTileGIDAt'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_TMXLayer_getTileGIDAt'", nullptr);
return 0;
}
#endif
@ -133,19 +64,19 @@ static int lua_cocos2dx_experimental_FastTMXLayer_getTileGIDAt(lua_State* tolua_
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_FastTMXLayer_getTileGIDAt'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_TMXLayer_getTileGIDAt'.",&tolua_err);
#endif
return 0;
}
static void extendFastTMXLayer(lua_State* tolua_S)
static void extendExperimentalTMXLayer(lua_State* tolua_S)
{
lua_pushstring(tolua_S, "ccexp.FastTMXLayer");
lua_pushstring(tolua_S, "ccexp.TMXLayer");
lua_rawget(tolua_S, LUA_REGISTRYINDEX);
if (lua_istable(tolua_S,-1))
{
tolua_function(tolua_S, "getTileGIDAt", lua_cocos2dx_experimental_FastTMXLayer_getTileGIDAt);
tolua_function(tolua_S, "getTileGIDAt", lua_cocos2dx_experimental_TMXLayer_getTileGIDAt);
}
lua_pop(tolua_S, 1);
}
@ -155,10 +86,8 @@ int register_all_cocos2dx_experimental_manual(lua_State* L)
if (nullptr == L)
return 0;
extendVideoPlayer(L);
extendFastTMXLayer(L);
extendExperimentalTMXLayer(L);
return 0;
}
#endif

View File

@ -22,7 +22,6 @@
THE SOFTWARE.
****************************************************************************/
#include "base/ccConfig.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_EXPERIMENTAL_MANUAL_H
#define COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_EXPERIMENTAL_MANUAL_H
@ -38,4 +37,3 @@ extern "C" {
TOLUA_API int register_all_cocos2dx_experimental_manual(lua_State* L);
#endif //#ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_EXPERIMENTAL_MANUAL_H
#endif //#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)

View File

@ -0,0 +1,87 @@
#include "lua_cocos2dx_experimental_video_manual.hpp"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "UIVideoPlayer.h"
#include "tolua_fix.h"
#include "LuaBasicConversions.h"
#include "CCLuaValue.h"
#include "CCLuaEngine.h"
static int lua_cocos2dx_experimental_video_VideoPlayer_addEventListener(lua_State* L)
{
int argc = 0;
cocos2d::experimental::ui::VideoPlayer* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(L,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
#endif
self = static_cast<cocos2d::experimental::ui::VideoPlayer*>(tolua_tousertype(L,1,0));
#if COCOS2D_DEBUG >= 1
if (nullptr == self) {
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_Widget_addTouchEventListener'\n", nullptr);
return 0;
}
#endif
argc = lua_gettop(L) - 1;
if (argc == 1)
{
#if COCOS2D_DEBUG >= 1
if (!toluafix_isfunction(L,2,"LUA_FUNCTION",0,&tolua_err))
{
goto tolua_lerror;
}
#endif
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
self->addEventListener([=](cocos2d::Ref* ref, cocos2d::experimental::ui::VideoPlayer::EventType eventType){
LuaStack* stack = LuaEngine::getInstance()->getLuaStack();
stack->pushObject(ref, "cc.Ref");
stack->pushInt((int)eventType);
stack->executeFunctionByHandler(handler, 2);
});
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "addEventListener",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L, "#ferror in function 'lua_cocos2dx_experimental_VideoPlayer_addEventListener'.", &tolua_err);
#endif
return 0;
}
static void extendVideoPlayer(lua_State* L)
{
lua_pushstring(L, "ccexp.VideoPlayer");
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_istable(L,-1))
{
tolua_function(L, "addEventListener", lua_cocos2dx_experimental_video_VideoPlayer_addEventListener);
}
lua_pop(L, 1);
}
int register_all_cocos2dx_experimental_video_manual(lua_State* L)
{
if (nullptr == L)
return 0;
extendVideoPlayer(L);
return 0;
}
#endif

View File

@ -0,0 +1,41 @@
/****************************************************************************
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "base/ccConfig.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_EXPERIMENTAL_VIDEO_MANUAL_H
#define COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_EXPERIMENTAL_VIDEO_MANUAL_H
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
TOLUA_API int register_all_cocos2dx_experimental_video_manual(lua_State* L);
#endif //#ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_EXPERIMENTAL_VIDEO_MANUAL_H
#endif //#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)

View File

@ -21,12 +21,16 @@
1540AF5A193EC30500717D8E /* xxtea.h in Headers */ = {isa = PBXBuildFile; fileRef = 1540AF56193EC30500717D8E /* xxtea.h */; };
15622969197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */; };
1562296A197780DE009C9067 /* lua_cocos2dx_experimental_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15622968197780DE009C9067 /* lua_cocos2dx_experimental_auto.hpp */; };
1562296D19778153009C9067 /* lua_cocos2dx_controller_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1562296B19778153009C9067 /* lua_cocos2dx_controller_auto.cpp */; };
1562296E19778153009C9067 /* lua_cocos2dx_controller_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1562296C19778153009C9067 /* lua_cocos2dx_controller_auto.hpp */; };
1562297319778209009C9067 /* lua_cocos2dx_controller_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1562296F19778209009C9067 /* lua_cocos2dx_controller_manual.cpp */; };
1562297419778209009C9067 /* lua_cocos2dx_controller_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1562297019778209009C9067 /* lua_cocos2dx_controller_manual.hpp */; };
1562297519778209009C9067 /* lua_cocos2dx_experimental_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1562297119778209009C9067 /* lua_cocos2dx_experimental_manual.cpp */; };
1562297619778209009C9067 /* lua_cocos2dx_experimental_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1562297219778209009C9067 /* lua_cocos2dx_experimental_manual.hpp */; };
156EADF31977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 156EADF11977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.cpp */; };
156EADF41977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 156EADF21977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.hpp */; };
156EADF51977A2BF00F53709 /* lua_cocos2dx_experimental_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */; };
156EADF61977A2C200F53709 /* lua_cocos2dx_experimental_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15622968197780DE009C9067 /* lua_cocos2dx_experimental_auto.hpp */; };
156EADF91977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 156EADF71977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.cpp */; };
156EADFA1977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 156EADF81977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.hpp */; };
156EADFB1977A3A300F53709 /* lua_cocos2dx_experimental_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1562297119778209009C9067 /* lua_cocos2dx_experimental_manual.cpp */; };
156EADFC1977A3A500F53709 /* lua_cocos2dx_experimental_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1562297219778209009C9067 /* lua_cocos2dx_experimental_manual.hpp */; };
1A262AB818BEEF5900D2DB92 /* tolua_fix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A262AB718BEEF5900D2DB92 /* tolua_fix.cpp */; };
1A262AB918BEEF5900D2DB92 /* tolua_fix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A262AB718BEEF5900D2DB92 /* tolua_fix.cpp */; };
1AACE7B518BC45C200215002 /* lua_cocos2dx_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74918BC45C200215002 /* lua_cocos2dx_auto.cpp */; };
@ -231,12 +235,12 @@
1540AF56193EC30500717D8E /* xxtea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xxtea.h; sourceTree = "<group>"; };
15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_experimental_auto.cpp; sourceTree = "<group>"; };
15622968197780DE009C9067 /* lua_cocos2dx_experimental_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_experimental_auto.hpp; sourceTree = "<group>"; };
1562296B19778153009C9067 /* lua_cocos2dx_controller_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_controller_auto.cpp; sourceTree = "<group>"; };
1562296C19778153009C9067 /* lua_cocos2dx_controller_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_controller_auto.hpp; sourceTree = "<group>"; };
1562296F19778209009C9067 /* lua_cocos2dx_controller_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_controller_manual.cpp; sourceTree = "<group>"; };
1562297019778209009C9067 /* lua_cocos2dx_controller_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_controller_manual.hpp; sourceTree = "<group>"; };
1562297119778209009C9067 /* lua_cocos2dx_experimental_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_experimental_manual.cpp; sourceTree = "<group>"; };
1562297219778209009C9067 /* lua_cocos2dx_experimental_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_experimental_manual.hpp; sourceTree = "<group>"; };
156EADF11977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_experimental_video_auto.cpp; sourceTree = "<group>"; };
156EADF21977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_experimental_video_auto.hpp; sourceTree = "<group>"; };
156EADF71977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_experimental_video_manual.cpp; sourceTree = "<group>"; };
156EADF81977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_experimental_video_manual.hpp; sourceTree = "<group>"; };
1A262AB718BEEF5900D2DB92 /* tolua_fix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tolua_fix.cpp; sourceTree = "<group>"; };
1AACE74618BC45A000215002 /* libluabindings Mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libluabindings Mac.a"; sourceTree = BUILT_PRODUCTS_DIR; };
1AACE74718BC45A000215002 /* libluabindings iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libluabindings iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@ -385,8 +389,8 @@
1AACE74818BC45C200215002 /* auto */ = {
isa = PBXGroup;
children = (
1562296B19778153009C9067 /* lua_cocos2dx_controller_auto.cpp */,
1562296C19778153009C9067 /* lua_cocos2dx_controller_auto.hpp */,
156EADF11977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.cpp */,
156EADF21977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.hpp */,
15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */,
15622968197780DE009C9067 /* lua_cocos2dx_experimental_auto.hpp */,
2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */,
@ -409,8 +413,8 @@
1AACE75B18BC45C200215002 /* manual */ = {
isa = PBXGroup;
children = (
1562296F19778209009C9067 /* lua_cocos2dx_controller_manual.cpp */,
1562297019778209009C9067 /* lua_cocos2dx_controller_manual.hpp */,
156EADF71977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.cpp */,
156EADF81977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.hpp */,
1562297119778209009C9067 /* lua_cocos2dx_experimental_manual.cpp */,
1562297219778209009C9067 /* lua_cocos2dx_experimental_manual.hpp */,
2905FAD418CF143800240AA3 /* lua_cocos2dx_ui_manual.cpp */,
@ -619,9 +623,9 @@
1AACE83218BC45C200215002 /* CCLuaObjcBridge.h in Headers */,
1562297619778209009C9067 /* lua_cocos2dx_experimental_manual.hpp in Headers */,
1AACE82418BC45C200215002 /* LuaScriptHandlerMgr.h in Headers */,
1562297419778209009C9067 /* lua_cocos2dx_controller_manual.hpp in Headers */,
1AACE7FC18BC45C200215002 /* lua_cocos2dx_extension_manual.h in Headers */,
2905FAD318CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp in Headers */,
156EADF41977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.hpp in Headers */,
1AACE7EC18BC45C200215002 /* CCLuaValue.h in Headers */,
2905FAD918CF143800240AA3 /* lua_cocos2dx_ui_manual.hpp in Headers */,
1AACE80C18BC45C200215002 /* lua_cocos2dx_spine_manual.hpp in Headers */,
@ -640,9 +644,9 @@
1AACE7F818BC45C200215002 /* lua_cocos2dx_deprecated.h in Headers */,
1ABCA24C18CD8F7D0087CE3A /* mime.h in Headers */,
1ABCA1ED18CD8F470087CE3A /* lua.h in Headers */,
1562296E19778153009C9067 /* lua_cocos2dx_controller_auto.hpp in Headers */,
1AACE7F418BC45C200215002 /* lua_cocos2dx_coco_studio_manual.hpp in Headers */,
1ABCA26818CD8F7D0087CE3A /* udp.h in Headers */,
156EADFA1977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.hpp in Headers */,
1ABCA25418CD8F7D0087CE3A /* select.h in Headers */,
1AACE7D618BC45C200215002 /* lua_cocos2dx_studio_auto.hpp in Headers */,
);
@ -671,6 +675,8 @@
1AACE7CF18BC45C200215002 /* lua_cocos2dx_spine_auto.hpp in Headers */,
1ABCA1EA18CD8F470087CE3A /* lauxlib.h in Headers */,
1AACE80F18BC45C200215002 /* lua_extensions.h in Headers */,
156EADF61977A2C200F53709 /* lua_cocos2dx_experimental_auto.hpp in Headers */,
156EADFC1977A3A500F53709 /* lua_cocos2dx_experimental_manual.hpp in Headers */,
1AACE81F18BC45C200215002 /* LuaOpengl.h in Headers */,
1503FAA318DA8A1C00F6518C /* buffer.h in Headers */,
1ABCA25F18CD8F7D0087CE3A /* tcp.h in Headers */,
@ -780,7 +786,6 @@
15622969197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp in Sources */,
1ABCA20518CD8F6E0087CE3A /* tolua_is.c in Sources */,
1AACE7F618BC45C200215002 /* lua_cocos2dx_deprecated.cpp in Sources */,
1562296D19778153009C9067 /* lua_cocos2dx_controller_auto.cpp in Sources */,
1ABCA24E18CD8F7D0087CE3A /* options.c in Sources */,
1A262AB918BEEF5900D2DB92 /* tolua_fix.cpp in Sources */,
1AACE81E18BC45C200215002 /* LuaOpengl.cpp in Sources */,
@ -811,10 +816,10 @@
1AACE81A18BC45C200215002 /* LuaBasicConversions.cpp in Sources */,
1AACE7EE18BC45C200215002 /* Cocos2dxLuaLoader.cpp in Sources */,
1AACE7DA18BC45C200215002 /* CCBProxy.cpp in Sources */,
156EADF91977A39F00F53709 /* lua_cocos2dx_experimental_video_manual.cpp in Sources */,
1AACE81618BC45C200215002 /* lua_xml_http_request.cpp in Sources */,
1ABCA23A18CD8F7D0087CE3A /* inet.c in Sources */,
2905FAD118CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp in Sources */,
1562297319778209009C9067 /* lua_cocos2dx_controller_manual.cpp in Sources */,
1AACE7E218BC45C200215002 /* CCLuaEngine.cpp in Sources */,
1ABCA26E18CD8F7D0087CE3A /* usocket.c in Sources */,
1AACE81218BC45C200215002 /* Lua_web_socket.cpp in Sources */,
@ -822,6 +827,7 @@
1AACE7DE18BC45C200215002 /* CCLuaBridge.cpp in Sources */,
1ABCA23218CD8F7D0087CE3A /* auxiliar.c in Sources */,
1ABCA20118CD8F6E0087CE3A /* tolua_event.c in Sources */,
156EADF31977A2BA00F53709 /* lua_cocos2dx_experimental_video_auto.cpp in Sources */,
C0FEF4D718BE0E70001F446C /* lua_debugger.c in Sources */,
1AACE7E618BC45C200215002 /* CCLuaStack.cpp in Sources */,
1AACE80618BC45C200215002 /* lua_cocos2dx_physics_manual.cpp in Sources */,
@ -860,6 +866,7 @@
1503FAA118DA8A1C00F6518C /* buffer.c in Sources */,
1AACE80D18BC45C200215002 /* lua_extensions.c in Sources */,
1AACE7E918BC45C200215002 /* CCLuaValue.cpp in Sources */,
156EADF51977A2BF00F53709 /* lua_cocos2dx_experimental_auto.cpp in Sources */,
1AACE7D318BC45C200215002 /* lua_cocos2dx_studio_auto.cpp in Sources */,
1AACE7BB18BC45C200215002 /* lua_cocos2dx_extension_auto.cpp in Sources */,
1ABCA20818CD8F6E0087CE3A /* tolua_push.c in Sources */,
@ -876,6 +883,7 @@
1ABCA26D18CD8F7D0087CE3A /* usocket.c in Sources */,
1AACE81118BC45C200215002 /* Lua_web_socket.cpp in Sources */,
1AACE7F918BC45C200215002 /* lua_cocos2dx_extension_manual.cpp in Sources */,
156EADFB1977A3A300F53709 /* lua_cocos2dx_experimental_manual.cpp in Sources */,
1AACE7DD18BC45C200215002 /* CCLuaBridge.cpp in Sources */,
1ABCA23118CD8F7D0087CE3A /* auxiliar.c in Sources */,
1ABCA20018CD8F6E0087CE3A /* tolua_event.c in Sources */,

View File

@ -31,6 +31,7 @@
<ClCompile Include="..\..\..\..\external\lua\tolua\tolua_to.c" />
<ClCompile Include="..\..\..\..\external\xxtea\xxtea.cpp" />
<ClCompile Include="..\auto\lua_cocos2dx_auto.cpp" />
<ClCompile Include="..\auto\lua_cocos2dx_experimental_auto.cpp" />
<ClCompile Include="..\auto\lua_cocos2dx_extension_auto.cpp" />
<ClCompile Include="..\auto\lua_cocos2dx_physics_auto.cpp" />
<ClCompile Include="..\auto\lua_cocos2dx_spine_auto.cpp" />
@ -48,6 +49,7 @@
<ClCompile Include="..\manual\LuaSkeletonAnimation.cpp" />
<ClCompile Include="..\manual\lua_cocos2dx_coco_studio_manual.cpp" />
<ClCompile Include="..\manual\lua_cocos2dx_deprecated.cpp" />
<ClCompile Include="..\manual\lua_cocos2dx_experimental_manual.cpp" />
<ClCompile Include="..\manual\lua_cocos2dx_extension_manual.cpp" />
<ClCompile Include="..\manual\lua_cocos2dx_manual.cpp" />
<ClCompile Include="..\manual\lua_cocos2dx_physics_manual.cpp" />
@ -82,6 +84,7 @@
<ClInclude Include="..\..\..\..\external\lua\tolua\tolua_event.h" />
<ClInclude Include="..\..\..\..\external\xxtea\xxtea.h" />
<ClInclude Include="..\auto\lua_cocos2dx_auto.hpp" />
<ClInclude Include="..\auto\lua_cocos2dx_experimental_auto.hpp" />
<ClInclude Include="..\auto\lua_cocos2dx_extension_auto.hpp" />
<ClInclude Include="..\auto\lua_cocos2dx_physics_auto.hpp" />
<ClInclude Include="..\auto\lua_cocos2dx_spine_auto.hpp" />
@ -99,6 +102,7 @@
<ClInclude Include="..\manual\LuaSkeletonAnimation.h" />
<ClInclude Include="..\manual\lua_cocos2dx_coco_studio_manual.hpp" />
<ClInclude Include="..\manual\lua_cocos2dx_deprecated.h" />
<ClInclude Include="..\manual\lua_cocos2dx_experimental_manual.hpp" />
<ClInclude Include="..\manual\lua_cocos2dx_extension_manual.h" />
<ClInclude Include="..\manual\lua_cocos2dx_manual.hpp" />
<ClInclude Include="..\manual\lua_cocos2dx_physics_manual.hpp" />

View File

@ -165,6 +165,12 @@
<ClCompile Include="..\..\..\..\external\xxtea\xxtea.cpp">
<Filter>xxtea</Filter>
</ClCompile>
<ClCompile Include="..\manual\lua_cocos2dx_experimental_manual.cpp">
<Filter>manual</Filter>
</ClCompile>
<ClCompile Include="..\auto\lua_cocos2dx_experimental_auto.cpp">
<Filter>auto</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\auto\lua_cocos2dx_auto.hpp">
@ -314,6 +320,12 @@
<ClInclude Include="..\..\..\..\external\xxtea\xxtea.h">
<Filter>xxtea</Filter>
</ClInclude>
<ClInclude Include="..\manual\lua_cocos2dx_experimental_manual.hpp">
<Filter>manual</Filter>
</ClInclude>
<ClInclude Include="..\auto\lua_cocos2dx_experimental_auto.hpp">
<Filter>auto</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\script\Cocos2dConstants.lua">

View File

@ -144,7 +144,7 @@ local function TMXOrthoTest()
--local color = cc.LayerColor:create( cc.c4b(64,64,64,255) )
--addChild(color, -1)
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test2.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test2.tmx")
layer:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -178,7 +178,7 @@ end
local function TMXOrthoTest2()
local layer = createTileDemoLayer("TMX Ortho test2")
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test1.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test1.tmx")
layer:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -195,7 +195,7 @@ end
--------------------------------------------------------------------
local function TMXOrthoTest3()
local layer = createTileDemoLayer("TMX anchorPoint test")
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test3.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test3.tmx")
layer:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -214,7 +214,7 @@ end
--------------------------------------------------------------------
local function TMXOrthoTest4()
local ret = createTileDemoLayer("TMX width/height test")
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test4.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test4.tmx")
ret:addChild(map, 0, kTagTileMap)
local s1 = map:getContentSize()
@ -277,7 +277,7 @@ local function TMXReadWriteTest()
local ret = createTileDemoLayer("TMX Read/Write test")
local m_gid = 0
local m_gid2 = 0
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test2.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test2.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -437,7 +437,7 @@ local function TMXIsoTest()
local color = cc.LayerColor:create( cc.c4b(64,64,64,255) )
ret:addChild(color, -1)
local map = ccexp.FastTMXTiledMap:create("TileMaps/iso-test.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/iso-test.tmx")
ret:addChild(map, 0, kTagTileMap)
-- move map to the center of the screen
@ -457,7 +457,7 @@ local function TMXIsoTest1()
local color = cc.LayerColor:create( cc.c4b(64,64,64,255) )
ret:addChild(color, -1)
local map = ccexp.FastTMXTiledMap:create("TileMaps/iso-test1.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/iso-test1.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -477,7 +477,7 @@ local function TMXIsoTest2()
local color = cc.LayerColor:create( cc.c4b(64,64,64,255) )
ret:addChild(color, -1)
local map = ccexp.FastTMXTiledMap:create("TileMaps/iso-test2.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/iso-test2.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -500,7 +500,7 @@ local function TMXUncompressedTest()
local color = cc.LayerColor:create( cc.c4b(64,64,64,255) )
ret:addChild(color, -1)
local map = ccexp.FastTMXTiledMap:create("TileMaps/iso-test2-uncompressed.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/iso-test2-uncompressed.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -521,7 +521,7 @@ end
--------------------------------------------------------------------
local function TMXTilesetTest()
local ret = createTileDemoLayer("TMX Tileset test")
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test5.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test5.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -537,7 +537,7 @@ end
--------------------------------------------------------------------
local function TMXOrthoObjectsTest()
local ret = createTileDemoLayer("TMX Ortho object test", "You should see a white box around the 3 platforms")
local map = ccexp.FastTMXTiledMap:create("TileMaps/ortho-objects.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/ortho-objects.tmx")
ret:addChild(map, -1, kTagTileMap)
local s = map:getContentSize()
@ -610,7 +610,7 @@ end
local function TMXIsoObjectsTest()
local ret = createTileDemoLayer("TMX Iso object test", "You need to parse them manually. See bug #810")
local map = ccexp.FastTMXTiledMap:create("TileMaps/iso-test-objectgroup.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/iso-test-objectgroup.tmx")
ret:addChild(map, -1, kTagTileMap)
local s = map:getContentSize()
@ -679,7 +679,7 @@ end
local function TMXResizeTest()
local ret = createTileDemoLayer("TMX resize test", "Should not crash. Testing issue #740")
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test5.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test5.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -705,7 +705,7 @@ end
local function TMXIsoZorder()
local m_tamara = nil
local ret = createTileDemoLayer("TMX Iso Zorder", "Sprite should hide behind the trees")
local map = ccexp.FastTMXTiledMap:create("TileMaps/iso-test-zorder.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/iso-test-zorder.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -765,7 +765,7 @@ end
local function TMXOrthoZorder()
local m_tamara = nil
local ret = createTileDemoLayer("TMX Ortho Zorder", "Sprite should hide behind the trees")
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test-zorder.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test-zorder.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -823,7 +823,7 @@ end
local function TMXIsoVertexZ()
local m_tamara = nil
local ret = createTileDemoLayer("TMX Iso VertexZ", "Sprite should hide behind the trees")
local map = ccexp.FastTMXTiledMap:create("TileMaps/iso-test-vertexz.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/iso-test-vertexz.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -878,7 +878,7 @@ end
local function TMXOrthoVertexZ()
local m_tamara = nil
local ret = createTileDemoLayer("TMX Ortho vertexZ", "Sprite should hide behind the trees")
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test-vertexz.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test-vertexz.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -932,7 +932,7 @@ end
--------------------------------------------------------------------
local function TMXIsoMoveLayer()
local ret = createTileDemoLayer("TMX Iso Move Layer", "Trees should be horizontally aligned")
local map = ccexp.FastTMXTiledMap:create("TileMaps/iso-test-movelayer.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/iso-test-movelayer.tmx")
ret:addChild(map, 0, kTagTileMap)
map:setPosition(cc.p(-700,-50))
@ -950,7 +950,7 @@ end
--------------------------------------------------------------------
local function TMXOrthoMoveLayer()
local ret = createTileDemoLayer("TMX Ortho Move Layer", "Trees should be horizontally aligned")
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test-movelayer.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test-movelayer.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -983,7 +983,7 @@ end
local function TMXOrthoFlipTest()
local ret = createTileDemoLayer("TMX tile flip test")
local map = ccexp.FastTMXTiledMap:create("TileMaps/ortho-rotation-test.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/ortho-rotation-test.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -1002,7 +1002,7 @@ end
local function TMXOrthoFlipRunTimeTest()
local ret = createTileDemoLayer("TMX tile flip run time test", "in 2 sec bottom left tiles will flip")
local map = ccexp.FastTMXTiledMap:create("TileMaps/ortho-rotation-test.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/ortho-rotation-test.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -1076,7 +1076,7 @@ local function TMXOrthoFromXMLTest()
cclog("Unable to open file")
end
local map = ccexp.FastTMXTiledMap:createWithXML(str ,resources)
local map = ccexp.TMXTiledMap:createWithXML(str ,resources)
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -1096,7 +1096,7 @@ end
local function TMXOrthoXMLFormatTest()
local ret = createTileDemoLayer("you should see blue, green and yellow in console.")
local map = ccexp.FastTMXTiledMap:create("TileMaps/xml-test.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/xml-test.tmx")
ret:addChild(map, 0, kTagTileMap)
local s = map:getContentSize()
@ -1118,7 +1118,7 @@ end
--------------------------------------------------------------------
local function TMXBug987()
local ret = createTileDemoLayer("TMX Bug 987", "You should see an square")
local map = ccexp.FastTMXTiledMap:create("TileMaps/orthogonal-test6.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/orthogonal-test6.tmx")
ret:addChild(map, 0, kTagTileMap)
local s1 = map:getContentSize()
@ -1137,7 +1137,7 @@ end
--------------------------------------------------------------------
local function TMXBug787()
local ret = createTileDemoLayer("TMX Bug 787", "You should see a map")
local map = ccexp.FastTMXTiledMap:create("TileMaps/iso-test-bug787.tmx")
local map = ccexp.TMXTiledMap:create("TileMaps/iso-test-bug787.tmx")
ret:addChild(map, 0, kTagTileMap)
map:setScale(0.25)
return ret

View File

@ -131,9 +131,7 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS
Animation3D::[getBoneCurveByName],
Animation3DCache::[*],
Sprite3DMaterialCache::[*],
Bone3D::[*],
FastTMXLayer::[*],
FastTMXTiledMap::[*]
Bone3D::[*]
rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame],
ProgressTimer::[setReverseProgress=setReverseDirection],

View File

@ -7,8 +7,6 @@ prefix = cocos2dx_experimental
# all classes will be embedded in that namespace
target_namespace = ccexp
macro_judgement = #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/include
android_flags = -D_SIZE_T_DEFINED_
@ -25,11 +23,11 @@ cxxgenerator_headers =
extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s
# what headers to parse
headers = %(cocosdir)s/cocos/ui/UIVideoPlayer.h %(cocosdir)s/cocos/2d/CCFastTMXLayer.h %(cocosdir)s/cocos/2d/CCFastTMXTiledMap.h
headers = %(cocosdir)s/cocos/2d/CCFastTMXLayer.h %(cocosdir)s/cocos/2d/CCFastTMXTiledMap.h
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^Menu*$".
classes = VideoPlayer FastTMXLayer FastTMXTiledMap
classes = TMXLayer TMXTiledMap
# what should we skip? in the format ClassName::[function function]
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also
@ -38,8 +36,7 @@ classes = VideoPlayer FastTMXLayer FastTMXTiledMap
# will apply to all class names. This is a convenience wildcard to be able to skip similar named
# functions from all classes.
skip = VideoPlayer::[addEventListener],
FastTMXLayer::[(g|s)etTiles getTileGIDAt]
skip = TMXLayer::[(g|s)etTiles getTileGIDAt]
rename_functions =

View File

@ -0,0 +1,62 @@
[cocos2dx_experimental_video]
# the prefix to be added to the generated functions. You might or might not use this in your own
# templates
prefix = cocos2dx_experimental_video
# create a target namespace (in javascript, this would create some code like the equiv. to `ns = ns || {}`)
# all classes will be embedded in that namespace
target_namespace = ccexp
macro_judgement = #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/include
android_flags = -D_SIZE_T_DEFINED_
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
clang_flags = -nostdinc -x c++ -std=c++11
cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android
cocos_flags = -DANDROID
cxxgenerator_headers =
# extra arguments for clang
extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s
# what headers to parse
headers = %(cocosdir)s/cocos/ui/UIVideoPlayer.h
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^Menu*$".
classes = VideoPlayer FastTMXLayer FastTMXTiledMap
# what should we skip? in the format ClassName::[function function]
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also
# regular expressions, they will not be surrounded by "^$". If you want to skip a whole class, just
# add a single "*" as functions. See bellow for several examples. A special class name is "*", which
# will apply to all class names. This is a convenience wildcard to be able to skip similar named
# functions from all classes.
skip = VideoPlayer::[addEventListener]
rename_functions =
rename_classes =
# for all class names, should we remove something when registering in the target VM?
remove_prefix =
# classes for which there will be no "parent" lookup
classes_have_no_parents =
# base classes which will be skipped when their sub-classes found them.
base_classes_to_skip =
# classes that create no constructor
# Set is special and we will use a hand-written constructor
abstract_classes =
# Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'.
script_control_cpp = no

View File

@ -132,6 +132,7 @@ def main():
'cocos2dx_studio.ini' : ('cocos2dx_studio', 'lua_cocos2dx_studio_auto'), \
'cocos2dx_spine.ini' : ('cocos2dx_spine', 'lua_cocos2dx_spine_auto'), \
'cocos2dx_physics.ini' : ('cocos2dx_physics', 'lua_cocos2dx_physics_auto'), \
'cocos2dx_experimental_video.ini' : ('cocos2dx_experimental_video', 'lua_cocos2dx_experimental_video_auto'), \
'cocos2dx_experimental.ini' : ('cocos2dx_experimental', 'lua_cocos2dx_experimental_auto'), \
'cocos2dx_controller.ini' : ('cocos2dx_controller', 'lua_cocos2dx_controller_auto'), \
}