mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3-game-controller
This commit is contained in:
commit
18b988d771
|
@ -455,7 +455,7 @@ void UserDefault::setDataForKey(const char* pKey, const Data& value)
|
||||||
deleteNodeByKey(pKey);
|
deleteNodeByKey(pKey);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CCLOG("SET DATA FOR KEY: --%s--%d", value.getBytes(), value.getSize());
|
CCLOG("SET DATA FOR KEY: --%s--%d", value.getBytes(), (int)(value.getSize()));
|
||||||
char * encodedData = nullptr;
|
char * encodedData = nullptr;
|
||||||
unsigned int encodedDataLen = base64Encode(value.getBytes(), value.getSize(), &encodedData);
|
unsigned int encodedDataLen = base64Encode(value.getBytes(), value.getSize(), &encodedData);
|
||||||
|
|
||||||
|
|
|
@ -253,6 +253,8 @@ THE SOFTWARE.
|
||||||
#include "2d/CCTMXTiledMap.h"
|
#include "2d/CCTMXTiledMap.h"
|
||||||
#include "2d/CCTMXXMLParser.h"
|
#include "2d/CCTMXXMLParser.h"
|
||||||
#include "2d/CCTileMapAtlas.h"
|
#include "2d/CCTileMapAtlas.h"
|
||||||
|
#include "2d/CCFastTMXTiledMap.h"
|
||||||
|
#include "2d/CCFastTMXLayer.h"
|
||||||
|
|
||||||
// component
|
// component
|
||||||
#include "2d/CCComponent.h"
|
#include "2d/CCComponent.h"
|
||||||
|
|
|
@ -315,7 +315,7 @@ void GLViewProtocol::handleTouchesMove(int num, intptr_t ids[], float xs[], floa
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// It is error, should return.
|
// It is error, should return.
|
||||||
CCLOG("Moving touches with id: %ld error", id);
|
CCLOG("Moving touches with id: %ld error", (long int)id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6436,6 +6436,80 @@ static void extendApplication(lua_State* tolua_S)
|
||||||
lua_pop(tolua_S, 1);
|
lua_pop(tolua_S, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lua_cocos2dx_FastTMXLayer_getTileGIDAt(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
int argc = 0;
|
||||||
|
cocos2d::FastTMXLayer* cobj = nullptr;
|
||||||
|
bool ok = true;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_Error tolua_err;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!tolua_isusertype(tolua_S,1,"cc.FastTMXLayer",0,&tolua_err)) goto tolua_lerror;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cobj = (cocos2d::FastTMXLayer*)tolua_tousertype(tolua_S,1,0);
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!cobj)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FastTMXLayer_getTileGIDAt'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
argc = lua_gettop(tolua_S)-1;
|
||||||
|
if (argc == 1)
|
||||||
|
{
|
||||||
|
cocos2d::Vec2 arg0;
|
||||||
|
|
||||||
|
ok &= luaval_to_vec2(tolua_S, 2, &arg0);
|
||||||
|
if(!ok)
|
||||||
|
return 0;
|
||||||
|
int ret = cobj->getTileGIDAt(arg0);
|
||||||
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
cocos2d::Vec2 arg0;
|
||||||
|
int arg1 = 0;
|
||||||
|
|
||||||
|
ok &= luaval_to_vec2(tolua_S, 2, &arg0);
|
||||||
|
ok &= luaval_to_int32(tolua_S, 3, &arg1);
|
||||||
|
|
||||||
|
if(!ok)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
unsigned int ret = cobj->getTileGIDAt(arg0, (cocos2d::TMXTileFlags*)&arg1);
|
||||||
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getTileGIDAt",argc, 1);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_lerror:
|
||||||
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FastTMXLayer_getTileGIDAt'.",&tolua_err);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void extendFastTMXLayer(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
lua_pushstring(tolua_S, "cc.FastTMXLayer");
|
||||||
|
lua_rawget(tolua_S, LUA_REGISTRYINDEX);
|
||||||
|
if (lua_istable(tolua_S,-1))
|
||||||
|
{
|
||||||
|
tolua_function(tolua_S, "getTileGIDAt", lua_cocos2dx_FastTMXLayer_getTileGIDAt);
|
||||||
|
}
|
||||||
|
lua_pop(tolua_S, 1);
|
||||||
|
}
|
||||||
|
|
||||||
int register_all_cocos2dx_manual(lua_State* tolua_S)
|
int register_all_cocos2dx_manual(lua_State* tolua_S)
|
||||||
{
|
{
|
||||||
if (NULL == tolua_S)
|
if (NULL == tolua_S)
|
||||||
|
@ -6489,6 +6563,7 @@ int register_all_cocos2dx_manual(lua_State* tolua_S)
|
||||||
extendTMXLayer(tolua_S);
|
extendTMXLayer(tolua_S);
|
||||||
extendEventListenerFocus(tolua_S);
|
extendEventListenerFocus(tolua_S);
|
||||||
extendApplication(tolua_S);
|
extendApplication(tolua_S);
|
||||||
|
extendFastTMXLayer(tolua_S);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -55,6 +55,7 @@ require "src/XMLHttpRequestTest/XMLHttpRequestTest"
|
||||||
require "src/PhysicsTest/PhysicsTest"
|
require "src/PhysicsTest/PhysicsTest"
|
||||||
require "src/CaptureScreenTest/CaptureScreenTest"
|
require "src/CaptureScreenTest/CaptureScreenTest"
|
||||||
require "src/VideoPlayerTest/VideoPlayerTest"
|
require "src/VideoPlayerTest/VideoPlayerTest"
|
||||||
|
require "src/FastTiledMapTest/FastTiledMapTest"
|
||||||
|
|
||||||
|
|
||||||
local LINE_SPACE = 40
|
local LINE_SPACE = 40
|
||||||
|
@ -85,6 +86,7 @@ local _allTests = {
|
||||||
{ isSupported = true, name = "EffectsTest" , create_func = EffectsTest },
|
{ isSupported = true, name = "EffectsTest" , create_func = EffectsTest },
|
||||||
{ isSupported = true, name = "EffectAdvancedTest" , create_func = EffectAdvancedTestMain },
|
{ isSupported = true, name = "EffectAdvancedTest" , create_func = EffectAdvancedTestMain },
|
||||||
{ isSupported = true, name = "ExtensionsTest" , create_func= ExtensionsTestMain },
|
{ isSupported = true, name = "ExtensionsTest" , create_func= ExtensionsTestMain },
|
||||||
|
{ isSupported = true, name = "FastTiledMapTest" , create_func = FastTiledMapTestMain},
|
||||||
{ isSupported = true, name = "FontTest" , create_func = FontTestMain },
|
{ isSupported = true, name = "FontTest" , create_func = FontTestMain },
|
||||||
{ isSupported = true, name = "IntervalTest" , create_func = IntervalTestMain },
|
{ isSupported = true, name = "IntervalTest" , create_func = IntervalTestMain },
|
||||||
{ isSupported = true, name = "KeypadTest" , create_func= KeypadTestMain },
|
{ isSupported = true, name = "KeypadTest" , create_func= KeypadTestMain },
|
||||||
|
|
|
@ -26,7 +26,7 @@ headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/audio/include/SimpleAu
|
||||||
|
|
||||||
# what classes to produce code for. You can use regular expressions here. When testing the regular
|
# 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*$".
|
# expression, it will be enclosed in "^$", like this: "^Menu*$".
|
||||||
classes = New.* Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set SimpleAudioEngine Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Ref$ UserDefault GLViewProtocol GLView Image Event(?!.*(Physics).*).* Component ProtectedNode Console Mesh GLProgramCache GLProgramState
|
classes = New.* Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* .*TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set SimpleAudioEngine Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Ref$ UserDefault GLViewProtocol GLView Image Event(?!.*(Physics).*).* Component ProtectedNode Console Mesh GLProgramCache GLProgramState
|
||||||
|
|
||||||
# what should we skip? in the format ClassName::[function function]
|
# 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
|
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also
|
||||||
|
@ -131,7 +131,8 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS
|
||||||
Animation3D::[getBoneCurveByName],
|
Animation3D::[getBoneCurveByName],
|
||||||
Animation3DCache::[*],
|
Animation3DCache::[*],
|
||||||
Sprite3DMaterialCache::[*],
|
Sprite3DMaterialCache::[*],
|
||||||
Bone3D::[*]
|
Bone3D::[*],
|
||||||
|
FastTMXLayer::[(g|s)etTiles getTileGIDAt]
|
||||||
|
|
||||||
rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame],
|
rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame],
|
||||||
ProgressTimer::[setReverseProgress=setReverseDirection],
|
ProgressTimer::[setReverseProgress=setReverseDirection],
|
||||||
|
|
Loading…
Reference in New Issue