mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/2youyouo2/cocos2d-x into v3
Conflicts: tools/tolua/cocos2dx.ini
This commit is contained in:
commit
9d49f82eb9
|
@ -1326,6 +1326,10 @@
|
|||
46C02E0818E91123004B7456 /* xxhash.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C02E0518E91123004B7456 /* xxhash.c */; };
|
||||
46C02E0918E91123004B7456 /* xxhash.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C02E0618E91123004B7456 /* xxhash.h */; };
|
||||
46C02E0A18E91123004B7456 /* xxhash.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C02E0618E91123004B7456 /* xxhash.h */; };
|
||||
4DAB8DC61A1CBDB200F7B768 /* CCActionTimeLineNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DAB8DC41A1CBDB200F7B768 /* CCActionTimeLineNode.cpp */; };
|
||||
4DAB8DC71A1CBDB200F7B768 /* CCActionTimeLineNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DAB8DC41A1CBDB200F7B768 /* CCActionTimeLineNode.cpp */; };
|
||||
4DAB8DC81A1CBDB200F7B768 /* CCActionTimeLineNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DAB8DC51A1CBDB200F7B768 /* CCActionTimeLineNode.h */; };
|
||||
4DAB8DC91A1CBDB200F7B768 /* CCActionTimeLineNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DAB8DC51A1CBDB200F7B768 /* CCActionTimeLineNode.h */; };
|
||||
5027253A190BF1B900AAF4ED /* cocos2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 50272538190BF1B900AAF4ED /* cocos2d.h */; };
|
||||
5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 50272538190BF1B900AAF4ED /* cocos2d.h */; };
|
||||
5027253C190BF1B900AAF4ED /* cocos2d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50272539190BF1B900AAF4ED /* cocos2d.cpp */; };
|
||||
|
@ -2631,6 +2635,8 @@
|
|||
46A170781807CE7A005B8026 /* CCPhysicsWorld.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPhysicsWorld.h; sourceTree = "<group>"; };
|
||||
46C02E0518E91123004B7456 /* xxhash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xxhash.c; sourceTree = "<group>"; };
|
||||
46C02E0618E91123004B7456 /* xxhash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xxhash.h; sourceTree = "<group>"; };
|
||||
4DAB8DC41A1CBDB200F7B768 /* CCActionTimeLineNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionTimeLineNode.cpp; sourceTree = "<group>"; };
|
||||
4DAB8DC51A1CBDB200F7B768 /* CCActionTimeLineNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionTimeLineNode.h; sourceTree = "<group>"; };
|
||||
50272538190BF1B900AAF4ED /* cocos2d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cocos2d.h; path = ../cocos/cocos2d.h; sourceTree = "<group>"; };
|
||||
50272539190BF1B900AAF4ED /* cocos2d.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cocos2d.cpp; path = ../cocos/cocos2d.cpp; sourceTree = "<group>"; };
|
||||
5034C9FB191D591000CE6051 /* ccShader_PositionTextureColorAlphaTest.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureColorAlphaTest.frag; sourceTree = "<group>"; };
|
||||
|
@ -3069,6 +3075,8 @@
|
|||
0634A4C4194B19E400E608AF /* ActionTimeline */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4DAB8DC41A1CBDB200F7B768 /* CCActionTimeLineNode.cpp */,
|
||||
4DAB8DC51A1CBDB200F7B768 /* CCActionTimeLineNode.h */,
|
||||
38B8E2D319E66581002D7CE7 /* CSLoader.cpp */,
|
||||
38B8E2D419E66581002D7CE7 /* CSLoader.h */,
|
||||
0634A4C5194B19E400E608AF /* CCActionTimeline.cpp */,
|
||||
|
@ -5284,6 +5292,7 @@
|
|||
1A5701B3180BCB590088DEC7 /* CCFontFNT.h in Headers */,
|
||||
15AE1BD919AAE01E00C27E9E /* CCControlStepper.h in Headers */,
|
||||
15AE192119AAD35000C27E9E /* CocoStudio.h in Headers */,
|
||||
4DAB8DC81A1CBDB200F7B768 /* CCActionTimeLineNode.h in Headers */,
|
||||
15AE18A119AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */,
|
||||
5034CA47191D591100CE6051 /* ccShader_Label_normal.frag in Headers */,
|
||||
15AE182219AAD2F700C27E9E /* CCBundleReader.h in Headers */,
|
||||
|
@ -6062,6 +6071,7 @@
|
|||
3E6176781960F89B00DE83F5 /* CCGameController.h in Headers */,
|
||||
15AE19BB19AAD39700C27E9E /* TextReader.h in Headers */,
|
||||
50ABBE641925AB6F00A911A9 /* CCEventListenerAcceleration.h in Headers */,
|
||||
4DAB8DC91A1CBDB200F7B768 /* CCActionTimeLineNode.h in Headers */,
|
||||
15AE180B19AAD2F700C27E9E /* CCAABB.h in Headers */,
|
||||
50ABBD921925AB4100A911A9 /* CCGLProgramCache.h in Headers */,
|
||||
50ABBE961925AB6F00A911A9 /* CCProfiling.h in Headers */,
|
||||
|
@ -6667,6 +6677,7 @@
|
|||
50ABBE5D1925AB6F00A911A9 /* CCEventListener.cpp in Sources */,
|
||||
B29A7E2D19EE1B7700872B35 /* Slot.c in Sources */,
|
||||
15AE182819AAD2F700C27E9E /* CCMeshSkin.cpp in Sources */,
|
||||
4DAB8DC61A1CBDB200F7B768 /* CCActionTimeLineNode.cpp in Sources */,
|
||||
15AE19A619AAD39600C27E9E /* TextReader.cpp in Sources */,
|
||||
15AE198819AAD36A00C27E9E /* ButtonReader.cpp in Sources */,
|
||||
15AE1A6319AAD40300C27E9E /* b2Island.cpp in Sources */,
|
||||
|
@ -6913,6 +6924,7 @@
|
|||
15AE193419AAD35100C27E9E /* CCActionObject.cpp in Sources */,
|
||||
15AE1AD619AAD40300C27E9E /* b2WheelJoint.cpp in Sources */,
|
||||
299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */,
|
||||
4DAB8DC71A1CBDB200F7B768 /* CCActionTimeLineNode.cpp in Sources */,
|
||||
1A5701DF180BCB8C0088DEC7 /* CCLayer.cpp in Sources */,
|
||||
B29A7DEA19EE1B7700872B35 /* EventData.c in Sources */,
|
||||
50ABBDBE1925AB4100A911A9 /* CCTextureCache.cpp in Sources */,
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
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.
|
||||
****************************************************************************/
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
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 "CCActionTimeLineNode.h"
|
||||
#include "CSLoader.h"
|
||||
|
@ -42,8 +42,8 @@ ActionTimelineNode* ActionTimelineNode::create(Node* root, ActionTimeline* actio
|
|||
}
|
||||
|
||||
ActionTimelineNode::ActionTimelineNode()
|
||||
: _root(nullptr)
|
||||
, _action(nullptr)
|
||||
: _root(nullptr)
|
||||
, _action(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -51,17 +51,22 @@ ActionTimelineNode::~ActionTimelineNode()
|
|||
{
|
||||
}
|
||||
|
||||
bool ActionTimelineNode::init()
|
||||
{
|
||||
return Node::init();
|
||||
}
|
||||
|
||||
bool ActionTimelineNode::init(Node* root, ActionTimeline* action)
|
||||
{
|
||||
_root = root;
|
||||
_action = action;
|
||||
|
||||
|
||||
if(_root)
|
||||
{
|
||||
_root->removeFromParent();
|
||||
addChild(_root);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
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.
|
||||
****************************************************************************/
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
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 __COCOSSTUDIO_CCACTIONTIMELINENODE_H__
|
||||
#define __COCOSSTUDIO_CCACTIONTIMELINENODE_H__
|
||||
|
@ -36,19 +36,20 @@ class ActionTimeline;
|
|||
class CC_STUDIO_DLL ActionTimelineNode : public cocos2d::Node
|
||||
{
|
||||
public:
|
||||
static ActionTimelineNode* create(cocos2d::Node* root, ActionTimeline* action);
|
||||
|
||||
ActionTimelineNode();
|
||||
~ActionTimelineNode();
|
||||
|
||||
virtual bool init(cocos2d::Node* root, ActionTimeline* action);
|
||||
|
||||
virtual void setRoot(cocos2d::Node* root);
|
||||
virtual cocos2d::Node* getRoot();
|
||||
|
||||
virtual void setActionTimeline(ActionTimeline* action);
|
||||
virtual ActionTimeline* getActionTimeline();
|
||||
|
||||
static ActionTimelineNode* create(cocos2d::Node* root, ActionTimeline* action);
|
||||
|
||||
ActionTimelineNode();
|
||||
~ActionTimelineNode();
|
||||
|
||||
bool init() override;
|
||||
bool init(cocos2d::Node* root, ActionTimeline* action);
|
||||
|
||||
virtual void setRoot(cocos2d::Node* root);
|
||||
virtual cocos2d::Node* getRoot();
|
||||
|
||||
virtual void setActionTimeline(ActionTimeline* action);
|
||||
virtual ActionTimeline* getActionTimeline();
|
||||
|
||||
protected:
|
||||
cocos2d::Node* _root;
|
||||
ActionTimeline* _action;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "CCLuaEngine.h"
|
||||
#include "ActionTimeline/CCActionTimeline.h"
|
||||
#include "ActionTimeline/CSLoader.h"
|
||||
#include "ActionTimeline/CCActionTimeLineNode.h"
|
||||
|
||||
int lua_cocos2dx_csloader_CSLoader_createTimeline(lua_State* tolua_S)
|
||||
{
|
||||
|
@ -63,6 +64,65 @@ tolua_lerror:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_csloader_CSLoader_createActionTimelineNode(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S, 1, "cc.CSLoader", 0, &tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
do
|
||||
{
|
||||
if (argc == 4)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2, &arg0, "cc.CSLoader:createActionTimelineNode");
|
||||
if (!ok) { break; }
|
||||
int arg1;
|
||||
ok &= luaval_to_int32(tolua_S, 3, (int *)&arg1, "cc.CSLoader:createActionTimelineNode");
|
||||
if (!ok) { break; }
|
||||
int arg2;
|
||||
ok &= luaval_to_int32(tolua_S, 4, (int *)&arg2, "cc.CSLoader:createActionTimelineNode");
|
||||
if (!ok) { break; }
|
||||
bool arg3;
|
||||
ok &= luaval_to_boolean(tolua_S, 5, &arg3, "cc.CSLoader:createActionTimelineNode");
|
||||
if (!ok) { break; }
|
||||
cocostudio::timeline::ActionTimelineNode* ret = cocos2d::CSLoader::createActionTimelineNode(arg0, arg1, arg2, arg3);
|
||||
object_to_luaval<cocostudio::timeline::ActionTimelineNode>(tolua_S, "ccs.ActionTimelineNode", (cocostudio::timeline::ActionTimelineNode*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
do
|
||||
{
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2, &arg0, "cc.CSLoader:createActionTimelineNode");
|
||||
if (!ok) { break; }
|
||||
cocostudio::timeline::ActionTimelineNode* ret = cocos2d::CSLoader::createActionTimelineNode(arg0);
|
||||
object_to_luaval<cocostudio::timeline::ActionTimelineNode>(tolua_S, "ccs.ActionTimelineNode", (cocostudio::timeline::ActionTimelineNode*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.CSLoader:createActionTimelineNode", argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S, "#ferror in function 'lua_cocos2dx_csloader_CSLoader_createActionTimelineNode'.", &tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int register_all_cocos2dx_csloader_manual(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "cc.CSLoader");
|
||||
|
@ -70,6 +130,7 @@ int register_all_cocos2dx_csloader_manual(lua_State* L)
|
|||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "createTimeline", lua_cocos2dx_csloader_CSLoader_createTimeline);
|
||||
tolua_function(L, "createActionTimelineNode", lua_cocos2dx_csloader_CSLoader_createActionTimelineNode);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
|
|
|
@ -529,6 +529,8 @@
|
|||
"cocos/editor-support/cocosbuilder/CocosBuilder.h",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineNode.cpp",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineNode.h",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp",
|
||||
|
|
|
@ -36,7 +36,7 @@ classes = CSLoader
|
|||
# will apply to all class names. This is a convenience wildcard to be able to skip similar named
|
||||
# functions from all classes.
|
||||
|
||||
skip = CSLoader::[nodeFromXML nodeFromProtocolBuffers createTimeline nodeWithFlatBuffers]
|
||||
skip = CSLoader::[nodeFromXML nodeFromProtocolBuffers createTimeline nodeWithFlatBuffers createActionTimelineNode]
|
||||
|
||||
rename_functions =
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ headers = %(cocosdir)s/cocos/editor-support/cocostudio/CocoStudio.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 = Armature ArmatureAnimation Skin Bone ArmatureDataManager \w+Data$ ActionManagerEx ComAudio ComController ComAttribute ComRender BatchNode SceneReader GUIReader ActionObject Tween DisplayManager NodeReader ActionTimeline.* .*Frame$ Timeline
|
||||
classes = Armature ArmatureAnimation Skin Bone ArmatureDataManager \w+Data$ ActionManagerEx ComAudio ComController ComAttribute ComRender BatchNode SceneReader GUIReader ActionObject Tween DisplayManager NodeReader ActionTimeline.* .*Frame$ Timeline ActionTimelineNode
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue